givelotus / lotus-vase

A simple reference wallet for Lotus which supports mobile devices.
GNU General Public License v3.0
4 stars 2 forks source link

null being returned from JSONRPCWebsocket after successful load of private keys #104

Closed chinitadelrey closed 3 years ago

chinitadelrey commented 3 years ago

Does anyone else have the same issue?

was printing the jsonrpc response here, can go through and find the exact code to replicate if necessary

[We have responses 1 through 59 truncated here and invariably it stops at 60]
I/flutter ( 4324): {id: 60, jsonrpc: 2.0, result: null}
I/flutter ( 4324): Instance of 'RPCResponse'
-----> I/flutter ( 4324): null
E/flutter (26606): [ERROR:flutter/lib/ui/ui_dart_state.cc(177)] Unhandled Exception: Invalid argument(s) (error): Must not be null
E/flutter (26606): #0      ArgumentError.checkNotNull (dart:core/errors.dart:194:27)
E/flutter (26606): #1      _Completer.completeError (dart:async/future_impl.dart:21:19)
E/flutter (26606): #2      JSONRPCWebsocket.call.<anonymous closure> (package:cashew/electrum/rpc.dart:173:19)
E/flutter (26606): #3      JSONRPCWebsocket._handleResponse (package:cashew/electrum/rpc.dart:105:12)
E/flutter (26606): #4      JSONRPCWebsocket.connect.<anonymous closure> (package:cashew/electrum/rpc.dart:147:14)
E/flutter (26606): #5      _rootRunUnary (dart:async/zone.dart:1198:47)
E/flutter (26606): #6      _CustomZone.runUnary (dart:async/zone.dart:1100:19)
E/flutter (26606): #7      _CustomZone.runUnaryGuarded (dart:async/zone.dart:1005:7)
E/flutter (26606): #8      _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:357:11)
E/flutter (26606): #9      _BufferingStreamSubscription._add (dart:async/stream_impl.dart:285:7)
E/flutter (26606): #10     _SyncStreamControllerDispatch._sendData (dart:async/stream_controller.dart:808:19)
E/flutter (26606): #11     _StreamController._add (dart:async/stream_controller.dart:682:7)
E/flutter (26606): #12     _StreamController.add (dart:async/stream_controller.dart:624:5)
E/flutter (26606): #13     new _WebSocketImpl._fromSocket.<anonymous closure> (dart:_http/websocket_impl.dart:1145:21)
E/flutter (26606): #14     _rootRunUnary (dart:async/zone.dart:1198:47)
E/flutter (26606): #15     _CustomZone.runUnary (dart:async/zone.dart:1100:19)
E/flutter (26606): #16     _CustomZone.runUnaryGuarded (dart:async/zone.dart:1005:7)
E/flutter (26606): #17     _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:357:11)
E/flutter (26606): #18     _BufferingStreamSubscription._add (dart:async/stream_impl.dart:285:7)
E/flutter (26606): #19     _SinkTransformerStreamSubscription._add (dart:async/stream_transformers.dart:69:11)
E/flutter (26606): #20     _EventSinkWrapper.add (dart:async/stream_transformers.dart:15:11)
E/flutter (26606): #21     _WebSocketProtocolTransformer._messageFrameEnd (dart:_http/websocket_impl.dart:338:23)
E/flutter (26606): #22     _WebSocketProtocolTransformer.add (dart:_http/websocket_impl.dart:232:46)
E/flutter (26606): #23     _SinkTransformerStreamSubscription._handleData (dart:async/stream_transformers.dart:121:24)
E/flutter (26606): #24     _rootRunUnary (dart:async/zone.dart:1198:47)
E/flutter (26606): #25     _CustomZone.runUnary (dart:async/zone.dart:1100:19)
E/flutter (26606): #26     _CustomZone.runUnaryGuarded (dart:async/zone.dart:1005:7)
E/flutter (26606): #27     _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:357:11)
E/flutter (26606): #28     _BufferingStreamSubscription._add (dart:async/stream_impl.dart:285:7)
E/flutter (26606): #29     _SyncStreamControllerDispatch._sendData (dart:async/stream_controller.dart:808:19)
E/flutter (26606): #30     _StreamController._add (dart:async/stream_controller.dart:682:7)
E/flutter (26606): #31     _StreamController.add (dart:async/stream_controller.dart:624:5)
E/flutter (26606): #32     _Socket._onData (dart:io-patch/socket_patch.dart:2044:41)
E/flutter (26606): #33     _rootRunUnary (dart:async/zone.dart:1206:13)
E/flutter (26606): #34     _CustomZone.runUnary (dart:async/zone.dart:1100:19)
E/flutter (26606): #35     _CustomZone.runUnaryGuarded (dart:async/zone.dart:1005:7)
E/flutter (26606): #36     _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:357:11)
E/flutter (26606): #37     _BufferingStreamSubscription._add (dart:async/stream_impl.dart:285:7)
E/flutter (26606): #38     _SyncStreamControllerDispatch._sendData (dart:async/stream_controller.dart:808:19)
E/flutter (26606): #39     _StreamController._add (dart:async/stream_controller.dart:682:7)
E/flutter (26606): #40     _StreamController.add (dart:async/stream_controller.dart:624:5)
E/flutter (26606): #41     new _RawSocket.<anonymous closure> (dart:io-patch/socket_patch.dart:1580:33)
E/flutter (26606): #42     _NativeSocket.issueReadEvent.issue (dart:io-patch/socket_patch.dart:1076:14)
E/flutter (26606): #43     _microtaskLoop (dart:async/schedule_microtask.dart:41:21)
E/flutter (26606): #44     _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5)
E/flutter (26606): 
E/flutter (26606): [ERROR:flutter/lib/ui/ui_dart_state.cc(177)] Unhandled Exception: Concurrent modification during iteration: _LinkedHashMap len:0.
E/flutter (26606): #0      _CompactIterator.moveNext (dart:collection-patch/compact_hash.dart:453:7)
E/flutter (26606): #1      MappedIterator.moveNext (dart:_internal/iterable.dart:391:19)
E/flutter (26606): #2      JSONRPCWebsocket.connect.<anonymous closure> (package:cashew/electrum/rpc.dart:156:56)
E/flutter (26606): #3      _rootRun (dart:async/zone.dart:1182:47)
E/flutter (26606): #4      _CustomZone.run (dart:async/zone.dart:1093:19)
E/flutter (26606): #5      _CustomZone.runGuarded (dart:async/zone.dart:997:7)
E/flutter (26606): #6      _BufferingStreamSubscription._sendDone.sendDone (dart:async/stream_impl.dart:410:13)
E/flutter (26606): #7      _BufferingStreamSubscription._sendDone (dart:async/stream_impl.dart:420:15)
E/flutter (26606): #8      _BufferingStreamSubscription._close (dart:async/stream_impl.dart:305:7)
E/flutter (26606): #9      _SyncStreamControllerDispatch._sendDone (dart:async/stream_controller.dart:816:19)
E/flutter (26606): #10     _StreamController._closeUnchecked (dart:async/stream_controller.dart:671:7)
E/flutter (26606): #11     _StreamController.close (dart:async/stream_controller.dart:664:5)
E/flutter (26606): #12     new _WebSocketImpl._fromSocket.<anonymous closure> (dart:_http/websocket_impl.dart:1172:19)
E/flutter (26606): #13     _rootRun (dart:async/zone.dart:1182:47)
E/flutter (26606): #14     _CustomZone.run (dart:async/zone.dart:1093:19)
E/flutter (26606): #15     _CustomZone.runGuarded (dart:async/zone.dart:997:7)
E/flutter (26606): #16     _BufferingStreamSubscription._sendDone.sendDone (dart:async/stream_impl.dart:410:13)
E/flutter (26606): #17     _BufferingStreamSubscription._sendDone (dart:async/stream_impl.dart:420:15)
E/flutter (26606): #18     _BufferingStreamSubscription._close (dart:async/stream_impl.dart:305:7)
E/flutter (26606): #19     _SinkTransformerStreamSubscription._close (dart:async/stream_transformers.dart:97:11)
E/flutter (26606): #20     _EventSinkWrapper.close (dart:async/stream_transformers.dart:23:11)
E/flutter (26606): #21     _WebSocketProtocolTransformer.close (dart:_http/websocket_impl.dart:122:17)
E/flutter (26606): #22     _SinkTransformerStreamSubscription._handleDone (dart:async/stream_transformers.dart:142:24)
E/flutter (26606): #23     _rootRun (dart:async/zone.dart:1182:47)
E/flutter (26606): #24     _CustomZone.run (dart:async/zone.dart:1093:19)
E/flutter (26606): #25     _CustomZone.runGuarded (dart:async/zone.dart:997:7)
E/flutter (26606): #26     _BufferingStreamSubscription._sendDone.sendDone (dart:async/stream_impl.dart:410:13)
E/flutter (26606): #27     _BufferingStreamSubscription._sendDone (dart:async/stream_impl.dart:420:15)
E/flutter (26606): #28     _BufferingStreamSubscription._close (dart:async/stream_impl.dart:305:7)
E/flutter (26606): #29     _SyncStreamControllerDispatch._sendDone (dart:async/stream_controller.dart:816:19)
E/flutter (26606): #30     _StreamController._closeUnchecked (dart:async/stream_controller.dart:671:7)
E/flutter (26606): #31     _StreamController.close (dart:async/stream_controller.dart:664:5)
E/flutter (26606): #32     _Socket._onData (dart:io-patch/socket_patch.dart:2051:21)
E/flutter (26606): #33     _rootRunUnary (dart:async/zone.dart:1206:13)
E/flutter (26606): #34     _CustomZone.runUnary (dart:async/zone.dart:1100:19)
E/flutter (26606): #35     _CustomZone.runUnaryGuarded (dart:async/zone.dart:1005:7)
E/flutter (26606): #36     _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:357:11)
E/flutter (26606): #37     _BufferingStreamSubscription._add (dart:async/stream_impl.dart:285:7)
E/flutter (26606): #38     _SyncStreamControllerDispatch._sendData (dart:async/stream_controller.dart:808:19)
E/flutter (26606): #39     _StreamController._add (dart:async/stream_controller.dart:682:7)
E/flutter (26606): #40     _StreamController.add (dart:async/stream_controller.dart:624:5)
E/flutter (26606): #41     new _RawSocket.<anonymous closure> (dart:io-patch/socket_patch.dart:1587:35)
E/flutter (26606): #42     _NativeSocket.issueReadEvent.issue (dart:io-patch/socket_patch.dart:1069:18)
E/flutter (26606): #43     _microtaskLoop (dart:async/schedule_microtask.dart:41:21)
E/flutter (26606): #44     _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5)
E/flutter (26606): 
E/flutter (26606): [ERROR:flutter/lib/ui/ui_dart_state.cc(177)] Unhandled Exception: Instance of 'Error'
schancel commented 3 years ago

This error was caused by a bug in the electrum client regarding the responses to pings. Unrelated to key encodings.