-
Notifications
You must be signed in to change notification settings - Fork 28.9k
Closed
Labels
a: chinaChina and its Great FirewallChina and its Great Firewallplatform-linuxBuilding on or for Linux specificallyBuilding on or for Linux specificallytoolAffects the "flutter" command-line tool. See also t: labels.Affects the "flutter" command-line tool. See also t: labels.
Description
Steps to Reproduce
export PUB_HOSTED_URL=https://pub.flutter-io.cn
export FLUTTER_STORAGE_BASE_URL=https://storage.flutter-io.cn
git clone -b dev https://github.com/flutter/flutter.git
export PATH="$PWD/flutter/bin:$PATH"
cd ./flutter
- ...In the terminal , I input flutter .....
- ...At the start,flutter is downing sdk ,and when download complete , output this error.
Logs
heaven@Heaven-Code-Master:~/Development$ flutter
Downloading Dart SDK from Flutter engine 7375a0f414bde4bc941e623482221db2fc8c4ab5...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 49.3M 100 49.3M 0 0 2680k 0 0:00:18 0:00:18 --:--:-- 3053k
Building flutter tool...
-------------------Error will encounter -------------------------------
The setter 'readEventsEnabled=' was called on null.
Receiver: null
Tried calling: readEventsEnabled=false
package:pub/src/source/hosted.dart 341:7 BoundHostedSource._throwFriendlyError
package:pub/src/source/hosted.dart 142:7 BoundHostedSource.doGetVersions
===== asynchronous gap ===========================
package:pub/src/source.dart 167:12 BoundSource.getVersions
package:pub/src/solver/package_lister.dart 76:44 PackageLister._versions.<fn>.<fn>
dart:async runZoned
package:pub/src/http.dart 272:10 withDependencyType
package:pub/src/solver/package_lister.dart 75:33 PackageLister._versions.<fn>
===== asynchronous gap ===========================
dart:async new Future.sync
package:async/src/async_memoizer.dart 43:42 AsyncMemoizer.runOnce
package:pub/src/solver/package_lister.dart 74:58 PackageLister._versions
package:pub/src/solver/package_lister.dart 111:21 PackageLister.countVersions
===== asynchronous gap ===========================
package:pub/src/solver/version_solver.dart 354:44 VersionSolver._choosePackageVersion.<fn>
===== asynchronous gap ===========================
package:pub/src/utils.dart 301:39 minByAsync
===== asynchronous gap ===========================
package:pub/src/solver/version_solver.dart 350:25 VersionSolver._choosePackageVersion
===== asynchronous gap ===========================
package:pub/src/solver/version_solver.dart 97:22 VersionSolver.solve
===== asynchronous gap ===========================
package:pub/src/solver.dart 35:10 resolveVersions.<fn>
package:pub/src/log.dart 378:18 progress
package:pub/src/solver.dart 32:10 resolveVersions
package:pub/src/entrypoint.dart 200:24 Entrypoint.acquireDependencies
===== asynchronous gap ===========================
package:pub/src/command/upgrade.dart 43:22 UpgradeCommand.run
===== asynchronous gap ===========================
package:args/command_runner.dart 194:27 CommandRunner.runCommand
===== asynchronous gap ===========================
package:pub/src/command_runner.dart 168:39 PubCommandRunner.runCommand.<fn>
dart:async new Future.sync
package:pub/src/utils.dart 109:12 captureErrors.<fn>
dart:async runZoned
package:pub/src/utils.dart 126:5 captureErrors
package:pub/src/command_runner.dart 168:13 PubCommandRunner.runCommand
===== asynchronous gap ===========================
package:pub/src/command_runner.dart 117:11 PubCommandRunner.run
===== asynchronous gap ===========================
/b/build/slave/Linux_Engine/build/src/third_party/dart/third_party/pkg/pub/bin/pub.dart 8:22 main
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... (9 tries left)
Metadata
Metadata
Assignees
Labels
a: chinaChina and its Great FirewallChina and its Great Firewallplatform-linuxBuilding on or for Linux specificallyBuilding on or for Linux specificallytoolAffects the "flutter" command-line tool. See also t: labels.Affects the "flutter" command-line tool. See also t: labels.
Type
Projects
Milestone
Relationships
Development
Select code repository
Activity
SunLongbri commentedon Dec 7, 2018
How should I do ?
SunLongbri commentedon Dec 7, 2018
I think the reason is :pub enrivonment is not ready , but I don't what to do that make the environment of pub is ready.The computer system I used is Ubuntu 18.04.1LTS.
zoechi commentedon Dec 7, 2018
I don't think there is such a thing as an pub environment that needs to get ready.
Could you try to open https://pub.flutter-io.cn/api/packages in the browser and check if you get JSON response back (several pages long)?
SunLongbri commentedon Dec 7, 2018
Yes , I can get the Json from browser,and I get the Json is :
next_url | "https://pub.flutter-io.cn/api/packages?page=2"
SunLongbri commentedon Dec 7, 2018
I can get lots of pages:I think my computer's network is good.
next_url | "https://pub.flutter-io.cn/api/packages?page=8"
SunLongbri commentedon Dec 7, 2018
God , God , I like the language of flutter very much , I hope I can get help to resolve this problem.
SunLongbri commentedon Dec 7, 2018
I already resolve this problems , the reason is that I use lantern . And in this way , my network crashed by VPN.
SunLongbri commentedon Dec 7, 2018
Thought ,I resolved this problems ,but when I input the 'flutter doctor ',another problem encounter.
When I input the order 'sudo apt-get install lib32stdc++6'
terminal encounter------>
My Computer System :Ubuntu 18.04 64 ,I think I can't install lib32stdc++6 ,because it's 32 .
I think is right?
FlyAwayL commentedon Dec 10, 2018
Maybe you can download Flutter sdk again.
zoechi commentedon Dec 28, 2018
Related to #10335
zoechi commentedon Jan 17, 2019
Duplicate of #12301
github-actions commentedon Aug 14, 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 -v
and a minimal reproduction of the issue.