1

I am using keychain package to store credentials. After I build the app this package doesn't work but throws an error. This is the error:

Attempt to invoke virtual method 'void com.oblador.keychain.cipherStorage.CipherStorageFacebookConceal.throwIfInsufficientLevel(com.oblador.keychain.SecurityLevel)' on a null object reference

The same code works fine when it is compiled on my friend's pc. SO, why is that? We build the same app on the same phone and I got this error. How can I solve this?

FaFa
  • 358
  • 2
  • 16

1 Answers1

3

I resolved the problem by defining the STORAGE_TYPE

let options: Keychain.Options = { storage:Keychain.STORAGE_TYPE.FB};

you can select that will use FB ,AES or RSA

Keychain.setGenericPassword('user', "password", options).then(console.log)

options

  • Thank you a lot! Omg now It works!!! I thought it was because of how I installed android studio or java. – FaFa May 17 '22 at 05:53