Skip to content

Error when pub upgrade flutter tool #1812

Closed
@kafji

Description

@kafji

Running flutter doctor on MacOS resulting with these error codes:

Downloading Dart SDK from Flutter engine ead227f118077d1f2b57842a32abaf105b573b8a...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 43.3M  100 43.3M    0     0   141k      0  0:05:13  0:05:13 --:--:--  218k
Building flutter tool...
gzip: (stdin): trailing garbage ignored
tar: Child returned status 1
tar: Error is not recoverable: exiting now
gzip: (stdin): trailing garbage ignored
tar: Child returned status 1
tar: Error is not recoverable: exiting now
Failed to extract .tar.gz stream to /Users/mine/.pub-cache/_temp/dirA3ajh1 (exit code 2).
package:pub/src/io.dart 928                                                              extractTarGz
===== asynchronous gap ===========================
package:pub/src/source/hosted.dart 302                                                   BoundHostedSource._download
===== asynchronous gap ===========================
package:pub/src/source/hosted.dart 196                                                   BoundHostedSource.downloadToSystemCache
===== asynchronous gap ===========================
package:pub/src/entrypoint.dart 525                                                      Entrypoint._get.<fn>
===== asynchronous gap ===========================
dart:async                                                                               runZoned
package:pub/src/http.dart 267                                                            withDependencyType
package:pub/src/entrypoint.dart 520                                                      Entrypoint._get
package:pub/src/entrypoint.dart 233                                                      Entrypoint.acquireDependencies.<fn>
dart:async                                                                               Future.wait
package:pub/src/entrypoint.dart 233                                                      Entrypoint.acquireDependencies
===== asynchronous gap ===========================
package:pub/src/command/upgrade.dart 41                                                  UpgradeCommand.run
===== asynchronous gap ===========================
package:args/command_runner.dart 194                                                     CommandRunner.runCommand
===== asynchronous gap ===========================
package:pub/src/command_runner.dart 167                                                  PubCommandRunner.runCommand.<fn>
dart:async                                                                               new Future.sync
package:pub/src/utils.dart 103                                                           captureErrors.<fn>
dart:async                                                                               runZoned
package:pub/src/utils.dart 122                                                           captureErrors
package:pub/src/command_runner.dart 167                                                  PubCommandRunner.runCommand
===== asynchronous gap ===========================
package:pub/src/command_runner.dart 116                                                  PubCommandRunner.run
===== asynchronous gap ===========================
/b/build/slave/Mac_Engine/build/src/third_party/dart/third_party/pkg/pub/bin/pub.dart 8  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...

Running pub --trace upgrade --verbosity=error --no-packages-dir from flutter/bin/cache/dart-sdk/bin resulting with error message:

Could not find a file named "pubspec.yaml" in "/Users/mine/flutter/bin/cache/dart-sdk/bin".
---- Log transcript ----
FINE: Pub 2.0.0-edge.0d5cf900b021bf5c9fa593ffa12b15bcd1cc5fe0
ERR : Could not find a file named "pubspec.yaml" in "/Users/mine/flutter/bin/cache/dart-sdk/bin".
FINE: Exception type: FileException
FINE: package:pub/src/pubspec.dart 585         new Pubspec.load
    | package:pub/src/package.dart 139         new Package.load
    | package:pub/src/entrypoint.dart 149      new Entrypoint
    | package:pub/src/command.dart 42          PubCommand.entrypoint
    | package:pub/src/command/upgrade.dart 41  UpgradeCommand.run
    | ===== asynchronous gap ===========================
    | dart:async                               _Completer.completeError
    | package:pub/src/command/upgrade.dart     UpgradeCommand.run
    | ===== asynchronous gap ===========================
    | dart:async                               new Future.microtask
    | package:pub/src/command/upgrade.dart 40  UpgradeCommand.run
    | package:args/command_runner.dart 194     CommandRunner.runCommand
    | ===== asynchronous gap ===========================
    | dart:async                               new Future.microtask
    | package:args/command_runner.dart 142     CommandRunner.runCommand
    | package:pub/src/command_runner.dart 167  PubCommandRunner.runCommand.<fn>
    | dart:async                               new Future.sync
    | package:pub/src/utils.dart 103           captureErrors.<fn>
    | package:stack_trace                      Chain.capture
    | package:pub/src/utils.dart 118           captureErrors
    | package:pub/src/command_runner.dart 167  PubCommandRunner.runCommand
---- End log transcript ----

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions