GoogleChromeLabs / bubblewrap

Bubblewrap is a Command Line Interface (CLI) that helps developers to create a Project for an Android application that launches an existing Progressive Web App (PWAs) using a Trusted Web Activity.
Apache License 2.0
2.36k stars 161 forks source link

Failed to load signer "signer #1" - java.io.IOException: Integrity check failed: java.security.NoSuchAlgorithmException #837

Open arunkjojo opened 10 months ago

arunkjojo commented 10 months ago

Describe the bug $ bubblewrap build ,-----. ,--. ,--. ,--. | |) /_,--.,--| |-.| |-.| |,---.,--. ,--,--.--.,--,--.,---. | .-. | || | .-. | .-. | | .-. | |.'.| | .--' ,-. | .-. | | '--' ' '' | -' |-' | \ --| .'. | | \ '-' | '-' ' ------'----' ---'---'--'----'--' '----'----| |-' --' Please, enter passwords for the keystore D:\project\ajoin\apps\android.keystore and alias android.

? Password for the Key Store: PASSWORD1 ? Password for the Key: PASSWORD2

Building the Android App...

cli ERROR Command failed: C:\Users\arunk.bubblewrap\jdk\jdk-11.0.9.1+1\bin\java.exe -Xmx1024M -Xss1m -jar C:\Users\arunk.bubblewrap\android_sdk\build-tools\33.0.2\lib\apksigner.jar sign --ks D:\project\ajoin\apps\android.keystore --ks-key-alias android --ks-pass pass:PASSWORD1 --key-pass pass:PASSWORD2 --out ./app-release-signed.apk ./app-release-unsigned-aligned.apk Failed to load signer "signer #1" java.io.IOException: Integrity check failed: java.security.NoSuchAlgorithmException: Algorithm HmacPBESHA256 not available at java.base/sun.security.pkcs12.PKCS12KeyStore.engineLoad(PKCS12KeyStore.java:2167) at java.base/sun.security.util.KeyStoreDelegator.engineLoad(KeyStoreDelegator.java:222) at java.base/java.security.KeyStore.load(KeyStore.java:1479) at com.android.apksigner.SignerParams.loadKeyStoreFromFile(SignerParams.java:362) at com.android.apksigner.SignerParams.loadPrivateKeyAndCertsFromKeyStore(SignerParams.java:248) at com.android.apksigner.SignerParams.loadPrivateKeyAndCerts(SignerParams.java:181) at com.android.apksigner.ApkSignerTool.getSignerConfig(ApkSignerTool.java:419) at com.android.apksigner.ApkSignerTool.sign(ApkSignerTool.java:336) at com.android.apksigner.ApkSignerTool.main(ApkSignerTool.java:92) Caused by: java.security.NoSuchAlgorithmException: Algorithm HmacPBESHA256 not available at java.base/javax.crypto.Mac.getInstance(Mac.java:191) at java.base/sun.security.pkcs12.PKCS12KeyStore.engineLoad(PKCS12KeyStore.java:2145) ... 8 more

Screenshots Screenshot 2023-11-17 230727

avovetisa commented 6 months ago

I have the same issue

EtienneLamoureux commented 4 months ago

I've worked around this issue by downloading jdk11.0.23_9 and pointing C:\Users\<user>\.bubblewrap\config.json to the new JDK. Then I run into #606, even from a clean run of the init command...