Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Finished with error: Failed to establish connection with the application instance in Chrome

Tags:

flutter-web

Finished with error: Failed to establish connection with the application instance in Chrome. This can happen if the websocket connection used by the web tooling is unabled to correctly establish a connection, for example due to a firewall.

I am getting this error, when i run my flutter web application on chrome browser. I also turn off my firewall even that didnot solve my problem.

What will be the possible solution for resolving this eror?

Temporary Solution that i had tried:
I had this issue when upgrading from dev channel to master channel. what i did to solve this problem is, clean my project's build cache (flutter clean), then run the project using release mode. After that, i can run it on debug mode.

This solved my problem temporarily and after some time i still facing the same issue. And implementing the same solution didnot solve my problem.

like image 625
Umair Avatar asked Jan 23 '20 09:01

Umair


People also ask

Why does chrome fail to connect to the application instance?

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 firewallfor example due to a firewall.

What does failed to establish connection with the application instance mean?

Bookmark this question. Show activity on this post. Finished with error: Failed to establish connection with the application instance in Chrome. This can happen if the websocket connection used by the web tooling is unabled to correctly establish a connection, for example due to a firewall.

Why did the connector fail to establish connection with the service?

Description: The Connector failed to establish connection with the service Cause: This failure is caused when the required URL access outbound from the connector is not allowed. Troubleshooting steps:

Why is my flutter application not connecting to Chrome?

This can happen if the websocket connection used by the web tooling is unabled to correctly establish a connection, for example due to a firewall. I am getting this error, when i run my flutter web application on chrome browser.


3 Answers

flutter run -d chrome --release

running in release mode is the solution to this problem

*this solves the problem but also makes it impossible to debug your app at the same time when running it

like image 138
revenantcoder Avatar answered Oct 21 '22 12:10

revenantcoder


I'm glad that you solved the issue, when upgrading version or changing channel it's generally a good idea to run flutter clean and if needed flutter pub cache repair; I believe there's no action to be taken.

like image 10
Abubakr Elghazawy Avatar answered Oct 21 '22 12:10

Abubakr Elghazawy


Use below commands:

flutter channel master
flutter create --web
flutter config --enable-web
flutter devices
run -d web
flutter clean
flutter run -d chrome
like image 7
M Karimi Avatar answered Oct 21 '22 11:10

M Karimi