Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-26991

jarsigner failing with "Invalid keystore format"

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Blocker Blocker
    • testfairy-plugin
    • None

      I've updated the TestFairy plugin from version 1.0 to the latest and I noticed that now it tries to re-sign the APK.

      The problem is that all my projects use pkcs12 as the format of the keystore, while this version of the plugin is only working with the jks format.

      I found some references to this issue on SO:
      http://stackoverflow.com/questions/18407029/jarsigner-error-keystore-load-invalid-keystore-format

      The problem now is that the failing of the jarsigner is marking my build as failed even though the APK has been uploaded to TestFairy (and it's already been signed as that's part of my gradle build script).

      Here's the log of the build:

      BUILD SUCCESSFUL

      Total time: 6 mins 53.693 secs
      Build step 'Invoke Gradle script' changed build result to SUCCESS
      Archiving artifacts
      TestFairy Uploader...
      Uploading App...
      --add (file) apk_file: /var/lib/jenkins/workspace/tivoto-android/TiVoto/TiVoto/build/outputs/apk/TiVoto-staging-release.apk
      --add api_key: b9***7b
      --add changelog: No changes since last build
      --add video-quality: high
      --add screenshot-interval: 1
      --add max-duration: 10m
      --add data-only-wifi: off
      --add auto-update: off
      --add record-on-background: off
      --add video: on
      --add notify: off
      Metrics: cpu,memory,network,logcat,phone-signal,wifi
      post finished

      {"status":"ok","app_name":"TiVoto Staging","app_version":"2.0.2","file_size":8767470,"build_url":"https:\/\/app.testfairy.com\/projects\/40882-tivoto\/builds\/323828","instrumented_url":"http:\/\/dl.testfairy.com\/download\/6CS36E1J70PK0BDHV80XBT8B1FGWR432DNF7BE8BYPQWB68\/TiVoto-staging-release-testfairy.apk","invite_testers_url":"https:\/\/app.testfairy.com\/projects\/40882-tivoto\/builds\/323828\/invite","icon_url":"https:\/\/s3.amazonaws.com\/testfairy\/icons\/4836\/cbd1f15cffacd0682d49183bc495696ec5f7a12b.png"}

      downloadFromUrl: http://dl.testfairy.com/download/6CS36E1J70PK0BDHV80XBT8B1FGWR432DNF7BE8BYPQWB68/TiVoto-staging-release-testfairy.apk
      exec command: [zip, -qd, /tmp/instrumented-14241714794893952375112028239650.apk, META-INF/*]
      Output:
      exec command: [jarsigner, -keystore, /var/lib/jenkins/workspace/tivoto-android/TiVoto/TiVoto/keystore, -storepass, tonino2k, -digestalg, SHA1, -sigalg, MD5withRSA, /tmp/instrumented-14241714794893952375112028239650.apk, tivoto]
      Output: jarsigner error: java.lang.RuntimeException: keystore load: Invalid keystore format
      ERROR: jarsigner error: java.lang.RuntimeException: keystore load: Invalid keystore format

      Build step 'Upload to TestFairy Android' marked build as failure

            Unassigned Unassigned
            tanis Valerio Santinelli
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: