New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[web] Debug mode is paused when launched from IntelliJ/Android Studio #76680
Comments
Hi @Wissperwind Rethinking, this could be either intellij plugin or Flutter, I'm not sure so reopening the issue flutter doctor -v[✓] Flutter (Channel beta, 1.26.0-17.6.pre, on macOS 11.2.1 20D74 darwin-x64, locale en-GB)
• Flutter version 1.26.0-17.6.pre at /Users/tahatesser/Code/flutter_beta
• Framework revision a29104a69b (8 days ago), 2021-02-16 09:26:56 -0800
• Engine revision 21fa8bb99e
• Dart version 2.12.0 (build 2.12.0-259.12.beta)
[✗] Android toolchain - develop for Android devices
✗ Unable to locate Android SDK.
Install Android Studio from: https://developer.android.com/studio/index.html
On first launch it will assist you in installing the Android SDK components.
(or visit https://flutter.dev/docs/get-started/install/macos#android-setup for detailed instructions).
If the Android SDK has been installed to a custom location, please use
`flutter config --android-sdk` to update to that location.
[!] Xcode - develop for iOS and macOS
• Xcode at /Volumes/Extreme/Xcode.app/Contents/Developer
• Xcode 12.4, Build version 12D4e
✗ CocoaPods not installed.
CocoaPods is used to retrieve the iOS and macOS platform side's plugin code that responds to your plugin usage on the Dart side.
Without CocoaPods, plugins will not work on iOS or macOS.
For more info, see https://flutter.dev/platform-plugins
To install see https://guides.cocoapods.org/using/getting-started.html#installation for instructions.
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 4.1)
• 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 1.8.0_242-release-1644-b3-6915495)
[✓] VS Code (version 1.53.2)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.19.0
[✓] Connected device (1 available)
• Chrome (web) • chrome • web-javascript • Google Chrome 88.0.4324.192
! Doctor found issues in 2 categories. [✓] Flutter (Channel dev, 1.27.0-4.0.pre, on macOS 11.2.1 20D74 darwin-x64, locale en-GB)
• Flutter version 1.27.0-4.0.pre at /Users/tahatesser/Code/flutter_dev
• Framework revision f8cd24de95 (8 days ago), 2021-02-16 11:24:17 -0800
• Engine revision 1d537824d6
• Dart version 2.13.0 (build 2.13.0-30.0.dev)
[✗] Android toolchain - develop for Android devices
✗ Unable to locate Android SDK.
Install Android Studio from: https://developer.android.com/studio/index.html
On first launch it will assist you in installing the Android SDK components.
(or visit https://flutter.dev/docs/get-started/install/macos#android-setup for detailed instructions).
If the Android SDK has been installed to a custom location, please use
`flutter config --android-sdk` to update to that location.
[!] Xcode - develop for iOS and macOS
• Xcode at /Volumes/Extreme/Xcode.app/Contents/Developer
• Xcode 12.4, Build version 12D4e
✗ CocoaPods not installed.
CocoaPods is used to retrieve the iOS and macOS platform side's plugin code that responds to your plugin usage on the Dart side.
Without CocoaPods, plugins will not work on iOS or macOS.
For more info, see https://flutter.dev/platform-plugins
To install see https://guides.cocoapods.org/using/getting-started.html#installation for instructions.
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 4.1)
• 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 1.8.0_242-release-1644-b3-6915495)
[✓] VS Code (version 1.53.2)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.19.0
[✓] Connected device (2 available)
• macOS (desktop) • macos • darwin-x64 • macOS 11.2.1 20D74 darwin-x64
• Chrome (web) • chrome • web-javascript • Google Chrome 88.0.4324.192
! Doctor found issues in 2 categories. [✓] Flutter (Channel master, 1.27.0-5.0.pre.134, on macOS 11.2.1 20D74 darwin-x64, locale en-GB)
• Flutter version 1.27.0-5.0.pre.134 at /Users/tahatesser/Code/flutter_master
• Framework revision 354bd53f62 (5 hours ago), 2021-02-24 02:36:05 -0500
• Engine revision 9061823775
• Dart version 2.13.0 (build 2.13.0-68.0.dev)
[✗] Android toolchain - develop for Android devices
✗ Unable to locate Android SDK.
Install Android Studio from: https://developer.android.com/studio/index.html
On first launch it will assist you in installing the Android SDK components.
(or visit https://flutter.dev/docs/get-started/install/macos#android-setup for detailed instructions).
If the Android SDK has been installed to a custom location, please use
`flutter config --android-sdk` to update to that location.
[!] Xcode - develop for iOS and macOS
• Xcode at /Volumes/Extreme/Xcode.app/Contents/Developer
• Xcode 12.4, Build version 12D4e
✗ CocoaPods not installed.
CocoaPods is used to retrieve the iOS and macOS platform side's plugin code that responds to your plugin usage on the Dart side.
Without CocoaPods, plugins will not work on iOS or macOS.
For more info, see https://flutter.dev/platform-plugins
To install see https://guides.cocoapods.org/using/getting-started.html#installation for instructions.
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 4.1)
• 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 1.8.0_242-release-1644-b3-6915495)
[✓] VS Code (version 1.53.2)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.19.0
[✓] Connected device (2 available)
• macOS (desktop) • macos • darwin-x64 • macOS 11.2.1 20D74 darwin-x64
• Chrome (web) • chrome • web-javascript • Google Chrome 88.0.4324.192
! Doctor found issues in 2 categories. Thank you |
As I mentioned in #76690, this is probably due to a crash. Sharing my logs here as my issue was close. I got those logs once you resume the debugger (that blue button above the webpage). Running "flutter pub get" in app...
Launching lib/main.dart on Chrome in debug mode...
Waiting for connection from debug service on Chrome...
Debug service listening on ws://127.0.0.1:56126/1tWXqmQvm-Q=/ws
Running with unsound null safety
For more information see https://dart.dev/null-safety/unsound-null-safety
Debug service listening on ws://127.0.0.1:56126/1tWXqmQvm-Q=/ws
Error: Unexpected null value.
at Object.throw_ [as throw] (http://localhost:56000/dart_sdk.js:5347:11)
at Object.nullCheck (http://localhost:56000/dart_sdk.js:5680:30)
at _engine._PointerAdapter.new.[_getSanitizer] (http://localhost:56000/dart_sdk.js:166679:28)
at http://localhost:56000/dart_sdk.js:166739:42
at http://localhost:56000/dart_sdk.js:166697:16
at http://localhost:56000/dart_sdk.js:166391:11
at <anonymous>
at http://localhost:56000/dart_sdk.js:50601:13
at Generator.next (<anonymous>)
at runBody (http://localhost:56000/dart_sdk.js:39187:34)
at Object._async [as async] (http://localhost:56000/dart_sdk.js:39218:7)
at http://localhost:56000/dart_sdk.js:50592:20
at new Promise (<anonymous>)
at Object._invokeExtension [as invokeExtension] (http://localhost:56000/dart_sdk.js:50589:12)
at <anonymous>:1:31 |
I can confirm that chrome does not display my website in debug mode, because somehow the program is paused - I can press resume and my website appears perfectly debuggable, but in my case, no error is printed after I press resume. |
Confirmed that this is happening in IntelliJ only. The app is launched in paused state and requires unpausing either by using the "play" icon in IntelliJ (I had to click it twice) or in Chrome DevTools.
|
@grouma |
Nope, nothing special - it all seems to work in VS Code. Looking at the log, it looks like the isolate is already be paused at the start, and we trigger the resume based on its As far as I can tell, there's no special handling for web here, it's all the same as for CLI. |
@DanTup is correct. It looks like Flutter Tools automatically calls @jonahwilliams any thoughts here? |
I think the comment there may be misleading, it only calls that if not starting paused: flutter/packages/flutter_tools/lib/src/isolated/resident_web_runner.dart Lines 815 to 817 in ac4d509
In VS Code, when we connect to the VM service, we:
When we process a |
Retroactively categorizing as P2, just so we can make sure that the fix for this bug reaches users faster. |
Is the fix already available? Or was it included in the last released version? |
@Wissperwind this change was included in v54 of the Flutter plugin. If that's the version you're using, maybe the issue we reproduced wasn't the same as yours despite having similar behavior. In that case, could you check if there's an error if you open up the Chrome inspector while it's on a blank screen? |
No, it was my fault. You fixed the right bug. I didn't realize that a flutter update is not enough and I had to update the IDE Plugins. |
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 |
Hi,
I am developing a flutter web application using Android Studio.
I use the Chrome browser as my device.
If I press play, the website is launched and displayed by chrome.
But if I press debug, chrome displays only a white page. Even if I wait several minutes.
A workaround is to press the reload button once. After that my website is dislayed.
I don't know what code to include hence I can't include the whole project.
Anyone else facing this problems?
The text was updated successfully, but these errors were encountered: