Skip to content

Flutter web never connects to Chrome in debug mode #44552

@jonjon1123

Description

@jonjon1123

Steps to Reproduce

I am trying to run a flutter web project using flutter run -d chrome. The project builds fine, but once it gets to Attempting to connect to browser instance.. nothing happens. A Chrome window does open, but it is just a blank page and the browser instance is never connected (see below screenshot). It does look like there is a 404 error when it tries to reference main.dart.js. If I run flutter run --release -d chrome everything works just fine except I can't interactively debug and the code is all minified making it impossible to troubleshoot/debug.

image

Target Platform: Web
Target OS version/browser: Windows Chrome Version 78.0.3904.97
Devices: Chrome

Logs

PS C:\Users\jonjon1123\StudioProjects\bowlr-admin> flutter run -d chrome --verbose
[  +25 ms] executing: [C:\Users\jonjon1123\flutter\] git -c log.showSignature=false log -n 1 --pretty=format:%H
[ +111 ms] Exit code 0 from: git -c log.showSignature=false log -n 1 --pretty=format:%H
[   +5 ms] e7073f9a1f5c40398f589ae45956b489b1f3ab10
[   +1 ms] executing: [C:\Users\jonjon1123\flutter\] git describe --match v*.*.* --first-parent --long --tags
[ +147 ms] Exit code 0 from: git describe --match v*.*.* --first-parent --long --tags
[   +2 ms] v1.10.15-113-ge7073f9a1
[  +18 ms] executing: [C:\Users\jonjon1123\flutter\] git rev-parse --abbrev-ref --symbolic @{u}
[  +93 ms] Exit code 0 from: git rev-parse --abbrev-ref --symbolic @{u}
[   +1 ms] origin/master
[   +1 ms] executing: [C:\Users\jonjon1123\flutter\] git ls-remote --get-url origin
[  +82 ms] Exit code 0 from: git ls-remote --get-url origin
[   +1 ms] https://github.com/flutter/flutter.git
[ +168 ms] executing: [C:\Users\jonjon1123\flutter\] git rev-parse --abbrev-ref HEAD
[  +42 ms] Exit code 0 from: git rev-parse --abbrev-ref HEAD
[        ] master
[ +143 ms] executing: C:\Users\jonjon1123\AppData\Local\Android\sdk\platform-tools\adb.exe devices -l
[  +33 ms] Exit code 0 from: C:\Users\jonjon1123\AppData\Local\Android\sdk\platform-tools\adb.exe devices -l
[        ] List of devices attached
[  +20 ms] Artifact Instance of 'AndroidMavenArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
[   +5 ms] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[   +1 ms] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
[ +310 ms] Generating
C:\Users\jonjon1123\StudioProjects\bowlr-admin\android\app\src\main\java\io\flutter\plugins\GeneratedPluginRegistrant.ja
va
[ +323 ms] Launching lib\main.dart on Chrome in debug mode...
[   +1 ms] Building application for the web...
[+9878 ms] Starting daemon...
[ +183 ms] Initializing inputs
[  +13 ms] Reading cached asset graph...
[ +193 ms] Reading cached asset graph completed, took 189ms

[ +224 ms] Checking for updates since last build...
[ +578 ms] Checking for updates since last build completed, took 578ms

[   +9 ms] Initializing inputs
[   +3 ms] Reading cached asset graph...
[        ] Reading cached asset graph completed, took 189ms
[        ] Checking for updates since last build...
[        ] Checking for updates since last build completed, took 578ms
[ +271 ms] Serving DevTools at http://127.0.0.1:52823

[ +817 ms] About to build [web]...
[  +12 ms] Running build...
[ +130 ms] Running build completed, took 55ms

[   +2 ms] Caching finalized dependency graph...
[  +13 ms] Caching finalized dependency graph completed, took 119ms

[   +5 ms] Succeeded after 183ms with 0 outputs (0 actions)

[  +15 ms] Building application for the web... (completed in 12.3s)
[   +1 ms] Attempting to connect to browser instance..
PS C:\Users\jonjon1123\StudioProjects\bowlr-admin> flutter doctor -v
[√] Flutter (Channel master, v1.10.16-pre.113, on Microsoft Windows [Version 10.0.17763.805], locale en-US)
    • Flutter version 1.10.16-pre.113 at C:\Users\jonjon1123\flutter
    • Framework revision e7073f9a1f (25 hours ago), 2019-11-09 17:08:53 -0800
    • Engine revision 31cd2dfca2
    • Dart version 2.7.0


[√] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
    • Android SDK at C:\Users\jonjon1123\AppData\Local\Android\sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-29, build-tools 28.0.3
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b03)
    • All Android licenses accepted.

[√] Chrome - develop for the web
    • Chrome at C:\Program Files (x86)\Google\Chrome\Application\chrome.exe

[√] Android Studio (version 3.5)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Flutter plugin version 40.1.2
    • Dart plugin version 191.8423
    • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b03)

[√] IntelliJ IDEA Community Edition (version 2017.3)
    • IntelliJ at C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2017.3.3
    • Flutter plugin version 22.2.2
    • Dart plugin version 173.4548.30

[√] VS Code (version 1.40.0)
    • VS Code at C:\Users\jonjon1123\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.6.0

[√] Connected device (2 available)
    • Chrome     • chrome     • web-javascript • Google Chrome 78.0.3904.97
    • Web Server • web-server • web-javascript • Flutter Tools

• No issues found!

Metadata

Metadata

Assignees

Labels

a: debuggingDebugging, breakpoints, expression evaluationplatform-webWeb applications specifically

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions