react-native-otp-verify
react-native-otp-verify copied to clipboard
Getting Timeout error as SMS message
I'm trying to use this library in my project and when no SMS is received in the 5 minutes timeout the addListener handler is called with the message "Timeout Error." (it's not a problem because the regular doesn't match). Maybe it'd better not to call the same method when a SMS is received and just log the error.
What do you think?
Yes, but we need to notify somehow right that timeout occured. What do you think we can do :)
That's true... maybe having 2 types of events and passing the event type to the javascript listener? I don't really know right now if it's possible, just a guess.
Yes, that's possible. So there would be
{
eventType: 'SUCCESS'|'TIMEOUT' ,
message:'<MESSAGE>|Timeout Error'
}
Like this right ?
How to resolve this timeout error. First time it is working fine. But, when i try getting another message it is not auto reading. It is just giving TimeOut Error.
Any solution for this? I'm getting time out error as the message
The library is emitting the static message "Timeout Error".
mContext .getJSModule(DeviceEventManagerModule.RCTDeviceEventEmitter.class) .emit(EVENT, "Timeout Error.");
Just check the message string in the handler if it's a "Timeout Error" then ignore it and show the error to the user otherwise parse the OTP.
you have to keep the SMS context as it is ex:
<#> Your Example app code: 123AB8
/Ert436gwd
I'm facing the same issue
please anyone can help. it was working fine. but now getting error. not calling otpHandler function.
same issue
same issue
did you find any solution for this ??
i am facing same problem ... any one help
Had the same problem. Function returns timeout if you don't have hash code in your sms. It was not obvious.
I have tested this and it works fine. Please make sure you have added Hash (Production hash may differ so please check) like @Zuxelus suggested In case you get the issue again feel free to reopen the issue. Thanks.
Issue still happening,added hash key correctly sometimes it's working fine and sometimes it throws timeout error @faizalshap
Issue still happening,added hash key correctly sometimes it's working fine and sometimes it throws timeout error @faizalshap
did you find any solutions?