emeraldsanto / react-native-encrypted-storage

React Native wrapper around EncryptedSharedPreferences and Keychain to provide a secure alternative to Async Storage.

Home Page:https://www.npmjs.com/package/react-native-encrypted-storage

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Getting RNEncryptedStorageError: An error occured while saving value.

TaraSinghDanu opened this issue · comments

Screenshot 2020-10-03 at 2 35 40 PM

try {
await EncryptedStorage.setItem(
'showCeanOnboarding',
'false'
);
} catch (error) {
console.log('error setShowCeanOnboarding', error)
}

"react-native-encrypted-storage": "^3.0.0",

Platform :ios

Working fine in Android

Hi! Can you try logging error.code as specified in the README?

@emeraldsanto We are also getting the same error in production for iOS. Error Code being: -25308.

Here's a thread regarding this specific iOS error in case it may help you: https://developer.apple.com/forums/thread/114159

@emeraldsanto Link did not help, we are getting errors in retrieving the values now. RNEncryptedStorageError: An error occured while retrieving value. All errors occurred in iOS

Yeah, we are also getting the same -25308 errors while saving/retrieving values on ios. The link doesn't help much in understanding the cause. Anyone have any idea, like under which circumstances this error can occur?

We are also getting this error in iOS, android working fine, is there any solution yet, or any other options ?

getting the same error in ios, any fix yet?

We're facing same error -25308. Couldn't find the root cause. Any help would be much appreciated

Errors -25308 are caused by accessing the keychain while the app is not active / the phone is locked.

See #68 for an explanation and a workaround

Any updates here?