Search code examples
swiftfirebasefirebase-authentication

What does the Firebase Authentication error code 33 FIRAuthInternalErrorDomain mean?


Phone number authentication works correctly on Xcode simulator but not on my iPhone. I assume this has something to do with the silent notifications being sent since the simulator uses CAPTCHA instead.

I have the google info plist file added. Email authentication and Firestore both work on my app. The error only happens when I run verifyPhoneNumber on a physical device.

Below is the code that I use:

PhoneAuthProvider.provider().verifyPhoneNumber(number, uiDelegate: nil) { (verificationID, error) in

        print(error.debugDescription)

        if let error = error {
            self.showAlert(title: "Error verifying number", body: error.localizedDescription)
            return
        }

        if let verificationID = verificationID {
            UserDefaults.standard.set(number, forKey: "number")
            UserDefaults.standard.set(name, forKey: "name")
            UserDefaults.standard.set(verificationID, forKey: "authVerificationID")
            self.performSegue(withIdentifier: "showConfirmNumber", sender: nil)
        }
    }

I have an APNS auth key added under Cloud Messaging on the Firebase console.

This is the error that is printed. I searched around and couldn't find an explanation for it.

Error Domain=FIRAuthErrorDomain Code=17999 "An internal error has occurred, print and inspect the error details for more information." UserInfo={error_name=ERROR_INTERNAL_ERROR, NSLocalizedDescription=An internal error has occurred, print and inspect the error details for more information., NSUnderlyingError=0x281f86dc0 {Error Domain=FIRAuthInternalErrorDomain Code=3 "(null)" UserInfo={FIRAuthErrorUserInfoDeserializedResponseKey={
    code = 503;
    errors =     (
                {
            domain = global;
            message = "Error code: 33";
            reason = backendError;
        }
    );
    message = "Error code: 33";
}}}}

Solution

  • It seems Firebase is currently having some issues: https://status.firebase.google.com/incident/Authentication/18005

    iOS Phone Auth failure on Firebase Auth

    Incident began at 2018-10-18 09:50 (all times are US/Pacific).

    We are investigating an issue with Phone Auth failure on iOS. We will provide more information by 12:00 US/Pacific