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

fix: How to Bypass PrivateKeyEntry Expiry Check in Shorebird Release for Android APK Packaging #267

Open
JedTsai33 opened this issue Jul 12, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@JedTsai33
Copy link

When I execute the command shorebird release android --flutter-version=3.22.2 --artifact=apk to package the APK, an error "Failed to generate v1 signature" occurs. The error's cause is due to the expiration of the keystore's PrivateKeyEntry. However, using flutter build apk --release does not have this issue. Due to specific requirements, I cannot update the keystore. Is there a way to bypass the PrivateKeyEntry expiry check when executing shorebird release android to allow the APK to be packaged successfully?

@JedTsai33 JedTsai33 added the bug Something isn't working label Jul 12, 2024
@eseidel
Copy link
Contributor

eseidel commented Jul 12, 2024

This might be related to shorebirdtech/shorebird#2113.

Are we using the correct key-store? e.g. just bundletool.jar (which is what we I think use to get the .apk out of the underlying .aab we build) is more strict than flutter build apk --release? Or are we using the wrong keystore in this case?

@JedTsai33
Copy link
Author

The issue is not using the wrong keystore.

The main problem is that the Android keystore has expired, but we don't want to generate a new app when installing the app due to a new keystore. We want to use the original keystore to overwrite the app.

Previously, we tested that running the command flutter build apk --release can package the APK normally, but running the command shorebird release android --flutter-version=3.22.2 --artifact=apk does not work.

So I would like to ask for your help on whether there is a way to bypass the expired keystore check.

@JedTsai33
Copy link
Author

I found that in the function buildReleaseArtifacts in buildReleaseArtifacts.dart, buildAppBundle is executed first, and then it is determined whether to execute buildApk. May I ask if it is possible to skip buildAppBundle and directly execute buildApk?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Customers
Development

No branches or pull requests

2 participants