Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.6k views
in Technique[技术] by (71.8m points)

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

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.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...