bug: error when saving credentails
Version
7.1.13
Platform(s)
- [ ] Android
- [x] iOS
- [ ] Web
Current behavior
getting this error on saveCredentails
errorMessage: "The operation couldn’t be completed. (CapgoCapacitorNativeBiometric.NativeBiometric.KeychainError error 0.)"
Expected behavior
should save credentials.
Reproduction
No response
Steps to reproduce
install plugin latest version: npm i @capgo/capacitor-native-biometric use code: async setCredentials(email: string, password: string, server: string) { try { await NativeBiometric.setCredentials({ username: email, password: password, server: server, })
} catch (e) {
this.saveErrorLog(e);
}
}
Other information
No response
Capacitor doctor
💊 Capacitor Doctor 💊
Latest Dependencies:
@capacitor/cli: 7.4.3
@capacitor/core: 7.4.3
@capacitor/android: 7.4.3
@capacitor/ios: 7.4.3
Installed Dependencies:
@capacitor/cli: 7.4.3
@capacitor/android: 7.4.3
@capacitor/core: 7.4.3
@capacitor/ios: 7.4.3
[success] iOS looking great! 👌
[success] Android looking great! 👌
Before submitting
- [x] I have read and followed the bug report guidelines.
- [x] I have attached links to possibly related issues and discussions.
- [x] I understand that incomplete issues (e.g. without reproduction) are closed.
Fastest way to fix this issue
- [ ] I want to get this fix ASAP and found the issue with Algora we recommend ($50 to $500)
hey @Saqib92 we had issue on the name when we migrated to new arch please test it again it should work
i fixed it by deleting previously saved credentials:
saveData(email: string, password: string, server: string){
await NativeBiometric.deleteCredentials({ server: server }); // adding this line fixed the issue
await NativeBiometric.setCredentials({
username: email,
password: password,
server: server,
})
}
@Saqib92 I’ll recheck if it’s fixed without this extra line.