Dart-Code: Chrome not showing up in Flutter: Select Device
i’m on Manjaro. i’ve install google-chrome from AUR and it shows up in flutter doctor , flutter devices when executed from terminal. the problem is when i run flutter doctor from vscode it says
[✗] Chrome - develop for the web (Cannot find chrome executable at google-chrome) ! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 1
- Comments: 19 (9 by maintainers)
Have you set
CHROME_EXECUTABLEin a terminal startup script that might not apply to VS Code?Does it work if you launch VS Code from the terminal (where it works)?
You could also try setting the
dart.envVS Code User Setting to apply env variables to all Dart/Flutter processes.Also, if you capture the Daemon Log, that should show whether the device is not showing up at all, or being filtered out because it thinks your project is not a web project.
Yeah, that’s a common problem. If VS Code is launched in a way that doesn’t inherit these environment variables, then of course it can’t find them. It’s better if you can set the variables somewhere globally so that all programs inherit them no matter how they’re launched, but that may be harder (if even possible) depending on your OS.
Can you run
flutter doctor -vfrom a terminal, and then also using the Flutter: Run Flutter Doctor command in VS Code and attach the outputs of each in a new issue? Also include whether/home/smolck/Android/Sdk/platform-tools/adbis the correct location ofadbfor you.Yup;
flutter run -d chromeworks fine in a terminal, and actually nowweb-server (web-javascript)shows up as a device, but still no chrome. And if I try to click the device in the lower right hand corner, the Flutter daemon stops and asks if I want to restart it.I think these issues are due to using NixOS (my specific NixOS setup), so I’ll open an issue as you said for debugging. Probably will open it later today assuming I have time.