Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Dart pub update failed

I am getting the following error when trying to do a pub update to get the web_ui package installed.

Dart Editor version : 0.2.10_r16761

Dart SDK version : 0.2.10.1_r16761

The "Help > About > Check for Update..." also gives me "Unable to get latest revision". Is it a proxy problem maybe?

Is there a manual way to add packages, e.g. download the package and put it somewhere?

Running pub update ...
Pub update failed, [1] Resolving dependencies...
Got socket error trying to find package "web_ui" at http://pub.dartlang.org.
OS Error: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
, errno = 10060
like image 761
Geert Avatar asked Jan 14 '13 10:01

Geert


People also ask

How do I update my pub in Flutter?

To upgrade to a new version of the package, for example to use new features in that package, run flutter pub upgrade (Upgrade dependencies in IntelliJ or Android Studio) to retrieve the highest available version of the package that is allowed by the version constraint specified in pubspec. yaml .

How do I fix version solve failed in Flutter?

Solution 2: You can use dependency_overrides it to temporarily override all references to a dependency. Here is the older version of my pubspec. yaml which is working before upgrading to Flutter 2.


1 Answers

Based on the comment discussion, this issue is due to you being behind a HTTP Proxy server. The Dart Editor and Dart Pub do no honor a system's proxy settings and only work if you have a normal connection out to the web. There are currently 2 bugs written up that the Dart team will hopefully fix at some point, but they are not there yet.

Please see more details about this issue on the bugs and star the bugs if you would like it to be fixed.

  • Bug 5455: Allow Dart Editor to use a proxy for updates
  • Bug 5454: Allow Pub to use an HTTP Proxy
like image 71
Kyrra Avatar answered Oct 05 '22 15:10

Kyrra