Hey, I’m updating my app from SDK version 38 to 44. When I upgrade the app from the App Store/Google Play on a device, the data from SecureStore and AsyncStorage is no longer accessible. The SecureStore returns null for a key that returned OK in the version which was previously installed on the device.
Some additional information:
The apps were installed from TestFlight/Internal Testing tracks on top of the ones from App Store/Production tracks
The applications run perfectly in Expo Go on both platforms and build goes through ok
The last version was built with the old expo build, the new version using EAS
My last successful build which is currently in the app stores is built on Aug 17, 2020 with the same Expo account
iOS distribution certificate was expired when I started to run the builds so it was regenerated
What might cause this data loss? Is there any way for me to prevent this data loss on the app users? It could be quite catastrophical for some.
It seems like the name/location of the database might have changed. I haven’t tested this myself, but I suspect the database name is different between an app built with expo build and eas build.
Although the following is about ejected/bare apps, maybe it will point you in the right direction:
Along with this superficial change in package names comes a fix for an issue that occurs when ejecting your project; more information in this issue and these pullrequests.
@adamjnav is the AsyncStorage filename/path different for a classic standalone app vs. one built with EAS Build?
EDIT: @numsu maybe you could try creating a new app that makes use of AsyncStorage. Then build it with expo build and store something. Then build it with eas build and try to access that data. Then re-install the version that was built with expo build to see if the data is available again. Based on the above you could perhaps create an issue on GitHub with all the details.
I’ve trialed this a bit further now and found out that this doesn’t affect AsyncStorage. Those issues came after running several different SDK versions on my phone which messed up the storage.
However this issue does affect SecureStore. On an identical app built with expo build, I can access the data, but with the app built with eas build I cannot. I opened an issue about this.