Standalone APK Hanging on SecureStore getItemAsync

Please provide the following:

  1. SDK Version: 39
  2. Platforms(Android/iOS/web/all): Android Standalone

Hi folks. Having some trouble with a standalone Android apk which we’re due to release this week. On load, I’m using SecureStore to check for the existence of a value, but the app seems to be hanging on the getItemAsync line. I’m getting the following in logcat. Any help would be massively appreciated!

10-22 15:07:02.907 3102 3102 D SoftKeymaster: system/keymaster/auth_encrypted_key_blob.cpp, Line 130: Failed to deserialize versioned key blob. Assuming unversioned.

10-22 15:07:02.908 3102 3102 D SoftKeymaster: system/keymaster/auth_encrypted_key_blob.cpp, Line 74: Failed to deserialize unversioned blob (may be a HW-backed key)

10-22 15:07:02.954 22432 22503 W ExpoSecureStore: javax.crypto.AEADBadTagException

10-22 15:07:02.954 22432 22503 W ExpoSecureStore: Caused by: android.security.KeyStoreException: Signature/MAC verification failed

Also, if I clear the app data, everything seems to work. It’s only on initial app download and install.

hi!

do you know what Android version this was on? I was trying to reproduce this issue but the following code worked fine for me on an APK built with SDK 39:

<Button title="set secure store item" onPress={async () => {
  try {
    await SecureStore.setItemAsync('myKey', 'myValue');
  } catch(e) { alert(e) }
}}/>
<Button title="get secure store item" onPress={async () => {
  try {
    alert(await SecureStore.getItemAsync('myKey'));
  } catch(e) { alert(e) }
}}/>

Hey @charliecruzan

I’ve seen some mention of an issue similar to this before. I can’t remember if it was AsyncStorage or SecureStore, though. As far as I remember it had to do with there being a thread pool that was used for various things (async tasks?). If too many were trying to run at once then the requests to AsyncStorage/SecureStore would block until another thread could be started. At least that’s my vague memory of this. Unfortunately I’ve not been able to find the post/article/tweet/whatever it was again.

The closest I could find is this:

If the above is not relevant then sorry for the waste of time :slight_smile:

2 Likes

Hey Charlie,

This is happening on version 8.0.0. Thanks for looking into this for me!

I’m currently just handling it by running some logic in the catch block, but would love to know why its erroring out. Again, it’s only on first install for some reason.

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