Firebase Phone Auth [auth/unknown] An internal error has occurred. [Error code: 39] on Android (React Native, Play Integrity enabled)

9 hours ago 2
ARTICLE AD BOX

I’m getting the following error when trying to send an OTP using Firebase Phone Authentication on Android:

[auth/unknown] An internal error has occurred. [ Error code: 39 ]

Environment

React Native

@react-native-firebase/app

@react-native-firebase/auth

Android only (works on iOS)

App installed from Google Play Internal Testing

Using Firebase Phone OTP

Play Integrity API enabled and linked in Google Play Console

What I’ve done so far

Linked Google Play Console to a Google Cloud project

Enabled Play Integrity API

Play Console shows “Integration started”

Enabled Play Integrity in Firebase Authentication → Phone → Security

Set Play Integrity to ENFORCED

App is signed by Google Play

Testing on a real device (not emulator)

Package name matches in:

Play Console

Firebase Android app

AndroidManifest.xml

Code

import auth from '@react-native-firebase/auth'; const confirm = await auth().signInWithPhoneNumber('+234XXXXXXXXXX');

Problem

Despite all this, OTP fails immediately with Error code: 39 and no SMS is sent.

Question

What exactly causes Firebase Phone Auth Error 39 on Android, and what additional configuration is required to fix it when using Play Integrity with a React Native app installed from Google Play?

Is this related to:

Play App Signing SHA-256 vs debug SHA?

google-services.json not being updated?

Firebase Play Integrity enforcement requirements?

Any guidance or checklist to fully resolve this would be appreciated.

Read Entire Article