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
{{ message }}
Repository navigation
Flutter app spawns with two isolates, hot reload fails with Error 105: Isolate must be runnable #26953
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.
Yeah, this is the same error as #26842, though the alarm manager isn't in this project. I wonder if there's something similar in this project that's the cause. Hoping to get a small repro.
I'm experiencing the same issue. Everything was fine previously and not quite sure what's changed before it stopped working. Tried pretty much everything now. Rolling back flutter, changing to master branch, etc..
Here is the error message I'm having:
Initializing hot reload... ⣽Error 105 received from application: Isolate must be runnable
Unhandled exception:
{code: 105, message: Isolate must be runnable, data: {request: {method: _reloadSources, params: {pause: false, rootLibUri: file:///Users/aleksandrkelbas/Library/Developer/CoreSimulator/Devices/1DA3FEDA-995B-4872-B1EE-7C5169030DEE/data/Containers/Data/Application/114D81FC-E9BC-4828-9DBB-25991AEB7398/tmp/fastbook_flutterQT2pVw/fastbook_flutter/lib/main.dart.incremental.dill, packagesUri: file:///Users/aleksandrkelbas/Library/Developer/CoreSimulator/Devices/1DA3FEDA-995B-4872-B1EE-7C5169030DEE/data/Containers/Data/Application/114D81FC-E9BC-4828-9DBB-25991AEB7398/tmp/fastbook_flutterQT2pVw/fastbook_flutter/.packages, isolateId: isolates/964972142}}, details: Isolate must be runnable before this request is made.}}
#0 _rootHandleUncaughtError.<anonymous closure> (dart:async/zone.dart:1112:29)#1 _microtaskLoop (dart:async/schedule_microtask.dart:41:21)#2 _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5)#3 _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:115:13)#4 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:172:5)
And here is my dependency list:
dependencies:
flutter:
sdk: flutter# The following adds the Cupertino Icons font to your application.# Use with the CupertinoIcons class for iOS style icons.cupertino_icons: ^0.1.2firebase_core: ^0.3.0cloud_firestore: ^0.9.13+1cloud_functions: ^0.1.2+1intl: ^0.15.8flutter_emoji: ^2.1.0dev_dependencies:
flutter_test:
sdk: flutter
Also, I'm attaching to an existing native project. Was working just fine before, but now flutter view isn't loading at all and trying to refresh produces this error.
I've actually just managed to fix it for my project.
Just some additional information about my circumstances for the issues:
I've had the latest flutter version crashing on me. So, I've tried different ways to fix this by switching between branches and at the end settled for older version (on the beta branch). I've used the beta branch from the start.
I've run flutter clean as well before as someone suggested doing so. This didn't help and removed my build folder. This build folder didn't autogenerate (I'm using flutter attach as this is an existing native project).
This resulted in another issue where flutter was complaining that app.dill isn't found as there was no build folder anymore.
I've tried to re-create build folder by running flutter build bundle. Don't know what this exactly does, but seemed to re-create folder.
After this flutter was attaching but this seemed to result in this Isolate issue.
I also noticed that flutter itself works just fine in other projects, so it was definitely something wrong with this project only and not flutter itself.
My fix
I've run flutter clean once again to get rid of the build folder.
I've now run flutter run which did a few things... created a build folder but then eventually failed as my project is only supposed to attach to another native one and missing native files in flutter folder.
As this created a build folder anyway, I've tried running flutter attach once again, run my project and omfg! It's now working just as before!
So flutter run seems to be creating a correct build folder for me.
Hope this helps someone else. I've spent 2 days trying to resolve this.
I had encounter this issue recently, there was two FlutterViewController in my project and call registerPlugin, By vscode IDE, when you open the debug tab, which shows two main.dart Running , when i delete each FlutterViewController one of them, this error didn't happen again, I don't know if you are same question.
When i change to flutter master, my errors stop, but in stable not works
May I ask what specific version did you test? I'm already on 1.20.3 and this issue still raising. Since I'm using cloud_messaging and some other plugins that utilize background executions, I can't be sure which plugin is responsible for this behavior.
I'm only getting this error using flutter embedding v2. Not sure how much info there is on downgrading but basically remove the flutter embedding meta-data from your Manifest file.
The MainActivity using FlutterActivity instead of FlutterEngine looks like this:
public class MainActivity extends FlutterActivity{
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
GeneratedPluginRegistrant.registerWith(this);
}
}
As part of dart-lang/sdk#36097 we have fixed issues with hot-reload and isolates (e.g. dart-lang/sdk#36648). That work should also have fixed Isolate is not runnable problems reported on helper isolates.
If this is still an issue for anyone on master branch, please file a new issue and CC me.
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.
Activity
zoechi commentedon Jan 23, 2019
Could be the same cause as #26842, #20743, #18600
DanTup commentedon Jan 23, 2019
Yeah, this is the same error as #26842, though the alarm manager isn't in this project. I wonder if there's something similar in this project that's the cause. Hoping to get a small repro.
zoechi commentedon Jan 23, 2019
I think the android_alarm_manger plugin also works with isolates.
AlexKel commentedon May 15, 2019
I'm experiencing the same issue. Everything was fine previously and not quite sure what's changed before it stopped working. Tried pretty much everything now. Rolling back flutter, changing to master branch, etc..
Here is the error message I'm having:
Initializing hot reload... ⣽Error 105 received from application: Isolate must be runnable Unhandled exception: {code: 105, message: Isolate must be runnable, data: {request: {method: _reloadSources, params: {pause: false, rootLibUri: file:///Users/aleksandrkelbas/Library/Developer/CoreSimulator/Devices/1DA3FEDA-995B-4872-B1EE-7C5169030DEE/data/Containers/Data/Application/114D81FC-E9BC-4828-9DBB-25991AEB7398/tmp/fastbook_flutterQT2pVw/fastbook_flutter/lib/main.dart.incremental.dill, packagesUri: file:///Users/aleksandrkelbas/Library/Developer/CoreSimulator/Devices/1DA3FEDA-995B-4872-B1EE-7C5169030DEE/data/Containers/Data/Application/114D81FC-E9BC-4828-9DBB-25991AEB7398/tmp/fastbook_flutterQT2pVw/fastbook_flutter/.packages, isolateId: isolates/964972142}}, details: Isolate must be runnable before this request is made.}} #0 _rootHandleUncaughtError.<anonymous closure> (dart:async/zone.dart:1112:29) #1 _microtaskLoop (dart:async/schedule_microtask.dart:41:21) #2 _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5) #3 _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:115:13) #4 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:172:5)And here is my dependency list:
AlexKel commentedon May 15, 2019
Also, I'm attaching to an existing native project. Was working just fine before, but now flutter view isn't loading at all and trying to refresh produces this error.
AlexKel commentedon May 15, 2019
I've actually just managed to fix it for my project.
Just some additional information about my circumstances for the issues:
flutter cleanas well before as someone suggested doing so. This didn't help and removed mybuildfolder. This build folder didn't autogenerate (I'm usingflutter attachas this is an existing native project).app.dillisn't found as there was nobuildfolder anymore.flutter build bundle. Don't know what this exactly does, but seemed to re-create folder.I also noticed that flutter itself works just fine in other projects, so it was definitely something wrong with this project only and not flutter itself.
My fix
flutter cleanonce again to get rid of thebuildfolder.flutter runwhich did a few things... created a build folder but then eventually failed as my project is only supposed to attach to another native one and missing native files in flutter folder.flutter attachonce again, run my project and omfg! It's now working just as before!So
flutter runseems to be creating a correctbuildfolder for me.Hope this helps someone else. I've spent 2 days trying to resolve this.
testing2007 commentedon Jun 20, 2019
I had encounter this issue recently, there was two FlutterViewController in my project and call registerPlugin, By vscode IDE, when you open the debug tab, which shows two main.dart Running , when i delete each FlutterViewController one of them, this error didn't happen again, I don't know if you are same question.
lucien-theron commentedon Jul 22, 2019
Our app constantly fails with this error when hot reloading.
This is really counter productive.
ened commentedon Sep 23, 2019
I believe we have a similar issue and it is shown in the AS logs as follows:
This happens when spawning a separate isolate in a Android
Service.shashikantshaale commentedon Jan 31, 2020
I'm facing the same issue in android.
prgwar commentedon Mar 16, 2020
Any updates on the issue
2 remaining items
lucas-sesti commentedon Apr 13, 2020
When i change to flutter master, my errors stop, but in stable not works
hazelf42 commentedon Apr 21, 2020
Having this problem as well on flutter master.
owenkealey commentedon Apr 29, 2020
Problem persists, only on Android for me though.
DrD3v commentedon May 18, 2020
With Flutter 1.17.1 and firebase_messaging 6.0.15 this no longer seems to occur.
omaryasirm commentedon May 19, 2020
Thank you so much, wasted my whole day trying to figure this thing out.
supratikkoley commentedon May 27, 2020
having same issue....any update?? i have also tried flutter v1.17.1, but it didn;t work...
firatcetiner commentedon Sep 15, 2020
May I ask what specific version did you test? I'm already on 1.20.3 and this issue still raising. Since I'm using cloud_messaging and some other plugins that utilize background executions, I can't be sure which plugin is responsible for this behavior.
AllNamesRTakn commentedon Dec 14, 2020
I'm only getting this error using flutter embedding v2. Not sure how much info there is on downgrading but basically remove the flutter embedding meta-data from your Manifest file.
The MainActivity using FlutterActivity instead of FlutterEngine looks like this:
KirillBorodin commentedon Feb 4, 2021
Fixed the issue by changing


MainActivity.ktfrom:to:
mkustermann commentedon Sep 9, 2021
As part of dart-lang/sdk#36097 we have fixed issues with hot-reload and isolates (e.g. dart-lang/sdk#36648). That work should also have fixed
Isolate is not runnableproblems reported on helper isolates.If this is still an issue for anyone on master branch, please file a new issue and CC me.
github-actions commentedon Sep 23, 2021
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.