Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Flutter No devices found with name or id matching 'chrome' on Windows 10

Tags:

flutter-web

I installed Flutter beta version using official guide. Enabled web:

 flutter channel beta
 flutter upgrade
 flutter config --enable-web

The result is:

Setting "enable-web" value to "true".

You may need to restart any open editors for them to read new settings.

The result of flutter devices command:

>flutter devices
1 connected device:

Web Server • web-server • web-javascript • Flutter Tools

The official guide points that there should be two devices:

Chrome     • chrome     • web-javascript • Google Chrome 78.0.3904.108
Web Server • web-server • web-javascript • Flutter Tools

I created sample app from the official guide and tried to build it:

 flutter create myapp
 cd myapp
 flutter run -d chrome

The result is:

No devices found with name or id matching 'chrome'

Latest Google Chrome is installed. I have read on github the problem could be solved by setting environment variable CHROME_EXECUTABLE. I tried to set it using path to chrome.exe and path to folder containing chrome.exe with same unsuccessful result.

I executed flutter doctor -v:

[X] Chrome - develop for the web (Cannot find chrome executable at "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe")
    ! "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" is not executable.

I thought the problem could be in path with spaces but setting different path in CHROME_EXECUTABLE does not solve the problem.

[X] Chrome - develop for the web (Cannot find chrome executable at "D:\Portable\Chromium\chrome-win\chrome.exe")
    ! "D:\Portable\Chromium\chrome-win\chrome.exe" is not executable.

Does anybody have any idea?

like image 557
Michael Lukin Avatar asked Mar 20 '20 21:03

Michael Lukin


People also ask

How do I change the device selection on flutter?

Launch Android Studio → menu Tools → AVD Manager and select Create Virtual Device. Choose a device definition and select Next . Select one or more system images for the Android versions you want to emulate, and select Next. An x86 or x86_64 image is recommended.


Video Answer


5 Answers

This solution worked for me:

$ flutter upgrade
$ flutter config --enable-web
$ flutter run -d chrome

If chrome is not available in Flutter device selection try restarting the IDE.

like image 82
Android_id Avatar answered Oct 21 '22 12:10

Android_id


Did you try to switch to master channel ? Or to run "flutter create ." in the project root ?

If not, you can try :

flutter channel master
flutter upgrade
flutter config --enable-web
cd <into project directory>
flutter create .
flutter run -d chrome
like image 27
MickaelHrndz Avatar answered Oct 21 '22 12:10

MickaelHrndz


As OP suggested I am listing my comments from above, as an answer. I believe the portable chrome usage is new w.r.t flutter and suspect this could be useful for others instead of deleting the question.

Some of the options you can try in Windows 10 are.

  1. Run the refreshenv command in the commanda prompt.
  2. Make sure to have correct flutter installation in your path.
  3. Remove the double quotes " " around the path string.

In this case the 3rd option solved the issue.👍

like image 3
Abhilash Chandran Avatar answered Oct 21 '22 13:10

Abhilash Chandran


Create system environment variables for user and system with Variable name: chrome Variable path: path_to_chrome

like image 2
Lucky Dogra Avatar answered Oct 21 '22 13:10

Lucky Dogra


turns out thiscan be fixed by switching channels

i.e.

flutter channel
flutter channel beta
like image 1
Getshauky Avatar answered Oct 21 '22 12:10

Getshauky