George O
George O

Reputation: 187

Firebase SMS verification failing with error code 39

I'm experiencing an issue with Firebase where SMS verification codes are not sent to some valid phone numbers. These numbers are able to receive SMS from other providers without any issues. The problem has been observed over multiple attempts on different days. Here are the details:

{
  "insertId": "-k92yxdd8v6y",
  "jsonPayload": {
    "@type": "type.googleapis.com/google.cloud.identitytoolkit.logging.RequestLog",
    "methodName": "google.cloud.identitytoolkit.v1.AuthenticationService.SendVerificationCode",
    "status": {
      "message": "Error code: 39",
      "code": 13
    },
    "request": {
      "@type": "type.googleapis.com/google.cloud.identitytoolkit.v1.SendVerificationCodeRequest",
      "phoneNumber": "+400730679600"
    },
    "requestMetadata": {
      "callerIp": "86.124.126.97",
      "callerSuppliedUserAgent": "FirebaseAuth.iOS/10.22.0 ro.afooddeployments.afood/3.4.0 iPhone/17.4.1 hw/iPhone14_5,gzip(gfe),gzip(gfe)"
    },
    "serviceName": "identitytoolkit.googleapis.com"
  },
  "resource": {
    "type": "identitytoolkit_project",
    "labels": {
      "project_id": "ambrosia-e5ea3"
    }
  },
  "timestamp": "2024-06-17T08:49:19.981Z",
  "severity": "ERROR",
  "logName": "projects/ambrosia-e5ea3/logs/identitytoolkit.googleapis.com%2Frequests",
  "receiveTimestamp": "2024-06-17T08:49:20.859697728Z"
}

Steps to Reproduce:

  1. Attempt to send an SMS verification code to the phone number +400730679600 using Firebase Authentication.
  2. Observe that the request fails with error code 39 intermittently.

What I've Tried:

  1. Confirmed that the phone numbers are valid and can receive SMS from other providers.
  2. Attempted multiple times on different days to rule out temporary issues.
  3. Reviewed Firebase documentation and error codes but found no specific details for error code 39.

Has anyone experienced similar issues with Firebase SMS verification? Any insights or suggestions would be greatly appreciated. Thank you!

note that +400730679600 is my own test number

Upvotes: 4

Views: 1664

Answers (1)

Mircea Dragota
Mircea Dragota

Reputation: 754

Firebase answered me with this reCAPTCHA SMS toll fraud protection which is only in preview right now https://cloud.google.com/identity-platform/docs/recaptcha-tfp for Firebase Auth and Google Cloud Identity Platform that will allow you to manage your own risk tolerance. Generally speaking, no carriers are expected to be blocked for projects using reCAPTCHA SMS toll fraud protection, so "error:39" messages should no longer occur.

I'm curious if anyone started implementing this.

Upvotes: 0

Related Questions