Skip to content

Web app not opening on the chrome while debug #172348

@RiteSh-S23

Description

@RiteSh-S23

Steps to reproduce

I attempted to run my Flutter web project using the command:

flutter run -d chrome --web-port=6123 --web-browser-flag="--disable-web-security" --web-browser-flag="--user-data-dir=~/chrome_dev".

Upon execution, Chrome launches automatically, and four tabs open, each trying to load the Flutter project. However, after a short time, the terminal throws an error stating: “Failed to launch browser after 3 tries,” followed by the full launch command it attempted. The error suggests ensuring that Chrome is up to date and recommends using the -d web-server flag if the issue persists. Despite Chrome opening, it fails to load the project, and the Flutter tool eventually gives up trying to connect. This issue seems related either to the custom flags or Chrome’s inability to handle multiple simultaneous tab launches in this configuration.

Actual results

Failed to launch browser after 3 tries. Command used to launch it: C:\Program Files\Google\Chrome\Application\chrome.exe
--user-data-dir=C:\Users\Apoorva\AppData\Local\Temp\flutter_tools.f000e587\flutter_tools_chrome_device.7f799c7f --remote-debugging-port=58362 --disable-background-timer-throttling --disable-extensions --disable-popup-blocking
--bwsi --no-first-run --no-default-browser-check --disable-default-apps --disable-translate http://127.0.0.1:8080
Failed to launch browser. Make sure you are using an up-to-date Chrome or Edge. Otherwise, consider using -d web-server instead and filing an issue at https://github.com/flutter/flutter/issues.

Image

Logs

Logs
Launching lib\main.dart on Chrome in debug mode...
Warning: In index.html:37: Local variable for "serviceWorkerVersion" is deprecated. Use "{{flutter_service_worker_version}}" template token instead. See https://docs.flutter.dev/platform-integration/web/initialization for more  
details.
Warning: In index.html:46: "FlutterLoader.loadEntrypoint" is deprecated. Use "FlutterLoader.load" instead. See https://docs.flutter.dev/platform-integration/web/initialization for more details.
Waiting for connection from debug service on Chrome...             40.6s
Failed to launch browser after 3 tries. Command used to launch it: C:\Program Files\Google\Chrome\Application\chrome.exe
--user-data-dir=C:\Users\Apoorva\AppData\Local\Temp\flutter_tools.f000e587\flutter_tools_chrome_device.7f799c7f --remote-debugging-port=58362 --disable-background-timer-throttling --disable-extensions --disable-popup-blocking   
--bwsi --no-first-run --no-default-browser-check --disable-default-apps --disable-translate http://127.0.0.1:8080
Failed to launch browser. Make sure you are using an up-to-date Chrome or Edge. Otherwise, consider using -d web-server instead and filing an issue at https://github.com/flutter/flutter/issues.

Flutter Doctor output

Doctor output
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 3.24.3, on Microsoft Windows [Version 10.0.22631.4317], locale en-IN)
[√] Windows Version (Installed version of Windows is version 10 or higher)
[√] Android toolchain - develop for Android devices (Android SDK version 35.0.0)
[√] Chrome - develop for the web
[X] Visual Studio - develop Windows apps
    X Visual Studio not installed; this is necessary to develop Windows apps.
      Download at https://visualstudio.microsoft.com/downloads/.
      Please install the "Desktop development with C++" workload, including all of its default components
[√] Android Studio (version 2025.1.1)
[√] VS Code (version 1.102.0)
[√] Connected device (3 available)

Metadata

Metadata

Assignees

No one assigned

    Labels

    r: duplicateIssue is closed as a duplicate of an existing issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions