Skip to content

[tool_crash] Opening devtools without Chrome installed crashes flutter tool #182307

Closed

Description

@saltedpotatos

Steps to reproduce

  1. Do not have Chrome installed
  2. flutter run -d macos
  3. Press the 'v' key to launch devtools

Expected results

The flutter tool would gracefully handle the lack of Chrome availability without crashing,

Actual results

Eagle eyed flutter repo followers may notice this sounds a lot like issue #154940 and PR #154941, also both filed by me about this exact crash in September of 2024.

The issue back then being unawaited(Chrome.start(<String>[devToolsUrl])); in a function to launch devtools that

// This must be guaranteed not to return a Future that fails.
  @override
  bool launchDevToolsInBrowser({required List<FlutterDevice?> flutterDevices}) {
    //[...]
}

This fix even made it to master in January of 2025, after some delays with pubspec.lock changes after removing the browser_launcher pkg dependency since the flutter tool had another way to launch Chrome without needing that package.

I saw the new flutter release yesterday and checked https://ismyprinflutteryet.com/#/pr/framework/154941 to see my fix had made it to stable. Imagine my surprise when I updated to the latest stable to see the same crash!

Looks like my fix (and tests) got dropped during a refactor in PR #174580 in September of 2025

The current behavior is back to

import 'package:browser_launcher/browser_launcher.dart';
[....]
 unawaited(Chrome.start(<String>[devToolsUri!.toString()]));

Code sample

  • flutter create -e bug
  • flutter run -d macos
  • 'v'

Screenshots or Video

Logs

Logs
Launching Flutter DevTools for macOS at
http://127.0.0.1:54443/5kHdg0GPYcA=/devtools/?uri=ws://127.
0.0.1:54443/5kHdg0GPYcA=/ws

Oops; flutter has exited unexpectedly: "ProcessException:
No such file or directory
  Command: /Applications/Google
  Chrome.app/Contents/MacOS/Google Chrome
  http://127.0.0.1:54443/5kHdg0GPYcA=/devtools/?uri=ws://12
  7.0.0.1:54443/5kHdg0GPYcA=/ws".

Flutter Doctor output

Doctor output
[✓] Flutter (Channel stable, 3.41.0, on macOS 26.2 25C56 darwin-x64, locale en-US)
[!] Android toolchain - develop for Android devices (Android SDK version 35.0.0)
    ! Some Android licenses not accepted. To resolve this, run: flutter doctor --android-licenses
[✓] Xcode - develop for iOS and macOS (Xcode 26.2)
[✗] Chrome - develop for the web (Cannot find Chrome executable at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome)
    ! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.
[✓] Connected device (2 available)

Activity

  1. puneetkukreja98 commented on Feb 13, 2026

    @puneetkukreja98
    Contributor

    Reproduced this on Flutter stable 3.41.0 and master 3.42.0-1.0.pre-104 Thank you for the report.

    Flutter doctor - stable

    [✓] Flutter (Channel stable, 3.41.0, on macOS 26.2 25C56 darwin-arm64, locale en-US) [551ms]
        • Flutter version 3.41.0 on channel stable at /Users/puneetkukreja/Developer/flutter
        • Upstream repository https://github.com/flutter/flutter.git
        • Framework revision 44a626f4f0 (3 days ago), 2026-02-10 10:16:12 -0800
        • Engine revision 3452d735bd
        • Dart version 3.11.0
        • DevTools version 2.54.1
        • Feature flags: enable-web, enable-linux-desktop, enable-macos-desktop, enable-windows-desktop, enable-android, enable-ios, cli-animations, enable-native-assets, omit-legacy-version-file,
          enable-lldb-debugging, enable-uiscene-migration
    
    [✓] Android toolchain - develop for Android devices (Android SDK version 36.1.0) [2.7s]
        • Android SDK at /Users/puneetkukreja/Library/Android/sdk
        • Emulator version 36.3.10.0 (build_id 14472402) (CL:N/A)
        • Platform android-36, build-tools 36.1.0
        • Java binary at: /Library/Java/JavaVirtualMachines/jdk-17.jdk/Contents/Home/bin/java
          This JDK is specified in your Flutter configuration.
          To change the current JDK, run: `flutter config --jdk-dir="path/to/jdk"`.
        • Java version Java(TM) SE Runtime Environment (build 17.0.12+8-LTS-286)
        • All Android licenses accepted.
    
    [✓] Xcode - develop for iOS and macOS (Xcode 26.2) [1,272ms]
        • Xcode at /Applications/Xcode.app/Contents/Developer
        • Build 17C52
        • CocoaPods version 1.16.2
    
    [✗] Chrome - develop for the web (Cannot find Chrome executable at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome) [6ms]
        ! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.
    
    [✓] Connected device (1 available) [7.1s]
        • macOS (desktop) • macos • darwin-arm64 • macOS 26.2 25C56 darwin-arm64
        ! Error: Browsing on the local area network for Puneet’s iPhone. Ensure the device is unlocked and attached with a cable or associated with the same local area network as this Mac.
          The device must be opted into Developer Mode to connect wirelessly. (code -27)
    
    [✓] Network resources [1,085ms]
        • All expected network resources are available.
    
    ! Doctor found issues in 1 category.

    Flutter doctor - latest master

    ✓] Flutter (Channel master, 3.42.0-1.0.pre-104, on macOS 26.2 25C56 darwin-arm64, locale en-US) [1,424ms]
        • Flutter version 3.42.0-1.0.pre-104 on channel master at /Users/puneetkukreja/flutter-contribution/flutter
        • Upstream repository https://github.com/puneetkukreja98/flutter
        • FLUTTER_GIT_URL = https://github.com/puneetkukreja98/flutter
        • Framework revision 6af435bed4 (8 hours ago), 2026-02-13 01:03:43 -0500
        • Engine revision 6af435bed4
        • Dart version 3.12.0 (build 3.12.0-144.0.dev)
        • DevTools version 2.54.0
        • Feature flags: enable-web, enable-linux-desktop, enable-macos-desktop, enable-windows-desktop, enable-android, enable-ios, cli-animations,
          enable-native-assets, omit-legacy-version-file, enable-lldb-debugging, enable-uiscene-migration, enable-riscv64
    
    [✓] Android toolchain - develop for Android devices (Android SDK version 36.1.0) [1,259ms]
        • Android SDK at /Users/puneetkukreja/Library/Android/sdk
        • Emulator version 36.3.10.0 (build_id 14472402) (CL:N/A)
        • Platform android-36, build-tools 36.1.0
        • Java binary at: /Library/Java/JavaVirtualMachines/jdk-17.jdk/Contents/Home/bin/java
          This JDK is specified in your Flutter configuration.
          To change the current JDK, run: `flutter config --jdk-dir="path/to/jdk"`.
        • Java version Java(TM) SE Runtime Environment (build 17.0.12+8-LTS-286)
        • All Android licenses accepted.
    
    [✓] Xcode - develop for iOS and macOS (Xcode 26.2) [770ms]
        • Xcode at /Applications/Xcode.app/Contents/Developer
        • Build 17C52
        • CocoaPods version 1.16.2
    
    [✗] Chrome - develop for the web (Cannot find Chrome executable at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome) [6ms]
        ! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.
    
    [✓] Connected device (1 available) [6.0s]
        • macOS (desktop) • macos • darwin-arm64 • macOS 26.2 25C56 darwin-arm64
        ! Error: Browsing on the local area network for Puneet’s iPhone. Ensure the device is unlocked and attached with a cable or associated with the same local
          area network as this Mac.
          The device must be opted into Developer Mode to connect wirelessly. (code -27)
    
    [✓] Network resources [1,131ms]
        • All expected network resources are available.
    
    ! Doctor found issues in 1 category.
  2. added
    c: crashStack traces logged to the console
    toolAffects the "flutter" command-line tool. See also t: labels.
    team-toolOwned by Flutter Tool team
    and removed
    in triagePresently being triaged by the triage team
    on Feb 13, 2026
  3. bkonyi commented on Feb 23, 2026

    @bkonyi
    Contributor

    Thanks for catching this! #174580 was a pretty major refactor, and unfortunately the regression test for your fix was part of a test suite that was no longer relevant.

    I'll try and get this fixed soon and cherrypicked into stable.

  4. added
    P1High-priority issues at the top of the work list
    c: regressionIt was better in the past than it is now
    triaged-toolTriaged by Flutter Tool team
    on Feb 23, 2026
  5. self-assigned this
    on Feb 23, 2026
  6. saltedpotatos commented on Feb 23, 2026

    @saltedpotatos
    ContributorAuthor

    Thanks Ben! I remember seeing your TODOs about the rewrite.

    I can also submit a PR if that's easier! Might try and get a test exemption though :')

  7. added
    ⏳Bot is counting down the days until it unassigns the issue
    on Jun 29, 2026
  8. flutter-triage-bot commented on Jun 29, 2026

    @flutter-triage-bot

    This issue is assigned to @bkonyi but has had no recent status updates. Please consider unassigning this issue if it is not going to be addressed in the near future. This allows people to have a clearer picture of what work is actually planned. Thanks!

  9. github-actions commented on Sep 1, 2026

    @github-actions

    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 flutter doctor -v and a minimal reproduction of the issue.

  10. locked as resolved and limited conversation to collaborators on Sep 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

⏳Bot is counting down the days until it unassigns the issueP1High-priority issues at the top of the work listc: crashStack traces logged to the consolec: regressionIt was better in the past than it is nowfound in release: 3.47Found to occur in 3.47t: top-crasherteam-toolOwned by Flutter Tool teamtoolAffects the "flutter" command-line tool. See also t: labels.triaged-toolTriaged by Flutter Tool team

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions