The package appears to be corrupt

Hello all, I get:
“App not installed. The package appears to be corrupt.”
when trying to install my built APK.

My first thought was to download the APK again, which I did, once on my computer and transferred via USB, and once on the phone itself, but the error persisted. I’ve also built the app again without making any code changes and the same thing still happens. It runs fine inside the Expo app. I can’t find anything about what might cause it - anyone got any ideas?

Thanks

hey @goldfinch could you provide the link to your APK so we can root cause this? If you are not comfortable posting it publicly, email it to us at support@expo.io . Sorry for the inconvenience!

Hi @quinlanj, thank you for the response. I’ll be emailing it shortly.

Hi! Sorry about the delay here. Did you upload your own Android keystore, or let us generate one for you?

Hi, I uploaded a keystore I was previously using for non-expo react native apps, as I need the app I’m currently developing to be released as an update to that.

Interesting. Are you sure that the keystore is formatted as the docs specify? Can you try building again and pasting the build ID so I can see if we’re having issues parsing the file?

Unfortunately I don’t have access to the keystore currently, it’s on another machine - I’ll get back to you tomorrow on that. Thanks for your help!

@dikaiosune
Sorry for the wait. Looking at my keystore file it seems to be just binary data, I can’t view it in any meaningful way. It was generated following the instructions here, in the ‘Generating a signing key’ section:

I assume I have the wrong type of file, but I can’t find any info on what to do about it.

My most recent build ID is:
e02b1d12-4181-42a2-9791-7224debfb8c2

Using command exp build:android --clear-credentials I built again, and now the build can install. So I assume the issue is indeed to do with the keystore file. If anyone knows how I can correctly use my keystore with Expo it’d be great.

1 Like

I’m not sure exactly what was wrong with your keystore, but you can fetch the ones we generated for you with exp fetch:android:keystore, and open them both up in Android Studio to find out how they might be different. If you let us know what we could have validated here it’d be great!