Closed Chinmay-KB closed 1 year ago
I fixed it by setting timeout to 0
in FirebaseAuth,
await firebaseAuth.verifyPhoneNumber(
phoneNumber: phoneNumber,
timeout: Duration(seconds: 0),
verificationCompleted: phoneVerificationCompleted,
verificationFailed: phoneVerificationFailed,
codeSent: phoneCodeSent,
forceResendingToken: forceResendCode,
codeAutoRetrievalTimeout: autoRetrievalTimeout);
Answer taken from https://stackoverflow.com/a/69078728/11555932
Hello, @Chinmay-KB Did you find a way around the issue
Hello, @Chinmay-KB Did you find a way around the issue
Nope. Last I worked on this, I just made a fork of this project and wrapped the whole thing in try catch, worked for me
Let me try wrapping and see if it works.
I tried wrapping the otpinteractor.startListenRetiver on a try catch block and the error even cant be caught by the catch block.
I changed the package to "sms_autofill: ^2.2.0" and it works for me. it seems this OTP-autofill pkg, has a method not doing its work. the stop-listen method. it is supposed to stop listening after a timeout or after like 5 min. but it didn't stop listening.
Seems like there is a stale issue, if it will occure again, new issue will be created
Describe the bug
Once OTP sms is received, the app crashes completely. Code used is the same as that given in the example.
Additional context
I have forked this repo and added try catch around the android code, and upgraded the dependency versions in gradle, and it is working. That is not the proper way to do this though, just an emergency workaround.