react-native-keychain: iOS 15 setInternetCredentials throwing "The user name or passphrase you entered is not correct" error
Since updating to iOS 15, it seems as if the setInternetCredentials method seems to be throwing an error:
Error: The user name or passphrase you entered is not correct. at Object.promiseMethodWrapper [as setInternetCredentialsForServer]
I can understand this error in the context of getInternetCredentials however I am unsure how the username or password could be incorrect when setting a new credential in the keychain.
About this issue
- Original URL
- State: open
- Created 3 years ago
- Reactions: 31
- Comments: 16 (1 by maintainers)
Following up on this since my last post. The issue remains for Simulators and devices(personal iPhone 12 mini) running iOS > 15. After doing some general digging posts it seems like the root issue is coming from Apple-land and is still ongoing. Reposting this Apple Developer Forum Issue is hidden amongst the other mentioned issues above and it seems fairly active. Hopefully, it can provide a little more context knowing that we’re not alone and the issue is bigger than
react-native-keychain.Sorry, I’m not able to provide any solid workaround or fix for the issue. Simply trying to share some details to prevent future rabbit holes.
setGenericPassword still does not work for me after updating to iOS version
15.4in simulators.Keychain.setGenericPassword('user', 'pass', { accessControl: Keychain.ACCESS_CONTROL.BIOMETRY_CURRENT_SET_OR_DEVICE_PASSCODE, accessible: Keychain.ACCESSIBLE.WHEN_PASSCODE_SET_THIS_DEVICE_ONLY, })It does seem to work on actual devices though.
If I remove accessControl from the options, it also works, but that is not very useful.
Does anyone have a solution to this problem?
Hey @jodavaga, which key in the options object is the one that controls the behaviour you suggested
accessControloraccessible? I’ve been playing with the options today and the strange behaviour is that if I removeaccessControlkey it does not work on android but it works on iOS, so as a temporary solution I’m using:This issue is only present on the simulator on real device works fine
Was having the same issue when trying to
setGenericPassword, my code was:then I removed the options object and it started working
Any news on this issue?
Facing the same issue, downgrading iOS simulators to iOS 14 does still work. Updated react-native-keychain version urgently needed.
I’m hitting the same issue/error since my Xcode version updated the simulators to iOS 15 except I’m using
setGenericPassword. Seems like something Apple did something silly.