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
Intermittent no certificates installation failure #8605
Comments
Odd. @jakobr-google or @goderbauer might have thoughts. Thanks for the report! |
Unfortunately, I've never seen this locally. @rbishop-bah Do you still see this in the latest version of Flutter? Flutter has changed a bit since this was filed... |
I have seen it yes as late as last week. Haven't used flutter in about five days so can't comment on the very latest. |
Seen again today 4/1.
|
@Skylled reported the same issue in #9638:
|
Just to confirm, @rbishop-bah is on Windows 10 and I'm encountering the issue on Windows 8.1, so it's not a Windows 10 specific issue, nor is it an Android Studio specific issue. |
Turns out we already had retry logic for when adb fails. However, due to a bug it wasn't triggered. I fixed that. Can you please update your flutter checkout and see if the problem persists? Thanks! |
@goderbauer Will do. |
Saw the dialog again after updating, but it resolved itself so I guess the retry logic is working. @goderbauer |
So the retry logic definitely works when doing a reinstall, but the error still occurs on a fresh install.
|
This is happening a lot again after a flutter plugin update and an Android Studio update. |
I still can't reproduce this on any of my windows machines. Here are some shots in the dark to gather more information:
|
|
I would not recommend to use it all the time. I am just wondering if there are any old leftover build artifacts that cause the problem you're experiencing. With |
@rbishop-bah @Skylled What is the android device you're trying to install your app on? Do you have access to another android device? Do you experience the same problem with it? |
@goderbauer HTC 10... only one I have access to. |
Thanks for the information. I am wondering if this is a temporary issue with installing apps via adb or if flutter actually produces a damaged apk for some reason. Can you try the following: The next time you see the error, can you please try to re-install the produced apk (see command below)? Does that work? If not, would you be willing to provide me with the potentially damaged APK? I'd love to take a look at it. @Skylled According to your log, the command to re-install should be for you (execute from the root directory of your app): C:\Android\sdk\platform-tools\adb -s LGH9107a67a5fd install -r build\app/outputs/apk/app.apk @rbishop-bah For you, the command to re-install should be (execute from the root directory of your app): C:\Users\Rob\AppData\Local\Android\sdk\platform-tools\adb -s HT69N0100346 install -r build\app/outputs/apk/app.apk |
Okay, got it to occur again. Immediately after the failed flutter run, I used I would think enabling the retry logic, regardless of whether the app was already installed once on the phone, would do the trick 99% of the time. But I understand that's only a stopgap measure, and that a root cause should be discovered for the long run. I'll attach an APK next time I get this problem to happen, if you'd like to look over the certs. |
The command did not run but manually deleting the build folder from the android folder seemed to help. |
Hopefully a workaround for flutter#8605.
Our current hypothesis is that the apk is getting corrupted when transferred onto your device. Unfortunately, I don't know why this is happening and without having access to the device it's impossible to debug. It would be interesting to collect some more data points: Does the problem exist when you use a different USB port, a different USB cord, or a different Android device (maybe borrow one from a friend)? You can also try to deploy your app with Android Studio instead of through Flutter: Open Android Studio, |
A little quirk in my system might have revealed a source of the problem. I installed Could it be that this is an issue with newer versions of |
Yes, that sounds very likely. Going to close this for now as environment related. |
@Skylled I am experiencing the same issue on Ubuntu 17.10 and HTC 10, please how did you fix this? |
I've changed dev environments (Windows to Ubuntu), I've changed cables, I've updated everything I can think of and never solved it. Variables I haven't changed are my laptop itself and my phone. For now I just retry until it works. I don't think it's a Flutter related problem. Only way flutter could help diagnose is if adb offered more info about why the install failed under a flag. |
hi guys, just want to know what's the update on this issue, is this resolved? |
I've just had the same issue within Android Studio. Using the AVD manager to "Wipe Data" seems to have cleared it. |
I have had the same issue when installing to my physical device. But that was a simple 'stupid' mistake. My physical devices memory was full. Then I uninstalled some apps, and tried again, it worked well. |
Select and unselect sdk platform tools in android studio |
I saw this error happening on an Android 9.0 device when somehow the app landed in Android's "Work mode" and it wasn't able to run properly and it was stuck instead without meaningful error messages (I saw the certificate error only once). |
Thank you |
Error: ADB exited with exit code 1 adb: failed to install app.apk: Failure [INSTALL_PARSE_FAILED_NO_CERTIFICATES: Failed to collect certificates from /.../base.apk using APK Signature Scheme v2: SHA-256 digest of contents did not verify] |
facing the same issue a lot recently |
Is it possible this bug is based on app size? I started getting this bug when my app size increased to 500mb. Maybe the signing process takes too long? |
I have the same feeling. I could install a 20mb apk, but failed to install a 1gb apk. The packging and signing process is totally no difference. |
same issue with me, did anyone found any solution.... |
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 |
Steps to Reproduce
Attempt to run from Android Studio on Windows 10. Sometimes the following dialog appears:
Workaround: Cancelling the dialog and trying again eventually resolves the problem.
@goderbauer requested that I file this issue.
Logs
Flutter Doctor
The text was updated successfully, but these errors were encountered: