Getting exception in fetching data from database in debug mode

I get this exception in debug mode while fetching data from database but it is fully OK in release mode, the strange thing is that it randomly works fine too in debug mode:

I/RTClient( 757): try to subscribe RTSubscription{id='9E0D45DA-1A20-06E2-FF18-84F11ABA8C00', callback=com.backendless.rt.ConnectListener$1@c720300, subscriptionName=PUB_SUB_CONNECT, options={channel=chl_group_chat}} I/cketIOConnectionManager( 757): Socket not connected. Try to get lock I/cketIOConnectionManager( 757): Got lock I/art ( 757): Background sticky concurrent mark sweep GC freed 78130(3MB) AllocSpace objects, 2(40KB) LOS objects, 27% free, 9MB/12MB, paused 775us total 299.793ms I/cketIOConnectionManager( 757): Looked up for server https://rt3-cloud.dal01.backendless.com:443/8EE6A1A1-B026-5FB2-FF3E-7F9DD2A7C600 I/cketIOConnectionManager( 757): try to connect with to host with query: apiKey=4CB2DC7E-2113-4B07-B919-7C0AB4F2311F&clientId=EMULATOR30X0X26X0&binary=true I/cketIOConnectionManager( 757): Socket object created E/flutter ( 757): [ERROR:flutter/lib/ui/ui_dart_state.cc(177)] Unhandled Exception: FormatException: Message corrupted E/flutter ( 757): #0 StandardMessageCodec.readValueOfType (package:flutter/src/services/message_codecs.dart:466:16) E/flutter ( 757): #1 StandardMessageCodec.readValue (package:flutter/src/services/message_codecs.dart:416:12) E/flutter ( 757): #2 StandardMessageCodec.readValueOfType (package:flutter/src/services/message_codecs.dart:464:39) E/flutter ( 757): #3 StandardMessageCodec.readValue (package:flutter/src/services/message_codecs.dart:416:12) E/flutter ( 757): #4 StandardMessageCodec.readValueOfType (package:flutter/src/services/message_codecs.dart:458:23) E/flutter ( 757): #5 BackendlessMessageCodec.readValueOfType (package:backendless_sdk/src/utils/message_codec.dart:194:22) E/flutter ( 757): #6 StandardMessageCodec.readValue (package:flutter/src/services/message_codecs.dart:416:12) E/flutter ( 757): #7 StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:576:27) E/flutter ( 757): #8 MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:159:18) E/flutter ( 757): <asynchronous suspension> E/flutter ( 757): #9 MethodChannel.invokeMethod (package:flutter/src/services/platform_channel.dart:332:12) E/flutter ( 757): #10 MapDrivenDataStore.find (package:backendless_sdk/src/modules/data/data_store.dart:85:23) E/flutter ( 757): #11 _GroupChatPageState.getHistoryItems (package:agora_flutter/pages/group_chat_page.dart:84:31) E/flutter ( 757): #12 _GroupChatPageState.initState (package:agora_flutter/pages/group_chat_page.dart:113:5) E/flutter ( 757): #13 StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:4765:58) E/flutter ( 757): #14 ComponentElement.mount (package:flutter/src/widgets/framework.dart:4601:5) E/flutter ( 757): #15 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3569:14) E/flutter ( 757): #16 Element.updateChild (package:flutter/src/widgets/framework.dart:3327:18) E/flutter ( 757): #17 SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:6118:14) E/flutter ( 757): #18 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3569:14) E/flutter ( 757): #19 Element.updateChild (package:flutter/src/widgets/framework.dart:3327:18) E/flutter ( 757): #20 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4652:16) E/flutter ( 757): #21 Element.rebuild (package:flutter/src/widgets/framework.dart:4343:5) E/flutter ( 757): #22 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:4606:5) E/flutter ( 757): #23 ComponentElement.mount (package:flutter/src/widgets/framework.dart:4601:5) E/flutter ( 757): #24 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3569:14) E/flutter ( 757): #25 Element.updateChild (package:flutter/src/widgets/framework.dart:3327:18) E/flutter ( 757): #26 SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:6118:14) E/flutter ( 757): #27 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3569:14) E/flutter ( 757): #28 Element.updateChild (package:flutter/src/widgets/framework.dart:3327:18) E/flutter ( 757): #29 SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:6118:14) E/flutter ( 757): #30 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3569:14) E/flutter ( 757): #31 Element.updateChild (package:flutter/src/widgets/framework.dart:3327:18) E/flutter ( 757): #32 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4652:16) E/flutter ( 757): #33 StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:4800:11) E/flutter ( 757): #34 Element.rebuild (package:flutter/src/widgets/framework.dart:4343:5) E/flutter ( 757): #35 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:4606:5) E/flutter ( 757): #36 StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:4791:11) E/flutter ( 757): #37 ComponentElement.mount (package:flutter/src/widgets/framework.dart:4601:5) E/flutter ( 757): #38 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3569:14) E/flutter ( 757): #39 Element.updateChild (package:flutter/src/widgets/framework.dart:3327:18) E/flutter ( 757): #40 SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:6118:14) E/flutter ( 757): #41 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3569:14) E/flutter ( 757): #42 Element.updateChild (package:flutter/src/widgets/framework.dart:3327:18) E/flutter ( 757): #43 SingleChildRenderObjectElement.mount (package:flutter I/cketIOConnectionManager( 757): Connected event I/cketIOConnectionManager( 757): Socket is connected I/RTClient( 757): subOn called I/cketIOConnectionManager( 757): Got sub res I/RTClient( 757): subscription result [[B@a6988d3] I/RTClient( 757): Got result for subscription 9E0D45DA-1A20-06E2-FF18-84F11ABA8C00 I/RTClient( 757): try to subscribe RTSubscription{id='C796A657-00A3-4813-FF8C-F60D7C157300', callback=com.backendless.rt.messaging.ChannelImpl$4@fa2309, subscriptionName=PUB_SUB_MESSAGES, options={channel=chl_group_c hat}} I/cketIOConnectionManager( 757): Socket is connected I/cketIOConnectionManager( 757): Socket is connected

following is my code:

final DataQueryBuilder queryBuilder = DataQueryBuilder()..whereClause = "group_id = ${widget.groupId} "..sortBy = ['created DESC']..pageSize = 100..offset = ofst; List<Map> list = await groupChatTableDataStore.find(queryBuilder);

At the second line I get the exception and all the parameters are always filled
I use FLutter SDK v1.22 and backendless_sdk v6.1.0

Hi @dmlco_agora,

Thank you for reporting this issue. It is assigned to an engineer to investigate the problem. We will let you know what we find.

Regards,
Mark

Hello @dmlco_agora, the internal ticket is BKNDLSS-23623

Hi
Thank you mark, I look forward for your team’s solution.

Hi
Thank you Sergey, So how and where can I track my issue with this ticket?

Hello @dmlco_agora, we write ticket number to track topic what need an update after resolving the issue, so it’s for developers. But when we resolve it, we notify you.

Regards, Dima

1 Like

Hi @Dima
I didn’t get any solution from backendless after one month!
Hasn’t the issue solved yet?
I still have the problem repeatedly

Hi @dmlco_agora,

we are sorry for the delay, I raised the priority of the ticket to resolve your issue.

Regards,
Stanislaw

Hi @dmlco_agora

The stacktrace indicates there are invalid data that parser cannot decode while fetching it.

However I couldn’t reproduce your issue. I successfully fetched all the data from your app, with and without your query.
Could you please create the minimal reproducible example . That will help us to find the cause and resolve your issue.

Best Regards,
Maksym