Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

null is not an object (evaluating 'RNKeychainManager.SECURITY_LEVEL_ANY') #221

Closed
sfmedion opened this issue Jun 26, 2019 · 9 comments
Closed

Comments

@sfmedion
Copy link

null is not an object (evaluating 'RNKeychainManager.SECURITY_LEVEL_ANY')
react-native-keychain@3.1.3

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

@vonovak
Copy link
Collaborator

vonovak commented Jun 26, 2019

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

@sfmedion
Copy link
Author

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

@bigchamp
Copy link

bigchamp commented Jun 7, 2020

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, });

@qiqo
Copy link

qiqo commented Jun 28, 2020

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.

@donzthefonz
Copy link

donzthefonz commented Sep 1, 2020

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);

@PoulsQ
Copy link

PoulsQ commented Sep 29, 2020

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

@ricechenghk
Copy link

I have the same problem too...

@hengkx
Copy link

hengkx commented Dec 8, 2020

same issue

@vonovak
Copy link
Collaborator

vonovak commented Dec 9, 2020

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

Repository owner locked and limited conversation to collaborators Dec 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants