lubritto / easy_isolate

An abstraction of isolates providing an easy way to work with different threads
https://pub.dev/packages/easy_isolate
Apache License 2.0
11 stars 3 forks source link

Worker.init.<anonymous closure> #6

Open mohamedahmedhassan00 opened 2 years ago

mohamedahmedhassan00 commented 2 years ago

E/flutter ( 3491): [ERROR:flutter/lib/ui/ui_dart_state.cc(209)] Unhandled Exception: Invalid argument(s): Illegal argument in isolate message: (object extends NativeWrapper - Library:'dart:io' Class: _NativeSocket@13069316) E/flutter ( 3491): #0 _SendPortImpl._sendInternal (dart:isolate-patch/isolate_patch.dart:249:43) E/flutter ( 3491): #1 _SendPortImpl.send (dart:isolate-patch/isolate_patch.dart:230:5) E/flutter ( 3491): #2 Worker.init. (package:easy_isolate/src/worker.dart:123:28) E/flutter ( 3491): #3 Worker.init. (package:easy_isolate/src/worker.dart:117:29) E/flutter ( 3491): #4 _rootRunUnary (dart:async/zone.dart:1444:13) E/flutter ( 3491): #5 _CustomZone.runUnary (dart:async/zone.dart:1335:19) E/flutter ( 3491): #6 _CustomZone.runUnaryGuarded (dart:async/zone.dart:1244:7) E/flutter ( 3491): #7 _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:341:11) E/flutter ( 3491): #8 _BufferingStreamSubscription._add (dart:async/stream_impl.dart:271:7) E/flutter ( 3491): #9 _SyncStreamControllerDispatch._sendData (dart:async/stream_controller.dart:733:19) E/flutter ( 3491): #10 _StreamController._add (dart:async/stream_controller.dart:607:7) E/flutter ( 3491): #11 _StreamController.add (dart:async/stream_controller.dart:554:5) E/flutter ( 3491): #12 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:192:12)

lubritto commented 2 years ago

@mohamedahmedhassan00 Hey, are you trying to use it for web projects?

Dev-Owl commented 2 years ago

Got the same Exception on Mac

WiRight commented 1 year ago

Think you trying to send in isolate a WebSocket connection?

What about connect to ws in isolate?