🔥 [Error: [auth/internal-error] An internal error has occurred, please try again.] on ios real device
Issue
When I try to use in iOS signInWithPhoneNumber , I'm getting following error on a real iOS device. it's working on iOS simulator and on Android.
import auth from '@react-native-firebase/auth';
and execute.
const confirmation = await auth().signInWithPhoneNumber(phoneNumber);
package.json:
"@react-native-firebase/analytics": "^7.4.2",
"@react-native-firebase/app": "^8.3.1",
"@react-native-firebase/auth": "^9.0.0",
"@react-native-firebase/crashlytics": "^8.3.2",
"@react-native-firebase/dynamic-links": "^7.4.2",
"@react-native-firebase/firestore": "^7.5.3",
"@react-native-firebase/in-app-messaging": "^7.3.2",
"@react-native-firebase/messaging": "^7.7.2",
"@react-native-firebase/remote-config": "^8.1.3",
"@react-native-firebase/storage": "^7.3.3",
firebase.json for react-native-firebase v6:
# N/A
iOS
Click To Expand
ios/Podfile:
- [ ] I'm not using Pods
- [x] I'm using Pods and my Podfile looks like:
react-native info output:
System:
OS: macOS 10.15.7
CPU: (4) x64 Intel(R) Core(TM) i5-5257U CPU @ 2.70GHz
Memory: 56.44 MB / 8.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 14.5.0 - /var/folders/8h/dw7x6l656k5_zjnd7d2418zh0000gn/T/yarn--1607354328842-0.6201374730608411/node
Yarn: 1.22.5 - /var/folders/8h/dw7x6l656k5_zjnd7d2418zh0000gn/T/yarn--1607354328842-0.6201374730608411/yarn
npm: 6.14.5 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
Managers:
CocoaPods: 1.9.3 - /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms: iOS 14.1, DriverKit 19.0, macOS 10.15, tvOS 14.0, watchOS 7.0
Android SDK:
API Levels: 28, 29
Build Tools: 28.0.3, 29.0.2, 29.0.3
System Images: android-29 | Google APIs Intel x86 Atom
Android NDK: Not Found
IDEs:
Android Studio: 4.1 AI-201.8743.12.41.6858069
Xcode: 12.1/12A7403 - /usr/bin/xcodebuild
Languages:
Java: 1.8.0_242 - /usr/bin/javac
Python: 2.7.16 - /usr/bin/python
npmPackages:
@react-native-community/cli: Not Found
react: 16.13.1 => 16.13.1
react-native: 0.63.2 => 0.63.2
npmGlobalPackages:
*react-native*: Not Found
-
Platform that you're experiencing the issue on:
- [x ] iOS
- [ ] Android
- [x] iOS but have not tested behavior on Android
- [ ] Android but have not tested behavior on iOS
- [ ] Both
-
react-native-firebaseversion you're using that has this issue: react-native-firebase/auth version 9.0.0 -
Are you using
TypeScript?- N
Can you upgrade to current stable versions (v10.1.1 at the moment), and then let us know if it's still happening? Working against old versions frequently results in wasted time spent chasing already fixed bugs
Additionally, grab a fresh set of your config files (Google-Services.plist / google-services.json) from the firebase console as they have made some changes there
@mikehardy thanks for your response, I'm getting a different error after upgrading to latest (10.1.1).
Error: [auth/invalid-app-credential] Invalid token.
also updated Google-Services.plist.
also tried to open the API key permissions from google API console (https://console.developers.google.com/apis/credentials)
worked after I created an APN key from apple developer console and uploaded it in firebase console under messaging settings, found inspiration here https://github.com/invertase/react-native-firebase/issues/3183#issue-561966302 maybe worth mention it in docs?
Every document has an edit button at top right, our users know better than us where things are missing as they've always got the fresh eyes. Propose a PR to the docs via the easy-to-use PR web flow GitHub uses for docs and we can work on it. If you can't think of any better location maybe the tips-n-tricks page
updating the GoogleService-Info.plist solved it on my side (Error: GoogleSignIn write to firebase Failed Error: [auth/internal-error] An internal error has occurred, please try again.) thanks Mike!
For anyone else who ran into the same unhelpful error message from Firebase, I have seen one more possible cause: Firebase on iOS will also emit this error if your app bundle id doesn't match the one in GoogleServices-Info.plist and the Firebase dashboard. (I had a typo.)
i have the same error for some of Iphone users. others iphone users can cannot with google without any probleme any tips to get more info when error happen ?
i have check device id