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

Failed to load signer "signer #1" #34

Open
StarHeartHunt opened this issue Dec 20, 2020 · 15 comments
Open

Failed to load signer "signer #1" #34

StarHeartHunt opened this issue Dec 20, 2020 · 15 comments

Comments

@StarHeartHunt
Copy link

StackTrace:

Verification succesful
/bin/cp app/build/outputs/apk/release/app-release-unsigned.apk app/build/outputs/apk/release/app-release-unsigned-aligned.apk
/usr/local/lib/android/sdk/build-tools/29.0.3/apksigner sign --ks app/build/outputs/apk/release/signingKey.jks --ks-key-alias *** --ks-pass pass: --out app/build/outputs/apk/release/app-release-unsigned-signed.apk app/build/outputs/apk/release/app-release-unsigned-aligned.apk
Failed to load signer "signer #1"
java.io.EOFException
	at java.io.DataInputStream.readInt(DataInputStream.java:392)
	at sun.security.provider.JavaKeyStore.engineLoad(JavaKeyStore.java:661)
	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.sign(ApkSignerTool.java:277)
	at com.android.apksigner.ApkSignerTool.main(ApkSignerTool.java:83)
Error: The process '/usr/local/lib/android/sdk/build-tools/29.0.3/apksigner' failed with exit code 2
@me-at-syeds-me
Copy link

I am having similar issue. No luck so far!

@soethan98
Copy link

I'm also facing this issue.

@ankitmhatre
Copy link

@me-at-syeds-me @soethan98 Any luck ?

@thaiphandinh
Copy link

any updates on this?

@riv0manana
Copy link

Hello, I've tested this action to sign my apk. This issue is caused when wrong "signingKeyBase64" is provided.
Solution:
run in your terminal: openssl base64 -in your_keystore.keystore -out key.txt and then copy the output content to your signingKeyBase64 secret.
Hope it can help you

@taori
Copy link

taori commented Jul 25, 2021

hm. ordinary base64 turns my keystore into 3kb file, openssl base64 turns it into 4kb. perhaps that is why some people have this error and others do not? (i have it at the moment. verifying whether it works with openssl base64)
nope. still does not sign properly

@atanana
Copy link

atanana commented Aug 29, 2021

I had the same error message when I misspelled "SIGNING_KEY" in my secrets 🤦‍♂

@marwa-eltayeb
Copy link

I have the same error. What is the solution?

@nathantaal
Copy link

For me it was me creating the wrong gitlab variables

@faizandarwesh
Copy link

Any update on this issue?

@vitalyk-multinarity
Copy link

Hello, I've tested this action to sign my apk. This issue is caused when wrong "signingKeyBase64" is provided. Solution: run in your terminal: openssl base64 -in your_keystore.keystore -out key.txt and then copy the output content to your signingKeyBase64 secret. Hope it can help you

@riv0manana did you use key.txt as is or deleted newlines from it?

@vengateshm
Copy link

Using the below command worked for me, it printed the key in console and i copied that.
openssl base64 -in your_keystore.keystore

ozersa added a commit to analogdevicesinc/MAX78xxx-RefDes that referenced this issue Nov 22, 2022
Android build fails while signing image,
The below ticket exactly same as our case
 - r0adkll/sign-android-release#61
 - r0adkll/sign-android-release#34
The solution not found yet...

For now android build deleted add it when the issue has been fixed
There will be an open PR to follow up this case (Android auto build)

Signed-off-by: Sadik.Ozer <sadik.ozer@analog.com>
@Devanathan2015
Copy link

Using the below command worked for me, it printed the key in console and i copied that. openssl base64 -in your_keystore.keystore

I tried the same. But still the issue persist for me. I encode the key-store file in mac, but i am using windows-2019 as runner.

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.sign(ApkSignerTool.java:277)
at com.android.apksigner.ApkSignerTool.main(ApkSignerTool.java:83)
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2293,2): error MSB6006: "java.exe" exited with code 2. 

@taori
Copy link

taori commented Nov 25, 2022

CR/LF issue?

@ItSNeverLate
Copy link

Your password, alias, or keyword is incorrect!
Just double-check!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests