Skip to content

5.0.0-beta.4 – Frequent CRYPTO_EXCEPTION Errors on Android #1278

@helmoski

Description

@helmoski

Checklist

Description

We are seeing a large number CRYPTO_EXCEPTION errors specifically on Android devices after upgrading from 5.0.0-beta.3 to 5.0.0-beta.4:

CRYPTO_EXCEPTION: A change on the Lock Screen security settings have deemed the encryption keys invalid and have been recreated. Any previously stored content is now lost. Please try saving the credentials again.
  at construct(native)
  at <global>(/node_modules/react-native-auth0/src/core/models/CredentialsManagerError.ts:1:41)
  at constructor(/node_modules/react-native-auth0/src/core/models/CredentialsManagerError.ts:47:5)
  at handleError(/node_modules/react-native-auth0/src/platforms/native/adapters/NativeCredentialsManager.ts:20:40)
  at throw(native)
  at asyncGeneratorStep(/node_modules/@babel/runtime/helpers/asyncToGenerator.js:3:17)
  at _throw(/node_modules/@babel/runtime/helpers/asyncToGenerator.js:20:27)
  at tryCallOne(/node_modules/promise/setimmediate/core.js:37:14)
  at setImmediate$argument_0(/node_modules/promise/setimmediate/core.js:123:25)
  at apply(native)
  at global.queueMicrotask$argument_0(/node_modules/react-native/Libraries/Core/Timers/immediateShim.js:46:21)

This error is occurring without any changes to the lock screen security settings and even on a new device with a fresh install that has never had our app on it before.

Interestingly, we are still able to retrieve and use credentials via getCredentials even after this error occurs, so we started just filtering out that error for now.

Reproduction

We haven't been able to determine a way to reproduce it consistently, but it is happening frequently. I was hesitant to open this issue, but I thought it would be better to report it than to remain silent.

Additional context

No response

react-native-auth0 version

5.0.0-beta.4

React Native version

0.79.5

Expo version

53.0.19

Platform

Android

Platform version(s)

n/a

Metadata

Metadata

Assignees

No one assigned

    Labels

    AndroidUsed to denote issues raised for Android Platformmore info neededMore information is required to action or process this issue or PR

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions