You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I'm getting the above error as I try to introduce 'effects' to one of my messages for http calls. (The program before this change worked fine just dealing with Model changes.)
The stack trace doesn't refer directly to my codes, so I'm a bit lost what to fix, so your help will be much appreciated.
FYI. Someone on the internet thought the following lines in Dartea's widget.dart might be the issue, because "our onError handler is passed Errors and Exceptions, but you strictly restrict it to Exceptions, that's the problem." but I'm not sure if it's right or not.
[ +76 ms] E/flutter ( 1913): [ERROR:flutter/lib/ui/ui_dart_state.cc(157)] Unhandled Exception: type '_TypeError' is not a subtype of type 'Exception'
[ +2 ms] E/flutter ( 1913): #0 _DrateaProgramState.initState.<anonymous closure> (package:dartea/src/widget.dart:68:53)
[ ] E/flutter ( 1913): #1 _invokeErrorHandler (dart:async/async_error.dart:16:37)
typedef OnError = void Function(StackTrace stacktrace, Exception exception); in package:dartea/src/widget.dart:68:53 should change to typedef OnError = void Function(StackTrace stacktrace, dynamic exceptionOrError); to fix it.
Hi, I'm getting the above error as I try to introduce 'effects' to one of my messages for http calls. (The program before this change worked fine just dealing with Model changes.)
The stack trace doesn't refer directly to my codes, so I'm a bit lost what to fix, so your help will be much appreciated.
FYI. Someone on the internet thought the following lines in Dartea's widget.dart might be the issue, because "our onError handler is passed Errors and Exceptions, but you strictly restrict it to Exceptions, that's the problem." but I'm not sure if it's right or not.
E/flutter ( 541): [ERROR:flutter/shell/common/shell.cc(186)] Dart Error: Unhandled exception:
E/flutter ( 541): type 'NoSuchMethodError' is not a subtype of type 'Exception'
E/flutter ( 541): #0 _DrateaProgramState.initState.
../…/src/widget.dart:68
E/flutter ( 541): #1 _invokeErrorHandler (dart:async/async_error.dart:14:37)
E/flutter ( 541): #2 _HandleErrorStream._handleError (dart:async/stream_pipe.dart:286:9)
E/flutter ( 541): #3 _ForwardingStreamSubscription._handleError (dart:async/stream_pipe.dart:168:13)
E/flutter ( 541): #4 _RootZone.runBinaryGuarded (dart:async/zone.dart:1326:10)
E/flutter ( 541): #5 _BufferingStreamSubscription._sendError.sendError (dart:async/stream_impl.dart:355:15)
E/flutter ( 541): #6 _BufferingStreamSubscription._sendError (dart:async/stream_impl.dart:373:16)
E/flutter ( 541): #7 _BufferingStreamSubscription._addError (dart:async/stream_impl.dart:272:7)
E/flutter ( 541): #8 _SyncStreamController._sendError (dart:async/stream_controller.dart:768:19)
E/flutter ( 541): #9 _StreamController._addError (dart:async/stream_controller.dart:648:7)
E/flutter ( 541): #10 _StreamController.addError (dart:async/stream_controller.dart:600:5)
E/flutter ( 541): #11 _RootZone.runBinaryGuarded (dart:async/zone.dart:1326:10)
E/flutter ( 541): #12 _BufferingStreamSubscription._sendError.sendError (dart:async/stream_impl.dart:355:15)
E/flutter ( 541): #13 _BufferingStreamSubscription._sendError (dart:async/stream_impl.dart:373:16)
E/flutter ( 541): #14 _BufferingStreamSubscription._addError (dart:async/stream_impl.dart:272:7)
E/flutter ( 541): #15 _ForwardingStreamSubscription._addError (dart:async/stream_pipe.dart:137:11)
E/flutter ( 541): #16 _ForwardingStream._handleError (dart:async/stream_pipe.dart:102:10)
E/flutter ( 541): #17 _ForwardingStreamSubscription._handleError (dart:async/stream_pipe.dart:168:13)
E/flutter ( 541): #18 _RootZone.runBinaryGuarded (dart:async/zone.dart:1326:10)
E/flutter ( 541): #19 _BufferingStreamSubscription._sendError.sendError (dart:async/stream_impl.dart:355:15)
E/flutter ( 541): #20 _BufferingStreamSubscription._sendError (dart:async/stream_impl.dart:373:16)
E/flutter ( 541): #21 _BufferingStreamSubscription._addError (dart:async/stream_impl.dart:272:7)
E/flutter ( 541): #22 _ForwardingStreamSubscription._addError (dart:async/stream_pipe.dart:137:11)
E/flutter ( 541): #23 _addErrorWithReplacement (dart:async/stream_pipe.dart:188:8)
E/flutter ( 541): #24 _MapStream._handleData (dart:async/stream_pipe.dart:229:7)
E/flutter ( 541): #25 _ForwardingStreamSubscription._handleData (dart:async/stream_pipe.dart:164:13)
E/flutter ( 541): #26 _RootZone.runUnaryGuarded (dart:async/zone.dart:1314:10)
E/flutter ( 541): #27 _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:336:11)
E/flutter ( 541): #28 _DelayedData.perform (dart:async/stream_impl.dart:591:14)
E/flutter ( 541): #29 _StreamImplEvents.handleNext (dart:async/stream_impl.dart:707:11)
E/flutter ( 541): #30 _PendingEvents.schedule. (dart:async/stream_impl.dart:667:7)
E/flutter ( 541): #31 _microtaskLoop (dart:async/schedule_microtask.dart:41:21)
E/flutter ( 541): #32 _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5)
Here are the relevant parts of my code.
class FetchHttp implements Message {}
...
....
....
The text was updated successfully, but these errors were encountered: