Flutter-intellij: Running app with plugin version 48 pauses isolates

Created on 4 Aug 2020  Â·  4Comments  Â·  Source: flutter/flutter-intellij

Steps to Reproduce

  1. Run the example app of this plugin with "flutter run" on the command line. The app should execute the foregroundServiceFunction which is running in a background isolate and print the current time approximately every 5 seconds.
  2. Run the same app through version 48 of the flutter plugin for IntelliJ/Android Studio. The foregroundServiceFunction doesn't get executed. On hot reload, the following is printed to the console: "An isolate is paused (probably due to --start-paused); interface might not update." After a hot restart the app resumes as expected.

Version info

$ flutter doctor -v
[√] Flutter (Channel stable, v1.17.5, on Microsoft Windows [Version 10.0.18363.959], locale de-DE)
    • Flutter version 1.17.5 at C:\src\flutter\flutter_windows_1.17.4-stable\flutter
    • Framework revision 8af6b2f038 (5 weeks ago), 2020-06-30 12:53:55 -0700
    • Engine revision ee76268252
    • Dart version 2.8.4

[√] Android toolchain - develop for Android devices (Android SDK version 30.0.0)
    • Android SDK at C:\Users\bschiehl\AppData\Local\Android\sdk
    • Platform android-30, build-tools 30.0.0
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
    • All Android licenses accepted.

[√] Android Studio (version 4.0)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Flutter plugin version 48.0.2
    • Dart plugin version 193.7361
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)

[√] VS Code (version 1.46.1)
    • VS Code at C:\Users\bschiehl\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.12.1

[√] Connected device (1 available)
    • SM G950F • 9889db335a42484749 • android-arm64 • Android 9 (API 28)

Most helpful comment

@helin24 and @devoncarew Definitely related to #4678. You can reproduce by creating any Flutter Test Run/Debug Configuration in your project, specifying the Test scope to All in directory and specifying your Project's test directory.

As a result, that Run Configuration that used to work before version 48 (which didn't inject --start-paused in the flutter test command), is now broken and hanging, since you can't Debug configurations for tests in a directory.

Is there any workaround to this without resorting to using the command line?

All 4 comments

cc @helin24 - potentially related to https://github.com/flutter/flutter-intellij/pull/4678? It sounds like there can be other isolates, apart from the main one, that we need to resume on start.

@bschiehl thanks for the example app. There seems to be an incompatibility between the plugin v48.0.2 and Flutter v1.17.5; I can reproduce the issue with those versions but changing to Flutter v1.19.0-4.3.pre works fine. I don't know what changed between those versions (I'm pretty sure we didn't make any changes related to start paused on the flutter side), but I recommend trying a beta release of flutter for now.

@helin24 and @devoncarew Definitely related to #4678. You can reproduce by creating any Flutter Test Run/Debug Configuration in your project, specifying the Test scope to All in directory and specifying your Project's test directory.

As a result, that Run Configuration that used to work before version 48 (which didn't inject --start-paused in the flutter test command), is now broken and hanging, since you can't Debug configurations for tests in a directory.

Is there any workaround to this without resorting to using the command line?

@diegotori thanks for the clarification - not sure how I missed this while testing! I'm able to reproduce the issue, so looking into how to fix now.

Unfortunately I can't think of a good workaround at the moment, other than running tests individually or going back to plugin v47. I'll update if I come across something better.

Was this page helpful?
0 / 5 - 0 ratings