Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

App center build, Error: /usr/bin/jarsigner failed with return code: 1

Using app center when I try and build I currently get this error:

[command]/usr/bin/jarsigner -keystore /Users/vsts/agent/2.136.1/work/1/s/.certs/keystore.jks -storepass *** -keypass *** -verbose -sigalg MD5withRSA -digestalg SHA1 -signedjar /Users/vsts/agent/2.136.1/work/1/s/android/app/build/outputs/apk/app-release.apk /Users/vsts/agent/2.136.1/work/1/s/android/app/build/outputs/apk/app-release.apk.unsigned ***
jarsigner: unable to sign jar: java.util.zip.ZipException: invalid entry compressed size (expected 11019 but got 11226 bytes)
##[error]Error: /usr/bin/jarsigner failed with return code: 1
##[error]Return code: 1

Any ideas how to fix this?

like image 674
Bomber Avatar asked Jul 25 '18 12:07

Bomber


2 Answers

The build is successful, but the pipeline its failing at signing. In your build configuration the environmental variables for the Keystore password, the Key alias or the Key password are not set properly.

like image 129
Franco Avatar answered Nov 04 '22 02:11

Franco


In your android/app/build.gradle, make sure you are not providing a signingConfig for the relase config:

buildTypes {
        debug {
            signingConfig signingConfigs.debug
        }
        release {
            // ...
            // signingConfig signingConfigs.debug <-- should not be used on Appcenter
            // ...
        }
    }
like image 39
Andreas Bergström Avatar answered Nov 04 '22 02:11

Andreas Bergström