Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[carp_mobile-sensing] Unhandled Exception: Converting object to an encodable object failed: Instance of 'DataPoint' #82

Closed
thomasnilsson opened this issue Aug 22, 2020 · 2 comments
Assignees
Labels
bug Something isn't working question Further information is requested

Comments

@thomasnilsson
Copy link
Contributor

How to re-create

  1. Run the carp_mobile_sensing example app on Android
  2. Tap the refresh button to make a sample
  3. Error will occur in logs

Log output:

I/flutter (15411): AppUsageDatum - format: carp.app_usage, id: 90e7ab60-e4a5-11ea-b171-e315deff13b0, timestamp: 2020-08-22 18:30:34.005660Z, 2020-08-22 18:29:34.958190Z, end: 2020-08-22 18:30:33.959474Z, usage: {packageinstaller: 9.0, nexuslauncher: 1060.0, carp_mobile_sensing_example: 4.0, settings: 27.0, app_usage_example: 2474.0, app_usage_tester: 248.0, calendar: 4.0}
E/flutter (15411): [ERROR:flutter/lib/ui/ui_dart_state.cc(157)] Unhandled Exception: Converting object to an encodable object failed: Instance of 'DataPoint'
E/flutter (15411): #0      _JsonStringifier.writeObject (dart:convert/json.dart:659:7)
E/flutter (15411): #1      _JsonStringStringifier.printOn (dart:convert/json.dart:846:17)
E/flutter (15411): #2      _JsonStringStringifier.stringify (dart:convert/json.dart:831:5)
E/flutter (15411): #3      JsonEncoder.convert (dart:convert/json.dart:260:30)
E/flutter (15411): #4      JsonCodec.encode (dart:convert/json.dart:168:45)
E/flutter (15411): #5      jsonEncode (dart:convert/json.dart:82:10)
E/flutter (15411): #6      FileDataManager.write (package:carp_mobile_sensing/data_managers/local/file_data_manager.dart:118:18)
E/flutter (15411): #7      FileDataManager.onDatum (package:carp_mobile_sensing/data_managers/local/file_data_manager.dart:52:32)
E/flutter (15411): #8      _rootRunUnary (dart:async/zone.dart:1192:38)
E/flutter (15411): #9      _CustomZone.runUnary (dart:async/zone.dart:1085:19)
E/flutter (15411): #10     _CustomZone.runUnaryGuarded (dart:async/zone.dart:987:7)
E/flutter (15411): #11     _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:339:11)
E/flutter (15411): #12     _BufferingStreamSubscription._add (dart:async/stream_impl.dart:266:7)
E/flutter (15411): #13     _ForwardingStreamSubscription._add (dart:async/stream_pipe.dart:134:11)
E/flutter (15411): #14     _MapStream._handleData (dart:async/stream_pipe.dart:234:10)
E/flutter (15411): #15     _ForwardingStreamSubscription._handleData (dart:async/stream_pipe.dart:166:13)
E/flutter (15411): #16     _rootRunUnary (dart:async/zone.dart:1192:38)
E/flutter (15411): #17     _CustomZone.runUnary (dart:async/zone.dart:1085:19)
E/flutter (15411): #18     _CustomZone.runUnaryGuarded (dart:async/zone.dart:987:7)
E/flutter (15411): #19     _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:339:11)
E/flutter (15411): #20     _BufferingStreamSubscription._add (dart:async/stream_impl.dart:266:7)
E/flutter (15411): #21     _ForwardingStreamSubscription._add (dart:async/stream_pipe.dart:134:11)
E/flutter (15411): #22     _MapStream._handleData (dart:async/stream_pipe.dart:234:10)
E/flutter (15411): #23     _ForwardingStreamSubscription._handleData (dart:async/stream_pipe.dart:166:13)
E/flutter (15411): #24     _rootRunUnary (dart:async/zone.dart:1192:38)
E/flutter (15411): #25     _CustomZone.runUnary (dart:async/zone.dart:1085:19)
E/flutter (15411): #26     _CustomZone.runUnaryGuarded (dart:async/zone.dart:987:7)
E/flutter (15411): #27     _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:339:11)
E/flutter (15411): #28     _BufferingStreamSubscription._add (dart:async/stream_impl.dart:266:7)
E/flutter (15411): #29     _SyncBroadcastStreamController._sendData.<anonymous closure> (dart:async/broadcast_stream_controller.dart:386:20)
E/flutter (15411): #30     _BroadcastStreamController._forEachListener (dart:async/broadcast_stream_controller.dart:327:15)
E/flutter (15411): #31     _SyncBroadcastStreamController._sendData (dart:async/broadcast_stream_controller.dart:385:5)
E/flutter (15411): #32     _BroadcastStreamController.add (dart:async/broadcast_stream_controller.dart:252:5)
E/flutter (15411): #33     _rootRunUnary (dart:async/zone.dart:1192:38)
E/flutter (15411): #34     _CustomZone.runUnary (dart:async/zone.dart:1085:19)
E/flutter (15411): #35     _CustomZone.runUnaryGuarded (dart:async/zone.dart:987:7)
E/flutter (15411): #36     _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:339:11)
E/flutter (15411): #37     _BufferingStreamSubscription._add (dart:async/stream_impl.dart:266:7)
E/flutter (15411): #38     _SyncBroadcastStreamController._sendData (dart:async/broadcast_stream_controller.dart:378:20)
E/flutter (15411): #39     _BroadcastStreamController.add (dart:async/broadcast_stream_controller.dart:252:5)
E/flutter (15411): #40     _rootRunUnary (dart:async/zone.dart:1192:38)
E/flutter (15411): #41     _CustomZone.runUnary (dart:async/zone.dart:1085:19)
E/flutter (15411): #42     _CustomZone.runUnaryGuarded (dart:async/zone.dart:987:7)
E/flutter (15411): #43     _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:339:11)
E/flutter (15411): #44     _BufferingStreamSubscription._add (dart:async/stream_impl.dart:266:7)
E/flutter (15411): #45     _SyncBroadcastStreamController._sendData (dart:async/broadcast_stream_controller.dart:378:20)
E/flutter (15411): #46     _BroadcastStreamController.add (dart:async/broadcast_stream_controller.dart:252:5)
E/flutter (15411): #47     _rootRunUnary (dart:async/zone.dart:1192:38)
E/flutter (15411): #48     _CustomZone.runUnary (dart:async/zone.dart:1085:19)
E/flutter (15411): #49     _CustomZone.runUnaryGuarded (dart:async/zone.dart:987:7)
E/flutter (15411): #50     _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:339:11)
E/flutter (15411): #51     _DelayedData.perform (dart:async/stream_impl.dart:594:14)
E/flutter (15411): #52     _StreamIm
@bardram bardram self-assigned this Aug 31, 2020
@bardram bardram added the bug Something isn't working label Aug 31, 2020
@bardram
Copy link
Contributor

bardram commented Aug 31, 2020

I cannot reproduce this. I don't get an error.

@bardram bardram added the question Further information is requested label Aug 31, 2020
@bardram
Copy link
Contributor

bardram commented Oct 8, 2020

Fixed in version 0.9.3.

bardram added a commit that referenced this issue Oct 8, 2020
@bardram bardram closed this as completed Oct 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants