flutter / flutter

Flutter makes it easy and fast to build beautiful apps for mobile and beyond
https://flutter.dev
BSD 3-Clause "New" or "Revised" License
166.09k stars 27.42k forks source link

[tool_crash] ProcessException: End-of-central-directory signature not found. Either this file is not a zipfile, or it constitutes one disk of a multi-part archive #66243

Open ramchn opened 4 years ago

ramchn commented 4 years ago

Detailed error:

[tool_crash] ProcessException: The command failedStdout:Stderr:[/home/ramamoorthy/snap/flutter/common/flutter/bin/cache/downloads/storage.googleapis.com/flutter_infra/flutter/4654fc6cf6416daae78eac2c211ad84c46e21625/linux-x64/artifacts.zip] End-of-central-directory signature not found. Either this file is not a zipfile, or it constitutes one disk of a multi-part archive. In the latter case the central directory and zipfile comment will be found on the last disk(s) of this archive.unzip: cannot find zipfile directory in one of /home/ramamoorthy/snap/flutter/common/flutter/bin/cache/downloads/storage.googleapis.com/flutter_infra/flutter/4654fc6cf6416daae78eac2c211ad84c46e21625/linux-x64/artifacts.zip or /home/ramamoorthy/snap/flutter/common/flutter/bin/cache/downloads/storage.googleapis.com/flutter_infra/flutter/4654fc6cf6416daae78eac2c211ad84c46e21625/linux-x64/artifacts.zip.zip, and cannot find /home/ramamoorthy/snap/flutter/common/flutter/bin/cache/downloads/storage.googleapis.com/flutter_infra/flutter/4654fc6cf6416daae78eac2c211ad84c46e21625/linux-x64/artifacts.zip.ZIP, period. Command: unzip, OS error code: 9

Command

flutter --no-color --no-version-check precache

Steps to Reproduce

  1. ...
  2. ...
  3. ...

Logs

ProcessException: The command failed
Stdout:

Stderr:
[/home/ramamoorthy/snap/flutter/common/flutter/bin/cache/downloads/storage.googleapis.com/flutter_infra/flutter/4654fc6cf6416daae78eac2c211ad84c46e21625/linux-x64/artifacts.zip]
  End-of-central-directory signature not found.  Either this file is not
  a zipfile, or it constitutes one disk of a multi-part archive.  In the
  latter case the central directory and zipfile comment will be found on
  the last disk(s) of this archive.
unzip:  cannot find zipfile directory in one of /home/ramamoorthy/snap/flutter/common/flutter/bin/cache/downloads/storage.googleapis.com/flutter_infra/flutter/4654fc6cf6416daae78eac2c211ad84c46e21625/linux-x64/artifacts.zip or
        /home/ramamoorthy/snap/flutter/common/flutter/bin/cache/downloads/storage.googleapis.com/flutter_infra/flutter/4654fc6cf6416daae78eac2c211ad84c46e21625/linux-x64/artifacts.zip.zip, and cannot find /home/ramamoorthy/snap/flutter/common/flutter/bin/cache/downloads/storage.googleapis.com/flutter_infra/flutter/4654fc6cf6416daae78eac2c211ad84c46e21625/linux-x64/artifacts.zip.ZIP, period.
 Command: unzip, OS error code: 9

#0      RunResult.throwException (package:flutter_tools/src/base/process.dart:172:5)
#1      _DefaultProcessUtils.runSync (package:flutter_tools/src/base/process.dart:463:17)
#2      _PosixUtils.unzip (package:flutter_tools/src/base/os.dart:221:19)
#3      ArtifactUpdater._downloadArchive (package:flutter_tools/src/cache.dart:1511:18)
#4      _rootRunUnary (dart:async/zone.dart:1198:47)
#5      _CustomZone.runUnary (dart:async/zone.dart:1100:19)
#6      _FutureListener.handleValue (dart:async/future_impl.dart:143:18)
#7      Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:696:45)
#8      Future._propagateToListeners (dart:async/future_impl.dart:725:32)
#9      Future._completeWithValue (dart:async/future_impl.dart:529:5)
#10     Future._asyncCompleteWithValue.<anonymous closure> (dart:async/future_impl.dart:567:7)
#11     _rootRun (dart:async/zone.dart:1190:13)
#12     _CustomZone.run (dart:async/zone.dart:1093:19)
#13     _CustomZone.runGuarded (dart:async/zone.dart:997:7)
#14     _CustomZone.bindCallbackGuarded.<anonymous closure> (dart:async/zone.dart:1037:23)
#15     _microtaskLoop (dart:async/schedule_microtask.dart:41:21)
#16     _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5)
#17     _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:118:13)
#18     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:169:5)
[✓] Flutter (Channel beta, 1.22.0-12.1.pre, on Linux, locale en_IN)
    • Flutter version 1.22.0-12.1.pre at /home/ramamoorthy/snap/flutter/common/flutter
    • Framework revision 8b3760638a (5 days ago), 2020-09-15 17:47:13 -0700
    • Engine revision 4654fc6cf6
    • Dart version 2.10.0 (build 2.10.0-110.3.beta)

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
    • Android SDK at /home/ramamoorthy/Android/Sdk
    • Platform android-30, build-tools 30.0.2
    • Java binary at: /home/ramamoorthy/android-studio/jre/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
    • All Android licenses accepted.

[✓] Chrome - develop for the web
    • Chrome at google-chrome

[✓] Android Studio (version 4.0)
    • Android Studio at /home/ramamoorthy/android-studio
    • Flutter plugin version 49.0.2
    • Dart plugin version 193.7547
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)

[✓] VS Code (version 1.49.1)
    • VS Code at /usr/share/code
    • Flutter extension version 3.14.1

[✓] Connected device (2 available)
    • Web Server (web) • web-server • web-javascript • Flutter Tools
    • Chrome (web)     • chrome     • web-javascript • Google Chrome 84.0.4147.105

• No issues found!

Flutter Application Metadata

No pubspec in working directory.

rekire commented 11 months ago

I run into the same error after a down and upgrade of the flutter sdk

flutter upgrade                           
Upgrading Flutter to 3.16.0 from 3.13.9 in /Users/rekire/dev/flutter...
Downloading Darwin arm64 Dart SDK from Flutter engine 74d16627b940bb15e50891f82cad6c3e3465bd6d...

[... unrelated ...]

Downloading darwin-arm64 tools...                                   5,1s
[/Users/rekire/dev/flutter/bin/cache/downloads/storage.googleapis.com/flutter_infra_release/flutter/74d16627b940bb15e50891f82cad6c3e3465bd6d/darwin-arm64/artifacts.zip]
  End-of-central-directory signature not found.  Either this file is not
  a zipfile, or it constitutes one disk of a multi-part archive.  In the
  latter case the central directory and zipfile comment will be found on
  the last disk(s) of this archive.
unzip:  cannot find zipfile directory in one of /Users/rekire/dev/flutter/bin/cache/downloads/storage.googleapis.com/flutter_infra_release/flutter/74d16627b940bb15e50891f82cad6c3e3465bd6d/darwin-arm64/artifacts.zip or
        /Users/rekire/dev/flutter/bin/cache/downloads/storage.googleapis.com/flutter_infra_release/flutter/74d16627b940bb15e50891f82cad6c3e3465bd6d/darwin-arm64/artifacts.zip.zip, and cannot find /Users/rekire/dev/flutter/bin/cache/downloads/storage.googleapis.com/flutter_infra_release/flutter/74d16627b940bb15e50891f82cad6c3e3465bd6d/darwin-arm64/artifacts.zip.ZIP, period.
Downloading darwin-arm64 tools...                                   4,2s
[/Users/rekire/dev/flutter/bin/cache/downloads/storage.googleapis.com/flutter_infra_release/flutter/74d16627b940bb15e50891f82cad6c3e3465bd6d/darwin-arm64/artifacts.zip]
  End-of-central-directory signature not found.  Either this file is not
  a zipfile, or it constitutes one disk of a multi-part archive.  In the
  latter case the central directory and zipfile comment will be found on
  the last disk(s) of this archive.
unzip:  cannot find zipfile directory in one of /Users/rekire/dev/flutter/bin/cache/downloads/storage.googleapis.com/flutter_infra_release/flutter/74d16627b940bb15e50891f82cad6c3e3465bd6d/darwin-arm64/artifacts.zip or
        /Users/rekire/dev/flutter/bin/cache/downloads/storage.googleapis.com/flutter_infra_release/flutter/74d16627b940bb15e50891f82cad6c3e3465bd6d/darwin-arm64/artifacts.zip.zip, and cannot find /Users/rekire/dev/flutter/bin/cache/downloads/storage.googleapis.com/flutter_infra_release/flutter/74d16627b940bb15e50891f82cad6c3e3465bd6d/darwin-arm64/artifacts.zip.ZIP, period.
Flutter could not download and/or extract https://storage.googleapis.com/flutter_infra_release/flutter/74d16627b940bb15e50891f82cad6c3e3465bd6d/darwin-arm64/artifacts.zip. Ensure you have network connectivity and all of the required dependencies listed at flutter.dev/setup.
The original exception was: ProcessException: The command failed

Switching to the beta and then back to the stable channel fixed the issue for me