JAR_SIG_NO_SIGNATURES with existing key

Hi here,

I’m trying to build and deploy my expo application to the play store. This application is a rebuild of an existing application so I downloaded the signing certificate and gave it to expo with the different keys (that I previously used in fastlane). The build proceed well, but when I try to upload it on the play store, I get the following error.

[!] Google Api Error: apkInvalidSignature: APK signature is invalid or does not exist. Error from apksigner: ERROR: JAR_SIG_NO_SIGNATURES: No JAR signatures

Do you have any idea why it looks like it doesn’t sign the application ?

Thank you

hi @jeremiedrouet, sorry you are having this problem! It’s hard to figure out where exactly things are going wrong, but we should be doing jar signing. Could you try running your android standalone build locally – you’ll probably get more debugging tools and information at your disposal that way.

https://github.com/expo/expo#android-1
https://github.com/expo/xdl/blob/master/src/detach/AndroidShellApp.js#L869 ← where jarsigning happens

@quinlanj can give me more information on how I can run your script ?
I detached my app in order to build it locally, but I don’t know how to use your script

@quinlanj @jeremiedrouet hey - did you get to the bottom of this? I’m having the same issue

When you’re asked for an alias, store & key password - should this come from the previous app or something we created randomly?

Getting the same error, I’m not sure how to run the standalone build locally. can you provide link to a doc?

https://github.com/expo/expo#standalone-apps

[22:49:51] Using gulpfile ~/SideProjects/expo/tools-public/gulpfile.js
[22:49:51] Starting 'android-shell-app'...
[22:49:51] 'android-shell-app' errored after 2.44 ms
[22:49:51] Error: Can't determine exponent directory
    at exponentDirectory (/xdl/src/detach/AndroidShellApp.js:27:11)
    at Object.<anonymous> (/xdl/src/detach/AndroidShellApp.js:281:34)
    at Generator.next (<anonymous>)
    at step (/Users/simar/SideProjects/expo/tools-public/node_modules/xdl/build/detach/AndroidShellApp.js:496:191)
    at /Users/simar/SideProjects/expo/tools-public/node_modules/xdl/build/detach/AndroidShellApp.js:496:437
    at new Promise (<anonymous>)
    at Object.<anonymous> (/Users/simar/SideProjects/expo/tools-public/node_modules/xdl/build/detach/AndroidShellApp.js:496:99)
    at Object.createAndroidShellAppAsync (/xdl/src/detach/AndroidShellApp.js:267:1)
    at createAndroidShellAppWithArguments (/Users/simar/SideProjects/expo/tools-public/gulpfile.js:82:26)
    at taskWrapper (/Users/simar/SideProjects/expo/tools-public/node_modules/undertaker/lib/set-task.js:13:15)

got it building, but might want to mention to do before running the gulp

export TURTLE_WORKING_DIR_PATH=~/<where-ever-you-cloned-expo>/expo

in the setup of the readme.md

I had to look at the code to figure it out, see:
https://github.com/expo/xdl/blob/49e1a8d4a6801775ba777c2a45ae2e7dbf8a3020/src/detach/AndroidShellApp.js#L25

UPDATE:

okay i figured out why it wasn’t working for me, the jar wasn’t getting signed because the alias i entered for my keystore was wrong.

ie.

? Path to keystore: /<path-to-my-keystore>/my-release-key.keystore
? Keystore Alias: my-key-alias

I checked my keystore alias by running this command keytool -keystore my-release-key.keystore -list -v, it will ask you for the password then print out the details of the keystore, where it will have the key alias like:

Alias name: my-key-alias

Suggestion for expo: you can actually can get the key alias by using the key store path and the password, this would remove 1 step.

I encountered the same problem. And I spent several days studying it but could not solve it.

The same problem was here - the keystore password I was given was not correct - simple as that.

the keystore password I was given was not correct

For others finding this thread, I believe this ^ is typically the cause of this error.

1 Like

I’m having the same problem!

What do you mean the given keystore password is incorrect? You create the password yourself?

The alias was wrong? Whats the correct Alias? myKey+Alias ?