Skip to content

Flutter app spawns with two isolates, hot reload fails with Error 105: Isolate must be runnable #26953

@DanTup

Description

@DanTup

Moving this from Dart-Code/Dart-Code#1365

I don't have a repro I can run locally (but trying to get one). The issue was reported some time ago by a user and then again to me this week. The user launches a Flutter app and receives "Isolate must be runnable" when trying to Hot Reload. It happens both in VS Code and from the command line.

I believe it's related to there being two isolates when the app starts up (I've only ever seen this in these logs). In VS Code we assume the first isolate is the one we want to use, but when Flutter hot reloads it seems to pick the other one (which has a pauseEvent.kind of None and is not runnable - it also has no rootLib).

The app is started paused so we can send breakpoints before resuming, so at this point I believe no user code has run. Here are responses for getVM and getIsolate.

https://gist.github.com/DanTup/25c9032fd7f1c6606b1d7c807d55cf54#file-vm-js
https://gist.github.com/DanTup/25c9032fd7f1c6606b1d7c807d55cf54#file-first_isolate-js
https://gist.github.com/DanTup/25c9032fd7f1c6606b1d7c807d55cf54#file-second_isolate-js

This only happens for a specific project so may be related to dependencies or plugins. Here's the deps:

unnamed

I don't think the user is on GitHub, but I'll post more info as I can get it (I'm trying to get a minimal repro that can be shared).

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work listc: crashStack traces logged to the consolet: hot reloadReloading code during "flutter run"toolAffects the "flutter" command-line tool. See also t: labels.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions