loading...

Small issue solution in flutter.

adityasingh20 profile image Plugger ・1 min read
    Hey ! thanks for clicking the link and coming here.

You being here simply means that you are facing error on vscode/Android Studio for the respective flutter related issue. so! not taking your much time i shall solution to them.

The first basic issue I encountered while making my flutter application was this

flutter channel master

Switching to flutter channel 'master'...

git: fatal: 'origin/master' is not a commit and a branch 'master' cannot be created from it

Switching channels failed with error code 128.

soln :- git remote add origin https://github.com/flutter/flutter

by typing the above command you shall get rid of the following mentioned error which took my 1 day .

The second basic and yet important error encountered my many beginners is

flutter run -d chrome
Launching lib\main.dart on Chrome in debug mode...
Syncing files to device Chrome...
40,111ms (!)
Failed to establish connection with the application instance in Chrome.
This can happen if the websocket connection used by the web tooling is unable to correctly establish a connection, for example

due to a firewall.

Now frankly speaking this issue took me about 3 days and even flutter github support was unable to help me overcome the error but by searching to and fro and also by repeatedly trying I got the below solution

Soln:- for many (flutter clean or flutter pub cache repair ) but in my case i have to disable the security feature of firewall from chrome which is a bit risky.

So, Thank you guys for entertaining this blog hope the above solutions will help you getting out of the problem.

Posted on by:

adityasingh20 profile

Plugger

@adityasingh20

Learner. Explorer. Believer.

Discussion

markdown guide
 

flutter run -d chrome --release

running in release mode is the solution to this problem