ilharp / sign-android-release

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

jarsigner error - invalid entry compressed size #6

Closed heldersepu closed 2 years ago

heldersepu commented 2 years ago

Getting the following error: jarsigner: unable to sign jar: java.util.zip.ZipException: invalid entry compressed size

Here is the more context:

 Run ilharp/sign-android-release@v1
  with:
    releaseDir: android/app/build/outputs/bundle/release
    signingKey: ***
    keyAlias: ***
    keyStorePassword: ***
    keyPassword: ***
Signing file(s) in android/app/build/outputs/bundle/release with key ***...

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

[1/1] app-release.aab
  Signing AAB file.
  /usr/bin/jarsigner -keystore *** -storepass *** -signedjar android/app/build/outputs/bundle/release/app-release-temp.aab -keypass *** android/app/build/outputs/bundle/release/app-release.aab ***
  jarsigner: unable to sign jar: java.util.zip.ZipException: invalid entry compressed size (expected 83494 but got 85533 bytes)
Error: Error: The process '/usr/bin/jarsigner' failed with exit code 1
ilharp commented 2 years ago

Normally files should be like app-release-unsigned.aab. Your aab is already signed before this action. Check your gradle build script or any other build step that runs before this action.

heldersepu commented 2 years ago

Yep the android/app/build.gradle was doing it... We commented out the signingConfig from buildTypes.release and good to go