Issue accessing Keystore on Android 8.1.0 after app re-installation

When we uninstall and re-install our standalone app, we’re getting the following exception thrown in the logs when we try to access the Android Keystore again via Expo.SecureStore:

10-12 15:56:37.716  1793  1887 I ReactNativeJS: { [Error: Could not decrypt the item in SecureStore]
10-12 15:56:37.716  1793  1887 I ReactNativeJS:   framesToPop: 1,
10-12 15:56:37.716  1793  1887 I ReactNativeJS:   code: 'E_SECURESTORE_DECRYPT_ERROR',
10-12 15:56:37.716  1793  1887 I ReactNativeJS:   line: 148,
10-12 15:56:37.716  1793  1887 I ReactNativeJS:   column: 1889,
10-12 15:56:37.716  1793  1887 I ReactNativeJS:   sourceURL: '/data/user/0/com.trinet.mobilev7/files/30.0.0/cached-bundle-experience-%40trinet%2Fmobilev7-737969915-30.0.0' }

The current workaround is to go into Device Settings > Apps & Notifications > See All Apps > Our App > Clear Data. However, we require our device UUID to be cached in the Keystore (we’re using to identify devices in our backend for our Push Notification service) so that it persists between re-installations. This works fine on other versions of Android (and also iOS) except 8.1.0.

The following devices are giving errors:

Nexus 5X
Samsung S9
Xiaomi
Is there any fix that can be done using the Expo SDK to fix this or will we have to wait till the next version of Expo for a fix?

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.