Repository navigation
【ERROR】Unable to pub upgrade flutter tool. Retrying in five seconds... #13349
Copy link
Copy link
Closed
Labels
a: first hourThe first hour of using FlutterThe first hour of using Fluttert: flutter doctorProblem related to the "flutter doctor" toolProblem related to the "flutter doctor" tooltoolAffects the "flutter" command-line tool. See also t: labels.Affects the "flutter" command-line tool. See also t: labels.
Description
ubuntu 17.04
环境搭建遇到错误
git clone -b alpha https://github.com/flutter/flutter.gitevanyan@ps:~$ flutter doctor
Building flutter tool...
The setter 'readEventsEnabled=' was called on null.
Receiver: null
Tried calling: readEventsEnabled=false
package:pub/src/source/hosted.dart 338 BoundHostedSource._throwFriendlyError
package:pub/src/source/hosted.dart 140 BoundHostedSource.doGetVersions
===== asynchronous gap ===========================
package:pub/src/source.dart 165 BoundSource.getVersions
package:pub/src/solver/version_solver.dart 231 SolverCache.getVersions.<fn>
dart:async runZoned
package:pub/src/http.dart 228 withDependencyType
package:pub/src/solver/version_solver.dart 230 SolverCache.getVersions
===== asynchronous gap ===========================
package:pub/src/solver/unselected_package_queue.dart 121 UnselectedPackageQueue._getNumVersions
===== asynchronous gap ===========================
package:pub/src/solver/unselected_package_queue.dart 50 UnselectedPackageQueue.add
===== asynchronous gap ===========================
package:pub/src/solver/version_selection.dart 68 VersionSelection.select.<fn>
===== asynchronous gap ===========================
dart:async _completeOnAsyncReturn
package:pub/src/solver/version_selection.dart 70 VersionSelection.select.<fn>
dart:async _completeOnAsyncReturn
package:pub/src/solver/unselected_package_queue.dart 54 UnselectedPackageQueue.add
dart:async _completeOnAsyncReturn
package:pub/src/solver/unselected_package_queue.dart 128 UnselectedPackageQueue._getNumVersions
dart:async _Completer.completeError
package:pub/src/solver/version_solver.dart 254 SolverCache.getVersions
dart:async _Completer.completeError
package:pub/src/source/hosted.dart 153 BoundHostedSource.doGetVersions
dart:async _Completer.completeError
package:http/src/base_client.dart 172 BaseClient._sendUnstreamed
dart:async _Completer.completeError
package:http_throttle/http_throttle.dart 51 ThrottleClient.send
dart:async _Completer.completeError
package:pub/src/http.dart 127 _PubHttpClient.send
dart:async _Completer.completeError
package:http/src/io_client.dart 66 IOClient.send
This is an unexpected error. Please run
pub --trace upgrade --verbosity=error --no-packages-dir
and include the logs in an issue on https://github.com/dart-lang/pub/issues/new
Error: Unable to pub upgrade flutter tool. Retrying in five seconds...Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
a: first hourThe first hour of using FlutterThe first hour of using Fluttert: flutter doctorProblem related to the "flutter doctor" toolProblem related to the "flutter doctor" tooltoolAffects the "flutter" command-line tool. See also t: labels.Affects the "flutter" command-line tool. See also t: labels.
Activity
eseidelGoogle commentedon Dec 5, 2017
Presumably this is an access error to pub.dartlang.org which is causing a cascading failure? Which means there are several things wrong. @mit-mit
JavenLu commentedon Dec 16, 2017
i have a problem,please help!
junludeMBP:~ Javen$ flutter doctor
Building flutter tool...
Got socket error trying to find package coverage at https://pub.dartlang.org.
Error: Unable to pub upgrade flutter tool. Retrying in five seconds...
Connection failed (OS Error: No route to host, errno = 65), address = storage.googleapis.com, port = 443
Error: Unable to pub upgrade flutter tool. Retrying in five seconds...
@eseidelGoogle
thank you very much
eseidelGoogle commentedon Dec 16, 2017
If you're in China, please try https://github.com/flutter/flutter/wiki/Using-Flutter-in-China and let us know if that doesn't work.
JavenLu commentedon Dec 17, 2017
Thanks! it works! @eseidelGoogle
Hixie commentedon Jan 9, 2018
These are all probably dupes of each other: #12301 #12702 #13222 #13349
kendeng9898 commentedon Jan 9, 2018
Check http_proxy or system wide proxy have setting. remove the proxy setting. My Ubuntu 16.04, got this error. After remove the proxy setting everything go well.
linguowu commentedon Feb 6, 2018
still get the error when i
export PUB_HOSTED_URL=https://pub.flutter-io.cn
export FLUTTER_STORAGE_BASE_URL=https://storage.flutter-io.cn
then i run the example of hello_world
Running "flutter packages get" in hello_world...
that will make me give up .......
InMatrix commentedon Feb 6, 2018
@linguowu Can you run the default app created by
flutter create?linguowu commentedon Feb 7, 2018
@InMatrix
when i run "flutter create myapp"
it shows below:
InMatrix commentedon Feb 7, 2018
@linguowu It looks like the environmental variables were not working. Can you provide the following information for diagnostic purposes:
echo $PUB_HOSTED_URLecho $FLUTTER_STORAGE_BASE_URLls ~/.pub-cache/hostedflutter doctor -vAlso, did you use the mirror to install Flutter?
Thank you for your patience.
linguowu commentedon Feb 8, 2018
@InMatrix
how to get the mirror to install Flutter?
below is the output for diagnostic:
`country5deMacBook-Pro-2:~ country5$ echo $PUB_HOSTED_URL
country5deMacBook-Pro-2:~ country5$ echo $FLUTTER_STORAGE_BASE_URL
country5deMacBook-Pro-2:~ country5$ ls ~/.pub-cache/hosted
pub.dartlang.org pub.flutter-io.cn
mit-mit commentedon Feb 8, 2018
@linguowu given the output of the ECHO commands you have is empty it looks like those variable were not correctly exported/set. You need to make sure they are set before running the flutter command. See https://github.com/flutter/flutter/wiki/Using-Flutter-in-China for details.
InMatrix commentedon Feb 8, 2018
@linguowu In addition to what @mit-mit said, you can persist these environment variables by adding these export commands to
$HOME/.bash_profileand thensource $HOME/.bash_profile.hphpwj commentedon Feb 28, 2018
D:\flutter\flutter>flutter doctor
Updating flutter tool...
Error: Unable to 'pub upgrade' flutter tool. Retrying in five seconds...
Waiting for 0 seconds, press CTRL+C to quit ...
Error: Unable to 'pub upgrade' flutter tool. Retrying in five seconds...
Waiting for 3 seconds, press CTRL+C to quit ...
Terminate batch job (Y/N)? y
and the environment variables is added:
D:\flutter\flutter>echo %FLUTTER_STORAGE_BASE_URL%
https://storage.flutter-io.cn
D:\flutter\flutter>echo %PUB_HOSTED_URL%
https://pub.flutter-io.cn
a1265137718 commentedon Mar 11, 2018
2 .then try to excute : C:\flutterdev\flutter\bin\flutter.bat
i sovled my problem
zoechi commentedon Jan 17, 2019
Duplicate of #12301
tarisham commentedon Aug 11, 2019
hi
go to the bios and change vm (Virtual machine) from disable to enable. you want to run emulator so its Necessary.
github-actions commentedon Aug 16, 2021
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.