React-native-keychain: null is not an object (evaluating 'RNKeychainManager.SECURITY_LEVEL_ANY')

Created on 26 Jun 2019  路  9Comments  路  Source: oblador/react-native-keychain

null is not an object (evaluating 'RNKeychainManager.SECURITY_LEVEL_ANY')
[email protected]

Simulator Screen Shot - iPhone X - 2019-06-26 at 13 27 54

Most helpful comment

please make sure the module is linked correctly; follow manual installation instructions if necessary

All 9 comments

please make sure the module is linked correctly; follow manual installation instructions if necessary

@vonovak you were right. Using manual installation fixed the problem.

It is not linking problem, just add this:
export const SECURITY_LEVEL = Object.freeze({ ANY: RNKeychainManager && RNKeychainManager.SECURITY_LEVEL_ANY, SECURE_SOFTWARE: RNKeychainManager && RNKeychainManager.SECURITY_LEVEL_SECURE_SOFTWARE, SECURE_HARDWARE: RNKeychainManager && RNKeychainManager.SECURITY_LEVEL_SECURE_HARDWARE, });

export const SECURITY_LEVEL = Object.freeze({ ANY: RNKeychainManager && RNKeychainManager.SECURITY_LEVEL_ANY, SECURE_SOFTWARE: RNKeychainManager && RNKeychainManager.SECURITY_LEVEL_SECURE_SOFTWARE, SECURE_HARDWARE: RNKeychainManager && RNKeychainManager.SECURITY_LEVEL_SECURE_HARDWARE, });

@bigchamp's recommendation is the correct answer. I was experiencing the same issue but using this modification in the index.js file fixed it.

export const SECURITY_LEVEL = Object.freeze({ ANY: RNKeychainManager && RNKeychainManager.SECURITY_LEVEL_ANY, SECURE_SOFTWARE: RNKeychainManager && RNKeychainManager.SECURITY_LEVEL_SECURE_SOFTWARE, SECURE_HARDWARE: RNKeychainManager && RNKeychainManager.SECURITY_LEVEL_SECURE_HARDWARE, });

@bigchamp's recommendation is the correct answer. I was experiencing the same issue but using this modification in the index.js file fixed it.

It is not linking problem, just add this:
export const SECURITY_LEVEL = Object.freeze({ ANY: RNKeychainManager && RNKeychainManager.SECURITY_LEVEL_ANY, SECURE_SOFTWARE: RNKeychainManager && RNKeychainManager.SECURITY_LEVEL_SECURE_SOFTWARE, SECURE_HARDWARE: RNKeychainManager && RNKeychainManager.SECURITY_LEVEL_SECURE_HARDWARE, });

Can you give an example of how/where to put this? I tried chucking it in index.js but still failing to build.

import { registerRootComponent } from 'expo';
import App from './App';

export const SECURITY_LEVEL = Object.freeze({ ANY: RNKeychainManager && RNKeychainManager.SECURITY_LEVEL_ANY, SECURE_SOFTWARE: RNKeychainManager && RNKeychainManager.SECURITY_LEVEL_SECURE_SOFTWARE, SECURE_HARDWARE: RNKeychainManager && RNKeychainManager.SECURITY_LEVEL_SECURE_HARDWARE });

registerRootComponent(App);

@donzthefonz did you find a solution to that ? I'm having the same issue here ...

I have the same problem too...

same issue

hello folks, please open a new issue with a runnable repro if you're still facing this problem, thanks

Was this page helpful?
0 / 5 - 0 ratings