ilharp / sign-android-release

A GitHub action to sign an APK or AAB
https://github.com/marketplace/actions/sign-android-release-2
MIT License
43 stars 10 forks source link

jarsigner: Certificate chain not found for: ***. *** must reference a valid KeyStore *** entry containing a private *** and corresponding public *** certificate chain. #17

Closed vinukn335 closed 9 months ago

vinukn335 commented 9 months ago

Getting build failure. Any idea?

- name: Sign Release
        uses: ilharp/sign-android-release@v1
        with:
          releaseDir: build/app/outputs/bundle/release/
          signingKey: ${{ secrets.PIN_PASS_SIGNING_KEY }}
          keyAlias: ${{ secrets.PIN_PASS_ALIAS }}
          keyStorePassword: ${{ secrets.PIN_PASS_KEY_STORE_PASSWORD }}
          keyPassword: ${{ secrets.PIN_PASS_KEY_PASSWORD }}
Run ilharp/sign-android-release@v1
  with:
    releaseDir: build/app/outputs/bundle/release/
    signingKey: ***
    ***Alias: ***
    ***StorePassword: ***
    ***Password: ***
  env:
    JAVA_HOME: /opt/hostedtoolcache/Java_Zulu_jdk/11.0.21-9/x64
    FLUTTER_ROOT: /opt/hostedtoolcache/flutter/stable-3.16.2-x64
    PUB_CACHE: /opt/hostedtoolcache/flutter/stable-3.16.2-x64/.pub-cache
Signing file(s) in build/app/outputs/bundle/release with *** ***...

Now sign 1 file(s):
- app-release.aab

[1/1] app-release.aab
  Signing AAB file.
  /opt/hostedtoolcache/Java_Zulu_jdk/11.0.21-9/x64/bin/jarsigner -***store *** -storepass *** -signedjar build/app/outputs/bundle/release/app-release-temp.aab -***pass *** build/app/outputs/bundle/release/app-release.aab ***
  jarsigner: Certificate chain not found for: ***.  *** must reference a valid KeyStore *** entry containing a private *** and corresponding public *** certificate chain.
Error: Error: The process '/opt/hostedtoolcache/Java_Zulu_jdk/11.0.21-9/x64/bin/jarsigner' failed with exit code 1
Error: Error: The process '/opt/hostedtoolcache/Java_Zulu_jdk/11.0.21-9/x64/bin/jarsigner' failed with exit code 1
vinukn335 commented 9 months ago

I can build and sign through manually.

ilharp commented 9 months ago

The most likely cause of this problem is that the inputs you provided are incorrect. Please check all secrets again, especially keyAlias. If you don't know the keyAlias of your KeyStore, you can find it using the method mentioned here:

keytool -keystore path_of_your_keystore_file -list -v
vinukn335 commented 9 months ago

Thanks for quick reply. issue resolved!