flutter-intellij
flutter-intellij copied to clipboard
Unable to start flutter web app from within Android Studio IDE
Steps to Reproduce
Create the default sample Flutter app (counter) with Android and Web support. The project runs fine via the Android Studio IDE "Run" or "Debug" options (attached to main.dart) when the target is an Android virtual device. However, when clicking on Android Studio IDE's "Run" or "Debug" options with the target device as "Chrome (web)", the browser appears with "Aw Snap" (with error code: STATUS_STACK_BUFFER_OVERRUN).
The same project can be opened in VS Code, and launches from the IDE Run/Debug option (to chrome again) with no problems.
Version info
[√] Flutter (Channel stable, 3.19.3, on Microsoft Windows [Version 10.0.22631.3155], locale en-GB) • Flutter version 3.19.3 on channel stable at C:\flutter • Upstream repository https://github.com/flutter/flutter.git • Framework revision ba39319843 (6 days ago), 2024-03-07 15:22:21 -0600 • Engine revision 2e4ba9c6fb • Dart version 3.3.1 • DevTools version 2.31.1
[√] Windows Version (Installed version of Windows is version 10 or higher)
[√] Android toolchain - develop for Android devices (Android SDK version 34.0.0) • Android SDK at C:\Android\Sdk • Platform android-34, build-tools 34.0.0 • ANDROID_HOME = C:\Android\Sdk • Java binary at: C:\Android\AndroidStudio\jbr\bin\java • Java version OpenJDK Runtime Environment (build 17.0.9+0--11185874) • All Android licenses accepted.
[√] Chrome - develop for the web • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe
[√] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.9.2) • Visual Studio at C:\Program Files\Microsoft Visual Studio\2022\Community • Visual Studio Community 2022 version 17.9.34622.214 • Windows 10 SDK version 10.0.22621.0
[√] Android Studio (version 2023.2) • Android Studio at C:\Android\AndroidStudio • Flutter plugin can be installed from: https://plugins.jetbrains.com/plugin/9212-flutter NOTE: Plugin version 78.2.2 is installed • Dart plugin can be installed from: https://plugins.jetbrains.com/plugin/6351-dart NOTE: Plugin version 232.10305 is installed • Java version OpenJDK Runtime Environment (build 17.0.9+0--11185874)
[√] Connected device (3 available) • Windows (desktop) • windows • windows-x64 • Microsoft Windows [Version 10.0.22631.3155] • Chrome (web) • chrome • web-javascript • Google Chrome 122.0.6261.112 • Edge (web) • edge • web-javascript • Microsoft Edge 122.0.2365.80
[√] Network resources • All expected network resources are available.
• No issues found!
Still happening, with latest upgrades: Chrome version 124.0.6367.61 Flutter 3.19.6 Dart 3.3.4 DevTools 2.31.1 Android Studio Iguana | 2023.2.1 Patch 2 Build #AI-232.10300.40.2321.11668458, built on April 4, 2024 Runtime version: 17.0.9+0--11185874 amd64 VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o. Windows 11.0 GC: G1 Young Generation, G1 Old Generation Memory: 4036M Cores: 20 Registry: debugger.watches.in.variables=false debugger.new.tool.window.layout=true ide.instant.shutdown=false ide.highlighting.mode.essential=true ide.experimental.ui=true
Non-Bundled Plugins: Batch Scripts Support (1.0.13) com.intellij.marketplace (232.10300.41) CMD Support (1.0.5) Dart (232.10313)
Flutter plugin 79.0.1
Just tested this again on latest everything and still having the same issue! When will this be resolved for Android Studio?
Steps to Reproduce
Again, to reproduce, just create a new flutter web project -- this time with with 3.22.1 (which includes the sample code utilising the flutter_bootstrap.js approach, then set "Flutter Device Selection" in Android Studio IDE to Chrome (web) and click IDE icon for "run main.dart" - same "STATUS_STACK_BUFFER_OVERRUN" error in localhost chrome launched.
As before, runs OK in Visual Studio Code, and also runs fine with
flutter run -d chrome --web-renderer html
Version info
Flutter 3.22.1 • channel stable • https://github.com/flutter/flutter.git Framework • revision a14f74ff3a (2 weeks ago) • 2024-05-22 11:08:21 -0500 Engine • revision 55eae6864b Tools • Dart 3.4.1 • DevTools 2.34.3
Doctor summary (to see all details, run flutter doctor -v): [√] Flutter (Channel stable, 3.22.1, on Microsoft Windows [Version 10.0.22631.3593], locale en-GB) [√] Windows Version (Installed version of Windows is version 10 or higher) [√] Android toolchain - develop for Android devices (Android SDK version 34.0.0) [√] Chrome - develop for the web [√] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.10.0) [√] Android Studio (version 2023.3) [√] Connected device (3 available) [√] Network resources
Android Studio Jellyfish | 2023.3.1 Patch 1 Build #AI-233.14808.21.2331.11842104, built on May 15, 2024 Runtime version: 17.0.10+0--11572160 amd64 VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o. Windows 11.0 GC: G1 Young Generation, G1 Old Generation Memory: 4036M Cores: 20 Registry: ide.highlighting.mode.essential=true ide.instant.shutdown=false debugger.watches.in.variables=false debugger.new.tool.window.layout=true ide.experimental.ui=true Non-Bundled Plugins: Batch Scripts Support (1.0.13) com.intellij.marketplace (233.14808.24) CMD Support (1.0.5) Dart (233.15271) io.flutter (80.0.1)
Flutter plugin 80.0.1
Chrome Version 125.0.6422.142 (Official Build) (64-bit)
Hi @jwren,
This issue was placed on the "on deck" milestone a few months ago. Given the detailed information and steps to reproduce that I've provided, could you prioritize reproducing the issue?
It would be helpful to get feedback or confirmation on whether the issue can be reproduced. If there's anything more I can do to assist, in terms of collecting any extra debug/info, please let me know.
I have just upgraded to Android Studio Koala 2024.1.1 and Chrome 126.0.6478.115 and it still occurs.
Many thanks for your time and attention to this matter.
KR Bren
@jwren
This is still happening!
Further testing (again with default flutter counter app) with verbose logging showing:
From CLI (using "flutter run -d chrome --verbose"):
[ ] MetadataProvider: Loaded debug metadata (sound null safety)
[ +6 ms] DwdsInjector: Injected debugging metadata for entrypoint at http://localhost:64322/main_module.bootstrap.js
[+6512 ms] ChromeProxyService: Initializing expression compiler for main_module.bootstrap.js with sound null safety: true
[ +34 ms] ChromeProxyService: Caching package:flutter/src/widgets/widget_inspector.dart in expression compiler worker
[ +41 ms] DevHandler: Debug service listening on ws://127.0.0.1:64372/QCnhrLx-J_M=/ws
From IDE (using "Run" / shift-F10) leading to browser instance "Aw, Snap" crash:
[ ] MetadataProvider: Loaded debug metadata (sound null safety) [ +4 ms] DwdsInjector: Injected debugging metadata for entrypoint at http://localhost:64843/main_module.bootstrap.js
with nothing further logged after crash
Logs show BOTH methods of running app use same command:
Launching Chromium (url = http://localhost:64843, headless = false, skipCheck = false, debugPort = null)
@darshankawar Many thanks for the link(s). I can confirm the problem is not with the flutter demo app itself. I used the flutter demo app purely as a ref for others to reproduce the error from within Android Studio IDE.
@jwren I can confirm compatibility mode was causing the issue, but NOT against the chrome executable itself. Within my Win11 environment I found that the android studio studio64.exe was running under Win8 compat mode, whereas my VS Code code.exe was not. Problem solved :)