mikehardy / react-native-update-apk

Update apk from non-play store servers, and update ios from app store in React Native.
MIT License
195 stars 57 forks source link

The signature thumbprints seem unequal. Install will fail #37

Closed billel-boudchicha closed 3 years ago

billel-boudchicha commented 3 years ago

First of all thank you for your great work . I'am trying to integrate your Lib , to an existing App, already tried the Example app (work as expected).

i uploaded the apk and the json file to google drive

but iam facing this problem this is my console.log

NUpdateAPK::downloadApk - downloadApkEnd downloadApkEnd callback called RNUpdateAPK::downloadApk - Old Cert SHA-256:fac61745dc0903786fb9ede62a962b399f7348f0bb6f899b8332667591033b9c RNUpdateAPK::downloadApk - New Cert SHA-256: 933960e3e54194b26fff97fa52ddbee75037adb1c4ac1767126d4c53cadf3ebc The signature thumbprints seem unequal. Install will fail

mikehardy commented 3 years ago

You are signing it with a different cert somehow. In my experience with debug builds people normally don't synchronize their keystores across development environments (why would you normally?) so when I was initially building this module I saw this (and added the specific printouts above to trap the bug). Now to make sure anyone can generate testable debug builds in my team I actually have the debug keystore in source control and everyone uses the same one so signing certs are the same

For release builds you should obviously be using the same keystore as eventually you will want to deliver it via google play etc, but either way it could have the same issue

Most specifically though - it's not a problem with this module, it's a problem with how you are generating and signing the APK. Harmonize your keystores, make sure the old APK and new APK are both using the same cert (you might need to uninstall the old APK first, with no automated upgrade path if you can't find the old keystore) and you should be set