Flutter-intellij: IntelliJ Crash with Flutter Error

Created on 12 Jul 2017  Â·  10Comments  Â·  Source: flutter/flutter-intellij


What happened

Opened new project, also happened 3 other times when I was just doing debugging on Simulator.

Version information

IntelliJ IDEA 2017.1.5 • Flutter plugin 15.1 • Dart plugin 171.4694.29

Error getting Flutter sdk information.

Exception

Flutter device daemon #3: process exited during startup. Exit code: 128, stderr:
/Users/dnetman99/flutter/bin/flutter: fork: Resource temporarily unavailable

com.intellij.execution.ExecutionException: Flutter device daemon #3: process exited during startup. Exit code: 128, stderr:
/Users/dnetman99/flutter/bin/flutter: fork: Resource temporarily unavailable

    at io.flutter.run.daemon.DeviceDaemon$Command.start(DeviceDaemon.java:222)
    at io.flutter.run.daemon.DeviceService.chooseNextDaemon(DeviceService.java:220)
    at io.flutter.utils.Refreshable.runInBackground(Refreshable.java:214)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)
bug ⌘‬ platform-mac

All 10 comments

@abbadabbatech : could you run flutter doctor and paste the results? You can run it from the command-line via flutter doctor, and from the IDE via Tools > Flutter > Flutter Doctor.

Thanks!

Last login: Wed Jul 12 10:42:57 on console
Roberts-MacBook-Pro:~ dnetman99$ open -a simulator
Roberts-MacBook-Pro:~ dnetman99$
[Restored Jul 12, 2017, 12:47:30 PM]
Last login: Wed Jul 12 12:47:28 on console
Roberts-MacBook-Pro:~ dnetman99$
Roberts-MacBook-Pro:~ dnetman99$
Roberts-MacBook-Pro:~ dnetman99$
Roberts-MacBook-Pro:~ dnetman99$ open -a simulator
Roberts-MacBook-Pro:~ dnetman99$ cd flutter/
Roberts-MacBook-Pro:flutter dnetman99$ flutter doctor
[✓] Flutter (on Mac OS X 10.12.5 16F73, locale en-US, channel alpha)
• Flutter at /Users/dnetman99/flutter
• Framework revision d36e2f6191 (3 weeks ago), 2017-06-21 15:09:10 -0700
• Engine revision b0dee695ec
• Tools Dart version 1.24.0-dev.6.7

[✓] Android toolchain - develop for Android devices (Android SDK 26.0.0)
• Android SDK at /Users/dnetman99/Library/Android/sdk
• Platform android-26, build-tools 26.0.0
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_112-release-b06)

[✓] iOS toolchain - develop for iOS devices (Xcode 8.3.3)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 8.3.3, Build version 8E3004b
• ios-deploy 1.9.1
• CocoaPods version 1.2.1

[✓] Android Studio (version 2.3)
• Android Studio at /Applications/Android Studio.app/Contents
• Gradle version 3.2
• Java version OpenJDK Runtime Environment (build 1.8.0_112-release-b06)

[✓] IntelliJ IDEA Ultimate Edition (version 2017.1.5)
• Flutter plugin version 15.1
• Dart plugin version 171.4694.29

[✓] Connected devices
• Android SDK built for x86 • emulator-5554 • android-x86 • Android 7.1.1 (API 25) (emulator)
• iPhone 7 • AE8716B4-1D5A-490E-AC0A-C37C062300BD • ios • iOS 10.3 (simulator)

It continues to happen, the biggest issue is that even when I restart all the IDE and emulators, it still does not recover, I start getting this in the console of IntelliJ, sometimes for flutter, sometimes for gradle. I have to restart my macbook to recover and start working again.

Resource temporarily unavailable

Just found something interesting, thought I would try to run flutter upgrade and it gives me this.
Maybe this will be a clue to what is happening.

/Users/dnetman99/flutter/bin/flutter: fork: Resource temporarily unavailable

From my understanding, that error suggests there are too many processes running and fork is failing. Now we need to figure out WHY this is happening!

Did a reboot help (if temporarily)?

Yes, a reboot restores functionality, but 4 reboots today. I will try to track how I am processing, it always happens after several debugs in the emulator. I am trying to see if there is a pattern. I checked to see if the flutter Daemon was stopped properly after I close IntelliJ and it is.

Ugh. That's a lot of reboots.

cc @devoncarew

Thanks for the report! It looks like you're running into https://github.com/flutter/flutter/issues/11124. that's being actively worked on now; closing this issue as a dupe.

And, until the fixes are committed, a less intrusive workaround to re-booting your laptop is to runkillall DTServiceHub.

Mitigation is now landed (on master branch) for the instruments-related issues here and in flutter/flutter#11124.

Was this page helpful?
0 / 5 - 0 ratings