SMS verification code request failed: unknown status code: 17093 null Firebase Phone Auth Android

Viewed 12506

So I have implemented firebase phone Auth in my app so as soon as I request OTP it first goes to captcha page but then it returns and says this in log

This request is missing a valid app identifier meaning that neither SafetyNet checks succeeded. Please try again, or check the logcat for more details.

And in log cat I saw the following error

[SmsRetrieverHelper] SMS verification code request failed: unknown status code: 17093 null

So what is the issue here and what does the status code means?

3 Answers

I was getting the same error and I could solved it with the last two steps of the following (make sure you have covered all of them):

  1. Add SHA1 in the firebase project
  2. Add SHA-256 in the firebase project
  3. Enable Phone option in Sign-in method under Firebase Authentication
  4. Make sure to download and add the latest google-services.json file in your project
  5. Enable Android Device Verification for your firebase project in https://console.cloud.google.com/
  6. Add library implementation "androidx.browser:browser:1.3.0" https://developer.android.com/jetpack...

Its very important to follow the above 6 steps.

I had the same problem, I was clueless and then after carefully looking at my code I realised what was creating a mess for me. I guess its same for you too.

Use this when you want test your app with predefined phone numbers(testing): mAuth.getFirebaseAuthSettings().setAppVerificationDisabledForTesting(true);

Otherwise, if you are trying to test with real phone number disable the line and test. It should work.

Adding up to @fred answer, be sure the SHA-1 and SHA-256 signatures are added to the console, but be sure which signatures you are adding, beacuse if it is a release version, you should get the SHA's from Developer Console, remember Google signs your app with a key stored on google servers.

Additional to this, I had to enable Safety Net on Firebase Console. Let me know if you manage to get everything working.

Related