Skip to content

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

@saltedpotatos

Description

@saltedpotatos

PR #154941

Crashes at

unawaited(Chrome.start(<String>[devToolsUrl]));

trying to launch Chrome via package:browser_launcher

Exception: No such file or directory Command: /Applications/Google Chrome.app/Contents/MacOS/Google Chrome, OS error code: 2

Command

flutter run -d macos

Steps to Reproduce

  1. flutter run -d macos
  2. hit v to open dev tools
Launching Flutter DevTools for macOS at
http://127.0.0.1:9101?uri=http%3A%2F%2F127.0.0.1%3A53732%2FN2SDRmqaagc%3D%
2F

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:9101?uri=http%3A%2F%2F127.0.0.1%3A53732%2FN2SDRmqaagc%3
  D%2F".

Logs

ProcessException: No such file or directory Command: /Applications/Google Chrome.app/Contents/MacOS/Google Chrome, OS error code: 2

#0      _ProcessImpl._start (dart:io-patch/process_patch.dart:402:33)
#1      Process.start (dart:io-patch/process_patch.dart:38:20)
#2      Chrome._startProcess (package:browser_launcher/src/chrome.dart:156:26)
#3      Chrome.start (package:browser_launcher/src/chrome.dart:148:18)
#4      FlutterResidentDevtoolsHandler._launchDevToolsForDevices (package:flutter_tools/src/resident_devtools_handler.dart:188:24)
#5      FlutterResidentDevtoolsHandler.launchDevToolsInBrowser (package:flutter_tools/src/resident_devtools_handler.dart:176:7)
#6      TerminalHandler._commonTerminalInputHandler (package:flutter_tools/src/resident_runner.dart:1818:56)
#7      TerminalHandl➜  flungdung

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work listc: crashStack traces logged to the consolefound in release: 3.24Found to occur in 3.24found in release: 3.26Found to occur in 3.26has reproducible stepsThe issue has been confirmed reproducible and is ready to work onteam-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