<p dir="auto">I just tried to run <code class="notranslate">flutter upgrade</code> and I got this message:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="sethladd-macbookpro:flutter_gallery sethladd$ flutter upgrade &amp;&amp; flutter run --release
fatal: no upstream configured for branch 'package-assets'
Unable to upgrade Flutter: no upstream repository configured.
sethladd-macbookpro:flutter_gallery sethladd$"><pre class="notranslate"><code class="notranslate">sethladd-macbookpro:flutter_gallery sethladd$ flutter upgrade &amp;&amp; flutter run --release
fatal: no upstream configured for branch 'package-assets'
Unable to upgrade Flutter: no upstream repository configured.
sethladd-macbookpro:flutter_gallery sethladd$
</code></pre></div>
<p dir="auto">As a user, I'm left wondering:</p>
<ul dir="auto">
<li>What state am I in?</li>
<li>Did it fail?</li>
</ul>
<p dir="auto">Suggestion:</p>
<p dir="auto">Assuming that the whole upgrade did indeed fail, let's print out how to mitigate this particular error (I'm actually not sure what to do here?) and at least print out "Upgrade failed".</p>
<p dir="auto">Thanks!</p>
<h2 dir="auto">Steps to Reproduce</h2>

<ol dir="auto">
<li></li>
</ol>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="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=&quot;$PWD/flutter/bin:$PATH&quot;
cd ./flutter"><pre class="notranslate"><code class="notranslate">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
</code></pre></div>
<ol start="2" dir="auto">
<li>...In the terminal , I input flutter .....</li>
<li>...At the start,flutter is downing sdk ,and when download complete , output this error.</li>
</ol>
<h2 dir="auto">Logs</h2>

<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="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.&lt;fn&gt;.&lt;fn&gt;
dart:async                                                                                    runZoned
package:pub/src/http.dart 272:10                                                              withDependencyType
package:pub/src/solver/package_lister.dart 75:33                                              PackageLister._versions.&lt;fn&gt;
===== 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.&lt;fn&gt;
===== 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.&lt;fn&gt;
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.&lt;fn&gt;
dart:async                                                                                    new Future.sync
package:pub/src/utils.dart 109:12                                                             captureErrors.&lt;fn&gt;
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)"><pre class="notranslate"><code class="notranslate">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.&lt;fn&gt;.&lt;fn&gt;
dart:async                                                                                    runZoned
package:pub/src/http.dart 272:10                                                              withDependencyType
package:pub/src/solver/package_lister.dart 75:33                                              PackageLister._versions.&lt;fn&gt;
===== 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.&lt;fn&gt;
===== 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.&lt;fn&gt;
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.&lt;fn&gt;
dart:async                                                                                    new Future.sync
package:pub/src/utils.dart 109:12                                                             captureErrors.&lt;fn&gt;
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)
</code></pre></div>