-
Notifications
You must be signed in to change notification settings - Fork 16
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
[Bug] Application crashed while using sendAndVerifyAttestation method #135
Comments
Hmm, that's weird. I'll look into this now |
@karandpr I can't seem to reproduce this on the (newly added) example app in the repo. I noticed you're using RN 0.59 though, so that might be the cause. I haven't tested the module with that version of RN yet |
I see. I will check if it's fixed in latest version. |
@karandpr are you still seeing issues? |
Ha. I never got around testing in new version. I will make a sample project with 0.63 ( After 5 June) and see if I can reproduce and troubleshoot. |
Ah yikes, didn't even notice that it was a duplicate. I need to be better about managing this repo 😅 |
It's alright. I will see if I can find why it's failing on newer react versions (or certain versions ?). |
@karandpr you are passing the wrong nonce value. Either generate it with generateNonce function of the library or you can generate it with Math functions.
|
@Miti063 I agree, it's no ideal nonce but this is demo code and that nonce works with Native Android SafetyNet , earlier version of react and my implementation in ionic. |
@karandpr Agreed that it's demo code, but because of that nonce, it's not able to convert into byte using Base64 which is mentioned in the RNGoogleSafetyNetModule.java file & causes the app to crash. |
Hey @Miti063 . Interesting. Thanks to your observation I have some pointers towards the issue. let nonce = "asdas";
RNGoogleSafetyNet.sendAndVerifyAttestation(nonce,'API_KEY').then((res) => {
console.log('send&verify', res);
}).catch(err => {
console.error('send&ver', err);
}) The code doesn't work if nonce string length is
I will look into this later. Thanks again @Miti063 . |
Sorry for the long delay. I think #399 might help figure out where this is coming from. My guess is that it's having trouble decoding nonces like |
Application crashed while using sendAndVerifyAttestation method. The logs were not very helpful. I will investigate when I have time. For now creating an issue.
My app details
Code Block
Error Logs
The text was updated successfully, but these errors were encountered: