Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong full snapshot version, expected '8f8...' found '48a...' after upgrade #16103

Closed
zoechi opened this issue Mar 30, 2018 · 33 comments

Comments

Projects
None yet
@zoechi
Copy link
Contributor

commented Mar 30, 2018

Steps to Reproduce

[ +203 ms] Building APK
Running 'gradlew assembleDebug'...
[{"event":"app.progress","params":{"appId":"6e652d5b-16ee-4e34-aa5f-5cbb89f0e914","id":"2","progressId":null,"message":"Running 'gradlew assembleDebug'..."}}]
[  +11 ms] [android/] /Users/zoechi/dart/customers/lookatyou/lookatmybaby/lookatmybaby_flutter/android/gradlew -q -Ptarget=/Users/zoechi/dart/customers/lookatyou/lookatmybaby/lookatmybaby_flutter/lib/main_zoechi.dart -Ppreview-dart-2=true -Pfilesystem-scheme=org-dartlang-root assembleDebug
[ +997 ms] Configuration 'compile' in project ':app' is deprecated. Use 'implementation' instead.
[  +71 ms] registerResGeneratingTask is deprecated, use registerGeneratedFolders(FileCollection)
[        ] registerResGeneratingTask is deprecated, use registerGeneratedFolders(FileCollection)
[        ] registerResGeneratingTask is deprecated, use registerGeneratedFolders(FileCollection)
[+1890 ms] compiler message: Wrong full snapshot version, expected '8f8bcefc1534f548f00d8d817877e101' found '48af31030bbb45e2f3e620514fd8a27d'
[  +34 ms] Compiler terminated unexpectedly on /Users/zoechi/dart/customers/lookatyou/lookatmybaby/lookatmybaby_flutter/lib/main_zoechi.dart
[  +24 ms] FAILURE: Build failed with an exception.
[        ] * Where:
[        ] Script '/Users/zoechi/flutter/flutter/packages/flutter_tools/gradle/flutter.gradle' line: 441
[        ] * What went wrong:
[        ] Execution failed for task ':app:flutterDependenciesDebug'.
[        ] > Process 'command '/Users/zoechi/flutter/flutter/bin/flutter'' finished with non-zero exit value 1
[        ] * Try:
[        ] Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
[        ] * Get more help at https://help.gradle.org
[        ] BUILD FAILED in 2s
[{"event":"app.progress","params":{"appId":"6e652d5b-16ee-4e34-aa5f-5cbb89f0e914","id":"2","progressId":null,"finished":true}}]
Finished with error: Gradle build failed: 1

Logs

Run your application with flutter run and attach all the log output.

Run flutter analyze and attach any output of that command also.

Flutter Doctor

Paste the output of running flutter doctor -v here.

(dart2) $ flutter doctor -v
[✓] Flutter (Channel dev, v0.2.2-pre.6, on Mac OS X 10.13.3 17D102, locale en-AT)
    • Flutter version 0.2.2-pre.6 at /Users/zoechi/flutter/flutter
    • Framework revision 972ff23c4c (49 minutes ago), 2018-03-30 18:15:04 +0200
    • Engine revision 9af82c5a1a
    • Dart version 2.0.0-dev.43.0.flutter-e305117519

[✓] Android toolchain - develop for Android devices (Android SDK 27.0.3)
    • Android SDK at /usr/local/opt/android-sdk
    • Android NDK at /usr/local/opt/android-sdk/ndk-bundle
    • Platform android-27, build-tools 27.0.3
    • ANDROID_HOME = /usr/local/opt/android-sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b01)
    • All Android licenses accepted.

[✓] iOS toolchain - develop for iOS devices (Xcode 9.2)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 9.2, Build version 9C40b
    • ios-deploy 1.9.2
    • CocoaPods version 1.4.0

[✓] Android Studio (version 3.1)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b01)

[✓] IntelliJ IDEA Ultimate Edition (version 2017.3.4)
    • IntelliJ at /Applications/IntelliJ IDEA.app
    • Flutter plugin version 22.2.2
    • Dart plugin version 173.4548.30

[✓] Connected devices (1 available)
    • Android SDK built for x86 • emulator-5554 • android-x86 • Android 8.1.0 (API 27) (emulator)

• No issues found!

For more information about diagnosing and reporting Flutter bugs, please see https://flutter.io/bug-reports/.

@zoechi

This comment has been minimized.

Copy link
Contributor Author

commented Mar 30, 2018

flutter clean and purging ~/flutter/bin/cache didn't help

@zoechi

This comment has been minimized.

Copy link
Contributor Author

commented Mar 30, 2018

A new project created with flutter create fails the same way

@zoechi

This comment has been minimized.

Copy link
Contributor Author

commented Mar 31, 2018

after a number of retries with something like git reset --hard git clean -xffd flutter doctor I was able to get rid of the error.

Feel free to close if you don't see anything you could do.

@a-siva

This comment has been minimized.

Copy link
Contributor

commented Apr 6, 2018

Not able to gather much info from your logs, did you run into this problem again?
I will close the issue, if you run into it again please reopen it and capture the steps you went through when the error occurred.

@a-siva a-siva closed this Apr 6, 2018

@justinmc

This comment has been minimized.

Copy link
Contributor

commented Mar 26, 2019

I ran into this as well while trying to run an app on the iOS simulator on a Mac, and git clean -xffd in the Flutter repo directory fixed it for me.

@benjaminhorner

This comment has been minimized.

Copy link

commented Mar 26, 2019

I also ran into this after upgrading Flutter (master channel).
git clean -xffd did not solve the issue. However, switching channels back and forth (from master to dev and back) fixed it for me.

@michalsuryntequiqo

This comment has been minimized.

Copy link

commented Apr 3, 2019

@justinmc - git clean -xffd solved the issue, thanks!

@korgara

This comment has been minimized.

Copy link

commented Apr 3, 2019

Switching channel from stable to master solved this for me.

@Mallikarjun-0369

This comment has been minimized.

Copy link

commented Apr 4, 2019

W
rong full snapshot version, expected '8343f188ada07642f47c56e518f1307c' found 'f630ecdf457e27dd24d3b9e0a6bc1c13'

I
solate creation failed

Compiler failed on E:\DotEventures\Projects\ProductSupplier\toourssupplier\lib/main.dart
Gradle task 'assembleDebug'... Done 20.6s
Gradle task assembleDebug failed with exit code 1

E:\DotEventures\Projects\ProductSupplier\toourssupplier>flutter doctor -v

[√] Flutter (Channel stable, v1.0.0, on Microsoft Windows [Version 10.0.17134.648], locale en-US)
• Flutter version 1.0.0 at C:\flutter\flutter_stable_v1\flutter
• Framework revision 5391447 (4 months ago), 2018-11-29 19:41:26 -0800
• Engine revision 7375a0f
• Dart version 2.1.0 (build 2.1.0-dev.9.4 f9ebf21297)

[√] Android toolchain - develop for Android devices (Android SDK 28.0.3)
• Android SDK at C:\Users\DEPL-06\AppData\Local\Android\Sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-28, build-tools 28.0.3
• ANDROID_HOME = C:\Users\DEPL-06\AppData\Local\Android\Sdk
• Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1248-b01)
• All Android licenses accepted.

[√] Android Studio (version 3.3)
• Android Studio at C:\Program Files\Android\Android Studio
• Flutter plugin version 34.0.1
• Dart plugin version 182.5215
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1248-b01)

[!] VS Code (version 1.32.3)
• VS Code at C:\Users\DEPL-06\AppData\Local\Programs\Microsoft VS Code
• Flutter extension not installed; install from
https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter

[√] Connected device (1 available)
• Android SDK built for x86 • emulator-5554 • android-x86 • Android 7.0 (API 24) (emulator)

! Doctor found issues in 1 category.

@long1eu

This comment has been minimized.

Copy link

commented Apr 4, 2019

I have this problem also. Switching channels dind help.

@sergiossm

This comment has been minimized.

Copy link

commented Apr 5, 2019

Running flutter channel master, flutter upgrade and flutter clean worked for me

@noordawod

This comment has been minimized.

Copy link
Contributor

commented Apr 8, 2019

Running flutter channel master, flutter upgrade and flutter clean worked for me too.

@KevinTheGray

This comment has been minimized.

Copy link

commented Apr 10, 2019

The solution that fixed it for me was deleting everything inside /flutter/bin/cache

@shihaohong shihaohong reopened this Apr 10, 2019

@shihaohong shihaohong closed this Apr 10, 2019

@ThinkDigitalRepair

This comment has been minimized.

Copy link

commented Apr 11, 2019

I'm getting this now as well.
Verbose logs

[   +8 ms] executing: /Users/thinkdigital/Library/Android/sdk/platform-tools/adb -s FA68T0306130 install -t -r /Users/thinkdigital/GoogleDrive/Development/IdeaProjects/teddycare/build/app/outputs/apk/app.apk
[+12766 ms] Performing Streamed Install
            Success
[{"event":"app.progress","params":{"appId":"1c9a9ca7-9b17-44eb-98ac-fc5fdb7afaab","id":"3","progressId":null,"finished":true}}]
[   +5 ms] executing: /Users/thinkdigital/Library/Android/sdk/platform-tools/adb -s FA68T0306130 shell echo -n 2ca788634bfd9326173f2851cce19c51d3b6fec2 > /data/local/tmp/sky.com.teddycare.flutterapp.sha1
[  +29 ms] Pixel startApp
[   +3 ms] executing: /Users/thinkdigital/Library/Android/sdk/platform-tools/adb -s FA68T0306130 shell am start -a android.intent.action.RUN -f 0x20000000 --ez enable-background-compilation true --ez enable-dart-profiling true --ez enable-checked-mode true --ez verify-entry-points true --ez start-paused true com.teddycare.flutterapp/com.teddycare.flutterapp.MainActivity
[ +118 ms] Starting: Intent { act=android.intent.action.RUN flg=0x20000000 cmp=com.teddycare.flutterapp/.MainActivity (has extras) }
[        ] Waiting for observatory port to be available...
[+1039 ms] F/flutter ( 9400): [FATAL:flutter/runtime/dart_vm.cc(380)] Error while initializing the Dart VM: Wrong full snapshot version, expected '9e1fa667daca1ecf538db8507091794e' found '3383321009c0898417a99b9df9a73876'

@ThinkDigitalRepair

This comment has been minimized.

Copy link

commented Apr 11, 2019

Tried changing to beta and dev, deleting everything inside flutter/bin/cache, ran flutter clean, ran git clean -xffd I still get the same error. I even upgraded flutter .

[✓] Flutter (Channel dev, v1.4.15, on Mac OS X 10.14.4 18E226, locale en-US)
• Flutter version 1.4.15 at /Users/thinkdigital/development/flutter
• Framework revision ed91a3b (9 hours ago), 2019-04-10 10:35:03 -0500
• Engine revision 905c571db5
• Dart version 2.2.1 (build 2.2.1-dev.3.1 None)

@ThinkDigitalRepair

This comment has been minimized.

Copy link

commented Apr 11, 2019

Interesting. I ran a different project and it built, and when I went back to my current project, it built...

@Mallikarjun-0369

This comment has been minimized.

Copy link

commented Apr 11, 2019

@shihaohong

This comment has been minimized.

Copy link
Contributor

commented Apr 11, 2019

I was getting this too and resolved it with git clean -xffd. Unsure what the root cause of it was, but I would get the same error regardless of whatever application I was trying to run on an Android simulator.

Edit: As mentioned in a later comment, git clean -xffd deletes everything that was not stored in your repository, so be careful using it as you may lose unsaved work.

@ThinkDigitalRepair

This comment has been minimized.

Copy link

commented Apr 11, 2019

Actually, this is only when running on Android. It still fails for me. Works when using the iOS simulator

@Mallikarjun-0369

This comment has been minimized.

Copy link

commented Apr 11, 2019

@delay

This comment has been minimized.

Copy link

commented Apr 15, 2019

Problem also occurred for me. It happened when I tried to change channels from dev back to stable. git clean -xffd did not work for me.

clearing out
~/flutter/bin/cache
followed by flutter clean again finally worked.

@smile2014

This comment has been minimized.

Copy link

commented Apr 16, 2019

Running Gradle task 'assembleDebug'...
Wrong full snapshot version, expected '67d5e890b128b2d4141263de5f1ac0d1' found '0c73eb70aa4d30f450273cb424be8c62'

@LinusU

This comment has been minimized.

Copy link

commented Apr 24, 2019

Cleaning out $FLUTTER_HOME/bin/cache did the trick for me 👏

  • cleaning xcode project and DerivedData did not work
  • git clean did not work
  • flutter clean did not work
@KevinTheGray

This comment has been minimized.

Copy link

commented Apr 24, 2019

For people's future reference, be careful with git clean -xffd, it deleted everything that wasn't stored in the repository, eg. secret keys, etc. It is my own fault for not looking into what it would would do, but it was a bit of a surprise to see I needed to re-add some files

@Tameflame

This comment has been minimized.

Copy link

commented Apr 24, 2019

Deleting everything in flutter/bin/cache then running flutter doctor worked for me.

I'm on the stable channel, for what it's worth

@gadfly361

This comment has been minimized.

Copy link

commented Apr 26, 2019

@Tameflame Thank you, your suggestion did the trick for me!

@theochampion

This comment has been minimized.

Copy link

commented May 3, 2019

Same problem when switching to channel stable. I tried flutter clean and git clean -xffd, still no luck :/

@jonahwilliams

This comment has been minimized.

Copy link
Contributor

commented May 3, 2019

If you've clean'd the project in question, the next step would be to delete the tool cache directory to force it to redownload any artifacts. This is located at FLUTTER_ROOT/bin/cache - everything in that directory is safe to delete

@theochampion

This comment has been minimized.

Copy link

commented May 3, 2019

@jonahwilliams I tried this too without success. I ended up reinstalling flutter completely and the problem went away

@GustavoContreiras

This comment has been minimized.

Copy link

commented May 7, 2019

after a number of retries with something like git reset --hard git clean -xffd flutter doctor I was able to get rid of the error.

Feel free to close if you don't see anything you could do.

It worked for me but it also removed the latest changes that I made and didn't commit. People should use it carefully. Thanks anyway.

@ThinkDigitalRepair

This comment has been minimized.

Copy link

commented May 7, 2019

@AkramChauhan

This comment has been minimized.

Copy link

commented May 17, 2019

while doing

git clean -xffd

Unlink of file 'bin/cache/BIT5646.tmp' failed.

What should I do?

@canozer13

This comment has been minimized.

Copy link

commented May 22, 2019

I tried all the tricks but still the same. Should I setup Dart and Flutter again?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.