4

I set the CHROME_EXECUTABLE environment variable:

(base) Joels-MBP:~ jcastro2$ echo $CHROME_EXECUTABLE
/Applications/Brave Browser.app/Contents/MacOS/Brave Browser

(base) Joels-MBP:~ jcastro2$ ls /Applications/Brave\ Browser.app/Contents/MacOS/Brave\ Browser 
/Applications/Brave Browser.app/Contents/MacOS/Brave Browser

(base) Joels-MBP:~ jcastro2$ flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.3.9, on macOS 13.2.1 22D68 darwin-x64, locale en-US)
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
[!] Xcode - develop for iOS and macOS
    ✗ Xcode installation is incomplete; a full installation is necessary for iOS development.
      Download at: https://developer.apple.com/xcode/download/
      Or install Xcode via the App Store.
      Once installed, run:
        sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer
        sudo xcodebuild -runFirstLaunch
[✓] Chrome - develop for the web
[✓] Android Studio (version 2021.2)
[✓] Android Studio (version 2021.2)
[✓] VS Code (version 1.76.2)
[✓] Connected device (2 available)
[✓] HTTP Host Availability

! Doctor found issues in 1 category.

(base) Joels-MBP:~ jcastro2$ flutter devices
2 connected devices:

macOS (desktop) • macos  • darwin-x64     • macOS 13.2.1 22D68 darwin-x64
Chrome (web)    • chrome • web-javascript • Brave Browser 111.1.49.120

(base) Joels-MBP:corbu jcastro2$ flutter run -d chrome
Launching lib/main.dart on Chrome in debug mode...
Waiting for connection from debug service on Chrome...             19.6s
This app is linked to the debug service: ws://127.0.0.1:53120/Hampj1DMeys=/ws
Debug service listening on ws://127.0.0.1:53120/Hampj1DMeys=/ws

 Running with sound null safety 

  To hot restart changes while running, press "r" or "R".
For a more detailed help message, press "h". To quit, press "q".

An Observatory debugger and profiler on Chrome is available at: http://127.0.0.1:53120/Hampj1DMeys=
Flutter Web Bootstrap: Programmatic
The Flutter DevTools debugger and profiler on Chrome is available at: http://127.0.0.1:9101?uri=http://127.0.0.1:53120/Hampj1DMeys=

Available emulators: Available emulators

Why is the Brave browser not showing up even though flutter doctor says that everything is ok with the Chrome configuration?

jraufeisen
  • 3,005
  • 7
  • 27
  • 43
Joel Castro
  • 485
  • 6
  • 20

2 Answers2

1

Workaround for your issue is mentioned here
Brave Browser Workaround

run your app like a server

  flutter run -d web-server

http://localhost:5353

then use the generated link and open it in any browser.

Sagar
  • 402
  • 2
  • 10
  • yes, this works, however I was not looking for a workaround, I wanted a direct solution to my question. Although your solution is a workaround, it is ultimately not what I was looking for. Thanks for your answer, but I can't afford to pay 50 reputation for this lol – Joel Castro Mar 29 '23 at 22:24
  • No Problem I tried the same for my project but Brave Browser not showing in list – Sagar Mar 30 '23 at 05:23
  • Looks like I have to award the bounty to someone. Here you go mate, cheers. – Joel Castro Mar 31 '23 at 18:10
0

Did you specifically add a web target for this project via flutter create --platforms web?

Without this, the flutter plugin of Visual Studio Code thinks you do not intend to run this app on a browser. After adding the web target, your selected Chrome_Executable (chrome in my case) will show up in the UI.

Before: Browser not listed in the menu

After: Browser listed in the menu

jraufeisen
  • 3,005
  • 7
  • 27
  • 43
  • if I have Chrome preinstalled, it appears in the list of available devices. But I don't want Chrome, I want Brave. – Joel Castro Mar 26 '23 at 00:28