Timeout error. Listener never returns event message from sms. #4
Comments
@Bruno-Furtado I did follow those guidelines. I got my sms to look like this.
|
@Technaur, I'm not sure if it's the problem, but could you try to leave the hash on a new line? |
@Bruno-Furtado So this time I made sure that I have a newline character. My Code.
Registered does come back on true, then after that I send the sms like in the image above. But my .addSmsListener is never triggered. |
@Technaur, can you debug the Java code on Android Studio? so we can get more details... |
Same issue here! I'm testing on Android 7.0 emulator with google play services |
@Technaur @ranjithkumar8352 are you building your apk with the same keys you used to generate the hash? If its debug build and your hash is release apk's, Android system won't read the SMS. Make sure you are building the APK with the same key which is used to generate the hash. |
@Technaur are you generating the hashkey using your android debug keystore. The debug keystore can be found in ~/.android/debug.keystore . The password prompted for should be android (case sensitive) |
@mpraki @srivatsav Turns out I was generating the hash completely wrong. I followed your advice by running this command.
That generated the correct 11 character hash for me. Thanks for the help :) It is working now. |
|
Hey I have tried all the answers give n above. Nothing works for me. My evenlistener never gets triggered. |
This issue happens if the hash is wrong. I tried many suggested methods to generate hash but all of them were wrong. Maybe I did something wrong in the hash generation process. Finally, I had to use the |
@ranjithkumar8352 can you please share the block of code that how you used the I am trying to use in this way: Facing this error: |
@ranjithkumar8352 thanks for your input. That should solve for development . But what about the release variant. How do we get the correct signature |
Make sure that you completely remove this library and install that library properly. This error happens when this library is still linked. |
@Rushi271193 I do the same for release variant as well. I build the app for release variant once and note down the hash.
|
@ranjithkumar8352 I tried doing the same but the key generated for the signed apk doesn't work |
I am actually just using the signature class from java as both the libraries cannot be used together. I call the signature class in the Main activity and i receive a hash but it does not work. Can you help me out here |
@Rushi271193 You might be missing something with the signature class. I'm not sure about that. Why don't you just uninstall this library, install the other one and get hash? It just takes 5 minutes |
@mpraki how to generate hex for release with keystore path and on addSmslistener I am getting time out exception added on componentDidMount |
@sagarhudge,
Please check the below 2 links.
Will give an overview -
https://developers.google.com/identity/sms-retriever/overview
Will help you generate the 11 digit hex code -
https://stackoverflow.com/a/45088731/710817
|
@mpraki @Bruno-Furtado @gitter-badger @ranjithkumar8352
For release same command need to be executed? like bellow Please help ? |
@shehzadosama can you tell me in which place you executed above command and also how you did for release and how you have give release keystore path |
@mpraki @Bruno-Furtado @gitter-badger @ranjithkumar8352 |
@sagarhudge Hash is always displayed in the SMS |
Hi |
When I run this command to fetch my hash, it returns the following error: Note: app1sms.keystore >>> app1sms is the name I gave while creating keystore for this app |
@khaja-nizamuddin1 check your command you are running on command prompt. It contains |
On a Mac I could get this command to work properly:
Now I've got hash and it is working. I see my message in my app. |
This is the only way that worked for me |
This command generates the hash key but the OTP is never read, it's working with debug but not with the release. |
Environment
Description
I trigger the _onSmsListenerPressed function with a button. "const registered = await SmsRetriever.startSmsRetriever()" comes back as true. I then send a correctly formatted sms from the Extended Controls panel. After a few minutes I am greeted with
"Timeout error."
The sms content never gets returned in the listener.
Solution (Edit)
Just replace
com.sms_listener
with your own package name.The default
-alias
for the debug keystore will always beandroiddebugkey
keytool -exportcert -alias androiddebugkey -keystore '~\.android\debug.keystore' | xxd -p | tr -d "[:space:]" | echo -n <<<com.sms_listener>>>
cat| sha256sum | tr -d "[:space:]-" | xxd -r -p | base64 | cut -c1-11
If you are using the debug keystore like me, it will ask for a password after you run the above command.
The default password is:
android
A string will then be generated, something like this:
gaMzAZ+vMRr
The text was updated successfully, but these errors were encountered: