flutter / flutter

Flutter makes it easy and fast to build beautiful apps for mobile and beyond
https://flutter.dev
BSD 3-Clause "New" or "Revised" License
165.74k stars 27.38k forks source link

Isolate.spawn not working in Android debug mode #132731

Open XuanTung95 opened 1 year ago

XuanTung95 commented 1 year ago

Is there an existing issue for this?

Steps to reproduce

  1. Run Android app in debug mode
  2. Isolate.spawn()
  3. Unplug the usb debug cable
  4. Plug the usb debug cable again
  5. Isolate.spawn()

Expected results

Isolate.spawn should work or throw an error if not

Actual results

Step 2: Isolate works fine

Step 5: Isolate is not working, no error message is provided

Code sample

Code sample ```dart ReceivePort rPort = ReceivePort(); Isolate.spawn(_isolateEntryPoint, rPort.sendPort); void _isolateEntryPoint(SendPort sPort) { print('_isolateEntryPoint start'); } ```

Screenshots or Video

No response

Logs

No response

Flutter Doctor output

Doctor output ```console [!] Flutter (Channel stable, 3.10.6, on macOS 13.0.1 22A400 darwin-x64, locale en-VN) • Flutter version 3.10.6 on channel stable at /Users/Desktop/Develop/flutter/3.10.6/flutter ! Warning: `flutter` on your path resolves to /Users/Desktop/Develop/flutter/3.3.10/flutter/bin/flutter, which is not inside your current Flutter SDK checkout at /Users/Desktop/Develop/flutter/3.10.6/flutter. Consider adding /Users/Desktop/Develop/flutter/3.10.6/flutter/bin to the front of your path. ! Warning: `dart` on your path resolves to /Users/Desktop/Develop/flutter/3.3.10/flutter/bin/dart, which is not inside your current Flutter SDK checkout at /Users/Desktop/Develop/flutter/3.10.6/flutter. Consider adding /Users/Desktop/Develop/flutter/3.10.6/flutter/bin to the front of your path. • Upstream repository https://github.com/flutter/flutter.git • Framework revision f468f3366c (5 weeks ago), 2023-07-12 15:19:05 -0700 • Engine revision cdbeda788a • Dart version 3.0.6 • DevTools version 2.23.1 • If those were intentional, you can disregard the above warnings; however it is recommended to use "git" directly to perform update checks and upgrades. [!] Android toolchain - develop for Android devices (Android SDK version 33.0.2) • Android SDK at /Users/xuantung/Library/Android/sdk ✗ cmdline-tools component is missing Run `path/to/sdkmanager --install "cmdline-tools;latest"` See https://developer.android.com/studio/command-line for more details. ✗ Android license status unknown. Run `flutter doctor --android-licenses` to accept the SDK licenses. See https://flutter.dev/docs/get-started/install/macos#android-setup for more details. ```
huycozy commented 1 year ago

Hi @XuanTung95 When you unplug the cable, it will be lost connection to the device. So what is your expected error message this time?

Could you cite the source for the use case you describe above? Also, please provide a complete & minimal sample code as well. Thank you!

XuanTung95 commented 1 year ago

Hi @huycozy

When you unplug the cable, it will be lost connection to the device. So what is your expected error message this time?

I unplug and then plug it again, the debug connection is lost but I can check the log in Logcat after plugging again. The problem is Isolate.spawn to start a new Isolate is not working after plugging again but does not show any error.

The code is just creating an isolate like above. You could create a button and Isolate.spawn anything to check.

huycozy commented 1 year ago

I unplug and then plug it again, the debug connection is lost but I can check the log in Logcat after plugging again.

Which log did you see from Logcat? Is it same as below?

Step 2: Isolate works fine

When I run this sample code, I see this error (before unplugging the cable): Illegal argument in isolate message: object is unsendable. There is a recent change of object kind that can be sent across isolates (see https://api.dart.dev/stable/3.0.0/dart-isolate/SendPort/send.html and https://github.com/dart-lang/sdk/commit/67683c39)

Output log ```console E/flutter ( 5541): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: Invalid argument(s): Illegal argument in isolate message: object is unsendable - Library:'dart:async' Class: _AsyncCompleter@4048458 (see restrictions listed at `SendPort.send()` documentation for more information) E/flutter ( 5541): <- Instance of 'WidgetsFlutterBinding' (from package:flutter/src/widgets/binding.dart) E/flutter ( 5541): <- Instance of '_BindingPipelineManifold' (from package:flutter/src/rendering/binding.dart) E/flutter ( 5541): <- _manifold in Instance of 'PipelineOwner' (from package:flutter/src/rendering/object.dart) E/flutter ( 5541): <- Instance of '_RenderSnapshotWidget' (from package:flutter/src/widgets/snapshot_widget.dart) E/flutter ( 5541): <- field this in RenderObject.markNeedsPaint (from package:flutter/src/rendering/object.dart) E/flutter ( 5541): <- _List len:1 (from dart:core) E/flutter ( 5541): <- scale in Instance of '_ZoomExitTransitionPainter' (from package:flutter/src/material/page_transitions_theme.dart) E/flutter ( 5541): <- field this in _ZoomExitTransitionPainter._onStatusChange (from package:flutter/src/material/page_transitions_theme.dart) E/flutter ( 5541): <- _List len:3 (from dart:core) E/flutter ( 5541): <- Instance(length:2) of '_GrowableList' (from dart:core) E/flutter ( 5541): <- _isDirty in Instance of 'ObserverList<(AnimationStatus) => void>' (from package:flutter/src/foundation/observer_list.dart) E/flutter ( 5541): <- Instance of 'ProxyAnimation' (from package:flutter/src/animation/animations.dart) E/flutter ( 5541): <- field this in AnimationLocalStatusListenersMixin.notifyStatusListeners (from package:flutter/src/animation/animations.dart) E/flutter ( 5541): <- _List len:3 (from dart:core) E/flutter ( 5541): <- Instance(length:1) of '_GrowableList' (from dart:core) E/flutter ( 5541): <- _isDirty in Instance of 'ObserverList<(AnimationStatus) => void>' (from package:flutter/src/foundation/observer_list.dart) E/flutter ( 5541): <- Instance of 'ReverseAnimation' (from package:flutter/src/animation/animations.dart) E/flutter ( 5541): <- field this in ReverseAnimation._statusChangeHandler (from package:flutter/src/animation/animations.dart) E/flutter ( 5541): <- _List len:3 (from dart:core) E/flutter ( 5541): <- Instance(length:2) of '_GrowableList' (from dart:core) E/flutter ( 5541): <- _isDirty in Instance of 'ObserverList<(AnimationStatus) => void>' (from package:flutter/src/foundation/observer_list.dart) E/flutter ( 5541): <- Instance of 'ReverseAnimation' (from package:flutter/src/animation/animations.dart) E/flutter ( 5541): <- field this in ReverseAnimation._statusChangeHandler (from package:flutter/src/animation/animations.dart) E/flutter ( 5541): <- _List len:3 (from dart:core) E/flutter ( 5541): <- Instance(length:1) of '_GrowableList' (from dart:core) E/flutter ( 5541): <- _isDirty in Instance of 'ObserverList<(AnimationStatus) => void>' (from package:flutter/src/foundation/observer_list.dart) E/flutter ( 5541): <- Instance of 'ProxyAnimation' (from package:flutter/src/animation/animations.dart) E/flutter ( 5541): <- _List len:3 (from dart:core) E/flutter ( 5541): <- Instance(length:2) of '_GrowableList' (from dart:core) E/flutter ( 5541): <- _children in Instance of '_MergingListenable' (from package:flutter/src/foundation/change_notifier.dart) E/flutter ( 5541): <- Instance of '_ModalScopeState' (from package:flutter/src/widgets/routes.dart) E/flutter ( 5541): <- field this in _ModalScopeState.build.. (from package:flutter/src/widgets/routes.dart) E/flutter ( 5541): <- Instance of 'Builder' (from package:flutter/src/widgets/basic.dart) E/flutter ( 5541): <- Instance of 'StatelessElement' (from package:flutter/src/widgets/framework.dart) E/flutter ( 5541): <- Instance of 'SingleChildRenderObjectElement' (from package:flutter/src/widgets/framework.dart) E/flutter ( 5541): <- Instance of 'SingleChildRenderObjectElement' (from package:flutter/src/widgets/framework.dart) E/flutter ( 5541): <- Instance of 'StatefulElement' (from package:flutter/src/widgets/framework.dart) E/flutter ( 5541): <- Instance of '_AnimatedState' (from package:flutter/src/widgets/transitions.dart) E/flutter ( 5541): <- field this in _AnimatedState._handleChange (from package:flutter/src/widgets/transitions.dart) E/flutter ( 5541): <- _List len:1 (from dart:core) E/flutter ( 5541): <- Instance of 'ValueNotifier' (from package:flutter/src/foundation/change_notifier.dart) E/flutter ( 5541): <- Instance of 'NavigatorState' (from package:flutter/src/widgets/navigator.dart) E/flutter ( 5541): <- Instance of 'StatefulElement' (from package:flutter/src/widgets/framework.dart) E/flutter ( 5541): <- value in Instance of '_HashMapEntry' (from dart:collection) E/flutter ( 5541): <- _List len:8 (from dart:core) E/flutter ( 5541): <- _buckets in Instance of '_HashMap' (from dart:collection) E/flutter ( 5541): <- Instance of 'InheritedElement' (from package:flutter/src/widgets/framework.dart) E/flutter ( 5541): <- Instance of 'StatefulElement' (from package:flutter/src/widgets/framework.dart) E/flutter ( 5541): <- Instance of 'InheritedElement' (from package:flutter/src/widgets/framework.dart) E/flutter ( 5541): <- Instance of 'StatefulElement' (from package:flutter/src/widgets/framework.dart) E/flutter ( 5541): <- Instance of 'StatefulElement' (from package:flutter/src/widgets/framework.dart) E/flutter ( 5541): <- Instance of 'SingleChildRenderObjectElement' (from package:flutter/src/widgets/framework.dart) E/flutter ( 5541): <- Instance of '_InheritedNotifierElement' (from package:flutter/src/widgets/inherited_notifier.dart) E/flutter ( 5541): <- Instance of 'StatefulElement' (from package:flutter/src/widgets/framework.dart) E/flutter ( 5541): <- _hasKeyboardToken in Instance of 'FocusNode' (from package:flutter/src/widgets/focus_manager.dart) E/flutter ( 5541): <- Instance of 'FocusNode' (from package:flutter/src/widgets/focus_manager.dart) E/flutter ( 5541): <- Instance of 'FocusNode' (from package:flutter/src/widgets/focus_manager.dart) E/flutter ( 5541): <- Instance of '_FocusTraversalGroupNode' (from package:flutter/src/widgets/focus_traversal.dart) E/flutter ( 5541): <- Instance of 'FocusNode' (from package:flutter/src/widgets/focus_manager.dart) E/flutter ( 5541): <- Instance of 'FocusScopeNode' (from package:flutter/src/widgets/focus_manager.dart) E/flutter ( 5541): <- Instance of '_FocusTraversalGroupNode' (from package:flutter/src/widgets/focus_traversal.dart) E/flutter ( 5541): <- Instance of 'FocusNode' (from package:flutter/src/widgets/focus_manager.dart) E/flutter ( 5541): <- Instance of 'FocusScopeNode' (from package:flutter/src/widgets/focus_manager.dart) E/flutter ( 5541): <- Instance of 'FocusNode' (from package:flutter/src/widgets/focus_manager.dart) E/flutter ( 5541): <- _descendantsWereTraversable in Instance of '_FocusState' (from package:flutter/src/widgets/focus_scope.dart) E/flutter ( 5541): <- Instance of 'StatefulElement' (from package:flutter/src/widgets/framework.dart) E/flutter ( 5541): <- Instance of 'InheritedElement' (from package:flutter/src/widgets/framework.dart) E/flutter ( 5541): <- Instance of 'StatefulElement' (from package:flutter/src/widgets/framework.dart) E/flutter ( 5541): <- Instance of '_ActionsState' (from package:flutter/src/widgets/actions.dart) E/flutter ( 5541): <- field this in _ActionsState._handleActionChanged (from package:flutter/src/widgets/actions.dart) E/flutter ( 5541): <- _List len:3 (from dart:core) E/flutter ( 5541): <- Instance(length:1) of '_GrowableList' (from dart:core) E/flutter ( 5541): <- _isDirty in Instance of 'ObserverList<(Action) => void>' (from package:flutter/src/foundation/observer_list.dart) E/flutter ( 5541): <- Instance of 'CallbackAction' (from package:flutter/src/widgets/actions.dart) E/flutter ( 5541): <- _List len:8 (from dart:core) E/flutter ( 5541): <- _Map len:2 (from dart:collection) E/flutter ( 5541): <- Instance of '_InkResponseState' (from package:flutter/src/material/ink_well.dart) E/flutter ( 5541): <- field this in _InkResponseState._createSplash.onRemoved (from package:flutter/src/material/ink_well.dart) E/flutter ( 5541): <- splashFactory in Instance of 'InkSparkle' (from package:flutter/src/material/ink_sparkle.dart) E/flutter ( 5541): <- field this in InkSparkle._handleStatusChanged (from package:flutter/src/material/ink_sparkle.dart) E/flutter ( 5541): <- _List len:3 (from dart:core) E/flutter ( 5541): <- Instance(length:1) of '_GrowableList' (from dart:core) E/flutter ( 5541): <- _isDirty in Instance of 'ObserverList<(AnimationStatus) => void>' (from package:flutter/src/foundation/observer_list.dart) E/flutter ( 5541): <- Instance of 'AnimationController' (from package:flutter/src/animation/animation_controller.dart) E/flutter ( 5541): <- field this in AnimationController._tick (from package:flutter/src/animation/animation_controller.dart) E/flutter ( 5541): <- Instance of '_WidgetTicker' (from package:flutter/src/widgets/ticker_provider.dart) E/flutter ( 5541): <- _List len:4 (from dart:core) E/flutter ( 5541): <- _Set len:1 (from dart:collection) E/flutter ( 5541): <- Instance of '_MaterialState' (from package:flutter/src/material/material.dart) E/flutter ( 5541): <- field this in TickerProviderStateMixin._updateTickers (from package:flutter/src/material/material.dart) E/flutter ( 5541): <- _List len:4 (from dart:core) E/flutter ( 5541): <- Instance of 'ValueNotifier' (from package:flutter/src/foundation/change_notifier.dart) E/flutter ( 5541): <- Instance of '_TickerModeState' (from package:flutter/src/widgets/ticker_provider.dart) E/flutter ( 5541): <- Instance of 'StatefulElement' (from package:flutter/src/widgets/framework.dart) E/flutter ( 5541): <- Instance of '_OffstageElement' (from package:flutter/src/widgets/basic.dart) E/flutter ( 5541): <- Instance of 'SingleChildRenderObjectElement' (from package:flutter/src/widgets/framework.dart) E/flutter ( 5541): <- Instance of 'StatefulElement' (from package:flutter/src/widgets/framework.dart) E/flutter ( 5541): <- Instance of 'SingleChildRenderObjectElement' (from package:flutter/src/widgets/framework.dart) E/flutter ( 5541): <- Instance of 'StatelessElement' (from package:flutter/src/widgets/framework.dart) E/flutter ( 5541): <- Instance of 'SingleChildRenderObjectElement' (from package:flutter/src/widgets/framework.dart) E/flutter ( 5541): <- Instance of 'StatefulElement' (from package:flutter/src/widgets/framework.dart) E/flutter ( 5541): <- Instance of '_AnimatedState' (from package:flutter/src/widgets/transitions.dart) E/flutter ( 5541): <- field this in _AnimatedState._handleChange (from package:flutter/src/widgets/transitions.dart) E/flutter ( 5541): <- _List len:3 (from dart:core) E/flutter ( 5541): <- Instance(length:1) of '_GrowableList' (from dart:core) E/flutter ( 5541): <- _isDirty in Instance of 'ObserverList<() => void>' (from package:flutter/src/foundation/observer_list.dart) E/flutter ( 5541): <- _nextTrain in Instance of 'TrainHoppingAnimation' (from package:flutter/src/animation/animations.dart) E/flutter ( 5541): <- Instance of '_FloatingActionButtonTransitionState' (from package:flutter/src/material/scaffold.dart) E/flutter ( 5541): <- Instance of '_WidgetTicker' (from package:flutter/src/widgets/ticker_provider.dart) E/flutter ( 5541): <- Instance of 'AnimationController' (from package:flutter/src/animation/animation_controller.dart) E/flutter ( 5541): <- curve in Instance of 'CurvedAnimation' (from package:flutter/src/animation/animations.dart) E/flutter ( 5541): <- Instance of 'AnimationMin' (from package:flutter/src/animation/animations.dart) E/flutter ( 5541): <- field this in CompoundAnimation._maybeNotifyStatusListeners (from package:flutter/src/animation/animations.dart) E/flutter ( 5541): <- _List len:3 (from dart:core) E/flutter ( 5541): <- Instance(length:2) of '_GrowableList' (from dart:core) E/flutter ( 5541): <- _isDirty in Instance of 'ObserverList<(AnimationStatus) => void>' (from package:flutter/src/foundation/observer_list.dart) E/flutter ( 5541): <- Instance of '_AnimationSwap' (from package:flutter/src/material/floating_action_button_location.dart) E/flutter ( 5541): <- Instance of 'AnimationMin' (from package:flutter/src/animation/animations.dart) E/flutter ( 5541): <- field this in CompoundAnimation._maybeNotifyStatusListeners (from package:flutter/src/animation/animations.dart) E/flutter ( 5541): <- hashCode in Instance of '_HashSetEntry<(AnimationStatus) => void>' (from dart:collection) E/flutter ( 5541): <- _List len:8 (from dart:core) E/flutter ( 5541): <- _buckets in Instance of '_HashSet<(AnimationStatus) => void>' (from dart:collection) E/flutter ( 5541): <- Instance of 'ObserverList<(AnimationStatus) => void>' (from package:flutter/src/foundation/observer_list.dart) E/flutter ( 5541): <- Instance of 'AnimationController' (from package:flutter/src/animation/animation_controller.dart) E/flutter ( 5541): <- Instance of 'ScaffoldState' (from package:flutter/src/material/scaffold.dart) E/flutter ( 5541): <- Instance of 'StatefulElement' (from package:flutter/src/widgets/framework.dart) E/flutter ( 5541): <- Instance of 'StatefulElement' (from package:flutter/src/widgets/framework.dart) E/flutter ( 5541): <- Instance of '_MyWidgetState' (from package:reproduce_issues/main.dart) E/flutter ( 5541): <- field this in _MyWidgetState._isolateEntryPoint (from package:reproduce_issues/main.dart) E/flutter ( 5541): E/flutter ( 5541): #0 Isolate._spawnFunction (dart:isolate-patch/isolate_patch.dart:398:25) E/flutter ( 5541): #1 Isolate.spawn (dart:isolate-patch/isolate_patch.dart:378:7) E/flutter ( 5541): #2 _MyWidgetState.build. (package:reproduce_issues/main.dart:30:23) E/flutter ( 5541): #3 _InkResponseState.handleTap (package:flutter/src/material/ink_well.dart:1154:21) E/flutter ( 5541): #4 GestureRecognizer.invokeCallback (package:flutter/src/gestures/recognizer.dart:275:24) E/flutter ( 5541): #5 TapGestureRecognizer.handleTapUp (package:flutter/src/gestures/tap.dart:654:11) E/flutter ( 5541): #6 BaseTapGestureRecognizer._checkUp (package:flutter/src/gestures/tap.dart:311:5) E/flutter ( 5541): #7 BaseTapGestureRecognizer.handlePrimaryPointer (package:flutter/src/gestures/tap.dart:244:7) E/flutter ( 5541): #8 PrimaryPointerGestureRecognizer.handleEvent (package:flutter/src/gestures/recognizer.dart:630:9) E/flutter ( 5541): #9 PointerRouter._dispatch (package:flutter/src/gestures/pointer_router.dart:98:12) E/flutter ( 5541): #10 PointerRouter._dispatchEventToRoutes. (package:flutter/src/gestures/pointer_router.dart:143:9) E/flutter ( 5541): #11 _LinkedHashMapMixin.forEach (dart:collection-patch/compact_hash.dart:625:13) E/flutter ( 5541): #12 PointerRouter._dispatchEventToRoutes (package:flutter/src/gestures/pointer_router.dart:141:18) E/flutter ( 5541): #13 PointerRouter.route (package:flutter/src/gestures/pointer_router.dart:127:7) E/flutter ( 5541): #14 GestureBinding.handleEvent (package:flutter/src/gestures/binding.dart:488:19) E/flutter ( 5541): #15 GestureBinding.dispatchEvent (package:flutter/src/gestures/binding.dart:468:22) E/flutter ( 5541): #16 RendererBinding.dispatchEvent (package:flutter/src/rendering/binding.dart:444:11) E/flutter ( 5541): #17 GestureBinding._handlePointerEventImmediately (package:flutter/src/gestures/binding.dart:413:7) E/flutter ( 5541): #18 GestureBinding.handlePointerEvent (package:flutter/src/gestures/binding.dart:376:5) E/flutter ( 5541): #19 GestureBinding._flushPointerEventQueue (package:flutter/src/gestures/binding.dart:323:7) E/flutter ( 5541): #20 GestureBinding._handlePointerDataPacket (package:flutter/src/gestures/binding.dart:292:9) E/flutter ( 5541): #21 _invoke1 (dart:ui/hooks.dart:329:13) E/flutter ( 5541): #22 PlatformDispatcher._dispatchPointerDataPacket (dart:ui/platform_dispatcher.dart:377:7) E/flutter ( 5541): #23 _dispatchPointerDataPacket (dart:ui/hooks.dart:262:31) E/flutter ( 5541): ```
Complete sample code ```dart import 'dart:isolate'; import 'package:flutter/material.dart'; void main() { runApp( MaterialApp( theme: ThemeData(useMaterial3: true), home: const MyWidget(), ), ); } class MyWidget extends StatefulWidget { const MyWidget({super.key}); @override State createState() => _MyWidgetState(); } class _MyWidgetState extends State { @override Widget build(BuildContext context) { return Scaffold( body: const Center( child: Text('hello'), ), floatingActionButton: FloatingActionButton(onPressed: () async { ReceivePort rPort = ReceivePort(); await Isolate.spawn(_isolateEntryPoint, rPort.sendPort); }), ); } void _isolateEntryPoint(SendPort sPort) { print('_isolateEntryPoint start'); } } ```
XuanTung95 commented 1 year ago

@huycozy

No, Your code is wrong. Here is full code:

import 'dart:isolate';

import 'package:flutter/material.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
        useMaterial3: true,
      ),
      home: const MyHomePage(title: 'Flutter Demo Home Page'),
    );
  }
}

class MyHomePage extends StatefulWidget {
  const MyHomePage({super.key, required this.title});

  final String title;

  @override
  State<MyHomePage> createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  int _counter = 0;

  _incrementCounter() async {
    ReceivePort rPort = ReceivePort();
    print('Call Isolate.spawn');
    try {
      final ret = await Isolate.spawn(_isolateEntryPoint, rPort.sendPort);
    } catch (e, st) {
      print('Call Isolate.spawn $e, $st');
    }
    setState(() {
      _counter++;
    });
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        backgroundColor: Theme.of(context).colorScheme.inversePrimary,
        title: Text(widget.title),
      ),
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            const Text(
              'You have pushed the button this many times:',
            ),
            Text(
              '$_counter',
              style: Theme.of(context).textTheme.headlineMedium,
            ),
          ],
        ),
      ),
      floatingActionButton: FloatingActionButton(
        onPressed: _incrementCounter,
        tooltip: 'Increment',
        child: const Icon(Icons.add),
      ), // This trailing comma makes auto-formatting nicer for build methods.
    );
  }
}

void _isolateEntryPoint(SendPort sPort) {
  print('_isolateEntryPoint start');
}

flutter 3.13.0 Android compileSdkVersion 33

After unplug/plug open logcat and click button -> Only "Call Isolate.spawn" is show, _isolateEntryPoint is not called

huycozy commented 1 year ago

Thanks. I can reproduce it now. When reconnected again, there is only log flutter : Call Isolate.spawn from logcat. But I'm not sure if this is feasible to expose error message to logcat in this case. Labeling the issue for more opinions.

flutter doctor -v (stable and master) ```bash [✓] Flutter (Channel stable, 3.13.0, on macOS 13.5 22G74 darwin-x64, locale en-VN) • Flutter version 3.13.0 on channel stable at /Users/huynq/Documents/GitHub/flutter • Upstream repository https://github.com/flutter/flutter.git • Framework revision efbf63d9c6 (25 hours ago), 2023-08-15 21:05:06 -0500 • Engine revision 1ac611c64e • Dart version 3.1.0 • DevTools version 2.25.0 [✓] Android toolchain - develop for Android devices (Android SDK version 32.0.0) • Android SDK at /Users/huynq/Library/Android/sdk • Platform android-33, build-tools 32.0.0 • ANDROID_HOME = /Users/huynq/Library/Android/sdk • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b802.4-9586694) • All Android licenses accepted. [✓] Xcode - develop for iOS and macOS (Xcode 14.3) • Xcode at /Applications/Xcode.app/Contents/Developer • Build 14E222b • CocoaPods version 1.11.3 [✓] Chrome - develop for the web • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome [✓] Android Studio (version 2022.2) • Android Studio at /Applications/Android Studio.app/Contents • Flutter plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/9212-flutter • Dart plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/6351-dart • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b802.4-9586694) [✓] VS Code (version 1.81.0) • VS Code at /Applications/Visual Studio Code.app/Contents • Flutter extension version 3.70.0 [✓] Connected device (3 available) • iPhone (mobile) • d9a94afe2b649fef56ba0bfeb052f0f2a7dae95e • ios • iOS 15.7.2 19H218 • macOS (desktop) • macos • darwin-x64 • macOS 13.5 22G74 darwin-x64 • Chrome (web) • chrome • web-javascript • Google Chrome 116.0.5845.96 [✓] Network resources • All expected network resources are available. • No issues found! ``` ```bash [!] Flutter (Channel master, 3.14.0-7.0.pre.19, on macOS 13.5 22G74 darwin-x64, locale en-VN) • Flutter version 3.14.0-7.0.pre.19 on channel master at /Users/huynq/Documents/GitHub/flutter_master ! Warning: `flutter` on your path resolves to /Users/huynq/Documents/GitHub/flutter/bin/flutter, which is not inside your current Flutter SDK checkout at /Users/huynq/Documents/GitHub/flutter_master. Consider adding /Users/huynq/Documents/GitHub/flutter_master/bin to the front of your path. ! Warning: `dart` on your path resolves to /Users/huynq/Documents/GitHub/flutter/bin/dart, which is not inside your current Flutter SDK checkout at /Users/huynq/Documents/GitHub/flutter_master. Consider adding /Users/huynq/Documents/GitHub/flutter_master/bin to the front of your path. • Upstream repository https://github.com/flutter/flutter.git • Framework revision 03664d0acb (19 minutes ago), 2023-08-18 04:58:20 +0200 • Engine revision 866b43f656 • Dart version 3.2.0 (build 3.2.0-83.0.dev) • DevTools version 2.26.1 • If those were intentional, you can disregard the above warnings; however it is recommended to use "git" directly to perform update checks and upgrades. [✓] Android toolchain - develop for Android devices (Android SDK version 32.0.0) • Android SDK at /Users/huynq/Library/Android/sdk • Platform android-33, build-tools 32.0.0 • ANDROID_HOME = /Users/huynq/Library/Android/sdk • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b802.4-9586694) • All Android licenses accepted. [✓] Xcode - develop for iOS and macOS (Xcode 14.3) • Xcode at /Applications/Xcode.app/Contents/Developer • Build 14E222b • CocoaPods version 1.11.3 [✓] Chrome - develop for the web • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome [✓] Android Studio (version 2022.2) • Android Studio at /Applications/Android Studio.app/Contents • Flutter plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/9212-flutter • Dart plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/6351-dart • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b802.4-9586694) [✓] VS Code (version 1.81.0) • VS Code at /Applications/Visual Studio Code.app/Contents • Flutter extension version 3.70.0 [✓] Connected device (3 available) • RMX2001 (mobile) • EUYTFEUSQSRGDA6D • android-arm64 • Android 11 (API 30) • macOS (desktop) • macos • darwin-x64 • macOS 13.5 22G74 darwin-x64 • Chrome (web) • chrome • web-javascript • Google Chrome 116.0.5845.96 [✓] Network resources • All expected network resources are available. ! Doctor found issues in 1 category. ```
gmackall commented 1 year ago

FYI there was a discussion around isolates recently in discord, not sure if it is related though: https://discord.com/channels/608014603317936148/1139665451727720469