OS错误:连接被对等方重置,errno = 104,地址 = storage.googleapis.com,端口 = 37890

huangapple go评论89阅读模式
英文:

OS Error: Connection reset by peer, errno = 104, address = storage.googleapis.com, prort = 37890

问题

当我从pub.dev网站获取Flutter依赖包时,它无法安装,显示如下错误...

OS错误:连接被对等方重置,errno = 104,地址 = storage.googleapis.com,端口 = 37890

而且我的Flutter Doctor如下...

OS错误:连接被对等方重置,errno = 104,地址 = storage.googleapis.com,端口 = 37890

问题的详细描述在这里:
关于依赖项安装的Flutter问题

我该如何解决这个问题?

英文:

When I get Flutter Dependency Packages form pub.dev site then it not to install show below this this error...

OS错误:连接被对等方重置,errno = 104,地址 = storage.googleapis.com,端口 = 37890

And My Flutter Doctor is...

OS错误:连接被对等方重置,errno = 104,地址 = storage.googleapis.com,端口 = 37890

Details Description Issue here:
flutter issue for dependencies installation

How can i solve this problem?

答案1

得分: 6

你正试图连接到https,而服务器是http。

在链接中使用http,并将以下行添加到AndroidManifest.xml以允许http package连接到不安全的服务器

<application

android:usesCleartextTraffic="true"

英文:

You are trying to connect to https, while the server is http.

use http 'in the link' and add this line to AndroidManifest.xml to allow http package to connect to server that are not secure

&lt;application

        android:usesCleartextTraffic=&quot;true&quot;

答案2

得分: 3

可能是您的互联网服务提供商阻止了连接。您能访问https://pub.dartlang.org吗?

也许简单的flutter clean命令可以解决这个问题。如果不行,您还可以尝试flutter pub cache repair命令。

英文:

It may be your ISP blocking the connection. Can you access to https://pub.dartlang.org ?

Maybe a simple flutter clean might solve the issue. If not, you can also try flutter pub cache repair.

答案3

得分: 3

是的,托管Flutter SDK组件的服务器在我的国家(孟加拉国)被封锁。我使用VPN获取美国的IP地址,然后它可以正常工作。

英文:

Yes Servers hosting the Flutter SDK components blocked in my country (Bangladesh). I used vpn for USA IP address then it works.

答案4

得分: 0

因为请求的URL(URI)太长,发生了这种情况。后端直接关闭了连接,并显示消息“连接被对等方重置”。

解决方案:将大数据发送到请求体中(而不是在标头内)。

英文:

In my case it happened, because the request url (uri) was too long. The backend closed the connection directly with the message "Connection reset by peer".

Solution: Send large data within the body field (not inside headers).

huangapple
  • 本文由 发表于 2020年1月4日 12:47:40
  • 转载请务必保留本文链接:https://go.coder-hub.com/59587977.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定