pwa-builder / PWABuilder

The simplest way to create progressive web apps across platforms and devices. Start here. This repo is home to several projects in the PWABuilder family of tools.
https://docs.pwabuilder.com
Other
2.75k stars 285 forks source link

Error generating android package #2823

Closed hawkf closed 2 years ago

hawkf commented 2 years ago

I received the following error when generating a package for https://app.nfm.com.ua

Error: Error generating Android package. Status code: 500 Error: Internal Server Error Details: Error generating app package: Command failed: /opt/android-sdk/build-tools/30.0.3/apksigner sign --ks /tmp/pwabuilder-cloudapk--25-tRIDNhq4bBeK/signingKey.keystore --ks-key-alias my-key-alias --ks-pass pass:gorokhovBoto --key-pass pass:gorokhovBoto --out /tmp/pwabuilder-cloudapk--25-tRIDNhq4bBeK/app-release-signed.apk /tmp/pwabuilder-cloudapk--25-tRIDNhq4bBeK/app/build/outputs/apk/release/app-release-unsigned.apk Failed to load signer "signer #1" java.io.IOException: Invalid keystore format at sun.security.provider.JavaKeyStore.engineLoad(JavaKeyStore.java:666) at sun.security.provider.JavaKeyStore$JKS.engineLoad(JavaKeyStore.java:57) at sun.security.provider.KeyStoreDelegator.engineLoad(KeyStoreDelegator.java:224) at sun.security.provider.JavaKeyStore$DualFormatJKS.engineLoad(JavaKeyStore.java:71) at java.security.KeyStore.load(KeyStore.java:1445) at com.android.apksigner.SignerParams.loadKeyStoreFromFile(SignerParams.java:353) at com.android.apksigner.SignerParams.loadPrivateKeyAndCertsFromKeyStore(SignerParams.java:239) at com.android.apksigner.SignerParams.loadPrivateKeyAndCerts(SignerParams.java:181) at com.android.apksigner.ApkSignerTool.getSignerConfig(ApkSignerTool.java:395) at com.android.apksigner.ApkSignerTool.sign(ApkSignerTool.java:316) at com.android.apksigner.ApkSignerTool.main(ApkSignerTool.java:88)

cmd: /opt/android-sdk/build-tools/30.0.3/apksigner sign --ks /tmp/pwabuilder-cloudapk--25-tRIDNhq4bBeK/signingKey.keystore --ks-key-alias my-key-alias --ks-pass pass:gorokhovBoto --key-pass pass:gorokhovBoto --out /tmp/pwabuilder-cloudapk--25-tRIDNhq4bBeK/app-release-signed.apk /tmp/pwabuilder-cloudapk--25-tRIDNhq4bBeK/app/build/outputs/apk/release/app-release-unsigned.apk code: 2

Jaylyn-Barbee commented 2 years ago

Are you attempting to upload your own keystore file to sign this package?

hawkf commented 2 years ago

Yes

пн, 25 апр. 2022 г., 18:59 Jaylyn Barbee @.***>:

Jaylyn-Barbee commented 2 years ago

Did you have your keystore filed generated by PWABuilder or did you have your own before? I generated one android package using your URL, which gave me a keystore file. I then generated a second android package with that keystore file and it seems to have worked.

hawkf commented 2 years ago

I need to update an existing application that is in google play. I downloaded the certificate from the developer console. How can I add it to keystroy correctly?

вт, 26 апр. 2022 г. в 19:10, Jaylyn Barbee @.***>:

Jaylyn-Barbee commented 2 years ago

I am going to look into this use case, we may have an issue with the format of the keystore file from the developer console. I will keep you updated.

Jaylyn-Barbee commented 2 years ago

@andreban, I know this isn't a bubblewrap issue but do you have any guidance here?

andreban commented 2 years ago

It seems like it's an invalid certificate (java.io.IOException: Invalid keystore format).

@hawkf are you using Google Play Signing? IIRC, what is downloaded from Play is the public certificate, not the keys. If you are using it and lost the upload key, you can create a new one.

ghost commented 2 years ago

This issue has been automatically marked as "no-recent-activity" because it requires author feedback but has not had any activity for 7 days. It will be closed if no further activity occurs within 7 days of this comment.