-
Notifications
You must be signed in to change notification settings - Fork 1k
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
bug: npx cap build not able to build with signing-type apksigner while having keystore with multiple keys / endless loop with single key #7054
Comments
Same problem here. |
I'm running into the same issue. It looks like apksigner accepts |
fixed in #7073 |
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Capacitor, please create a new issue and ensure the template is fully filled out. |
Bug Report
Capacitor Version
Platform(s)
Android
Current Behavior
I would like to create an apk (not aab!) bundle compatible with Android 11+ (using the undocumented command --signing-type apksigner) running the npx cap build command, f.e. like this:
npx cap build android --keystorepath keystore.jks --keystorepass keystorepass --keystorealias keystorealias --keystorealiaspass keystorealiaspass --signing-type apksigner --androidreleasetype APK
This gives me the error:
--> Yes, thats right. My signing key contains multiple entries.
--> The error which is thrown here comes from the apksigner directly and not from the cap-cli, I guess
After adding the requested command:
npx cap build android --keystorepath keystore.jks --keystorepass keystorepass --keystorealias keystorealias --keystorealiaspass keystorealiaspass --signing-type apksigner --androidreleasetype APK --ks-key-alias keystorealias
... I get this error:
Understandable, because the cap cli does not know what to do with the command because this command is for the apksigner
btw: Creating an AAB file works!
I thought I could workaround this issue with using a single key file. But just gives me an endless loop. Please look at my example below.
Expected Behavior
Code Reproduction
https://github.com/tiga05/capBug
I have created a minmal working example and checked in two dummy keystores in the main folder.
SingleKey.jks and MultiKey.jks
Password for this keystores is both: keyStorePW
key0 with password: key0PW ( in both keystores)
key1 with password: key1PW ( only in multikey keystore)
npx cap build android --keystorepath ../SingleKey.jks --keystorepass keyStorePW --keystorealias key0 --keystorealiaspass key0PW --signing-type apksigner --androidreleasetype APK
result: RUNS ENDLESS
npx cap build android --keystorepath ../MultiKey.jks --keystorepass keyStorePW --keystorealias key0 --keystorealiaspass key0PW --signing-type apksigner --androidreleasetype APK
Creating signed AAB release, works!:
npx cap build android --keystorepath ../MultiKey.jks --keystorepass keyStorePW --keystorealias key0 --keystorealiaspass key0PW --androidreleasetype AAB
Creating signed APK release, WITHOUT --signing-type apksigner works!:
npx cap build android --keystorepath ../MultiKey.jks --keystorepass keyStorePW --keystorealias key0 --keystorealiaspass key0PW --androidreleasetype APK
The text was updated successfully, but these errors were encountered: