美文网首页
flutter-运行Chrome(web-javascript)

flutter-运行Chrome(web-javascript)

作者: 浮华_du | 来源:发表于2021-05-19 10:44 被阅读0次
一.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.
1.首先检查是不是开了网络代理;

控制台输入

    git config --global http.proxy
    git config --global https.proxy

查看是否开启了终端代理; 如果有,执行以下语句去掉终端代理.

git config --global --unset https.proxy
git config --global --unset http.proxy

查看网络偏好设置-高级-代理,查看是否配置了代理

2.检查防火墙是否开启;

系统偏好设置-安全性与隐私-防火墙,查看是否开始防火墙;
开启的话,防火墙选项中是否允许Chrome的允许传入连接,需要加入允许或关闭防火墙.

3.检查本地localhost;
sudo vi /etc/hosts 

查看本地localhost是否有问题,配置本地localhost 127.0.0.1

4. SwitchHost;

SwitchHost中添加:

# Flutter Web
127.0.0.1 localhost

相关文章

网友评论

      本文标题:flutter-运行Chrome(web-javascript)

      本文链接:https://www.haomeiwen.com/subject/wvtpjltx.html