Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🔥 [🐛] auth/internal-error on iOS Only (Using Expo) #8137

Open
1 of 10 tasks
topherjamesknoll opened this issue Nov 15, 2024 · 5 comments
Open
1 of 10 tasks

🔥 [🐛] auth/internal-error on iOS Only (Using Expo) #8137

topherjamesknoll opened this issue Nov 15, 2024 · 5 comments
Labels

Comments

@topherjamesknoll
Copy link

Issue

I can get up and running with my Expo App and react-native-firebase just fine in development and production on Android and development on iOS, but NOT production on iOS. I'm using EAS and Expo to build and deploy my apps to TestFlight and the app store. But when I try to login on to the deployed version of my app I get the error: auth/internal-error

I have two Firebase Projects; one for dev and one for prod. In each, I have an Android app and an iOS app. I downloaded the credential .json and .plist files and uploaded them to Expo secrets and referenced them in my app.config.json file. I even successfully checked my .plist file with plutil.

ios: {
supportsTablet: true,
bundleIdentifier: "x.x.x",
buildNumber: "129",
googleServicesFile:
process.env.GOOGLE_SERVICES_FILE_IOS ?? "./GoogleService-Info-dev.plist"
}

I've also installed the packages with Expo added the plugins like so:

"@react-native-firebase/app",
"@react-native-firebase/auth",
[
"expo-build-properties",
{
ios: {
useFrameworks: "static"
}
}
]

Project Files

Javascript

Click To Expand

package.json:

{
  "name": "bessa",
  "version": "1.0.0",
  "main": "expo-router/entry",
  "scripts": {
    "start": "expo start",
    "android": "expo start --android",
    "ios": "expo start --ios",
    "web": "expo start --web"
  },
  "dependencies": {
    "@eva-design/eva": "^2.2.0",
    "@expo-google-fonts/roboto": "^0.2.3",
    "@react-native-firebase/analytics": "^21.4.0",
    "@react-native-firebase/app": "^21.4.0",
    "@react-native-firebase/auth": "^21.4.0",
    "@react-native-firebase/storage": "^21.4.0",
    "@react-navigation/drawer": "^6.6.15",
    "@sentry/react-native": "~5.24.3",
    "@ui-kitten/components": "^5.3.1",
    "axios": "^1.7.7",
    "dayjs": "^1.11.10",
    "expo": "~51.0.39",
    "expo-application": "~5.9.1",
    "expo-av": "~14.0.7",
    "expo-build-properties": "~0.12.5",
    "expo-constants": "~16.0.2",
    "expo-contacts": "~13.0.5",
    "expo-dev-client": "~4.0.29",
    "expo-device": "~6.0.2",
    "expo-font": "~12.0.10",
    "expo-image": "~1.13.0",
    "expo-image-picker": "~15.0.7",
    "expo-linking": "~6.3.1",
    "expo-location": "~17.0.1",
    "expo-notifications": "~0.28.19",
    "expo-router": "~3.5.24",
    "expo-sms": "~12.0.1",
    "expo-status-bar": "~1.12.1",
    "expo-store-review": "~7.0.2",
    "expo-system-ui": "~3.0.7",
    "expo-updates": "~0.25.27",
    "expo-video-thumbnails": "~8.0.0",
    "react": "18.2.0",
    "react-native": "0.74.5",
    "react-native-gesture-handler": "~2.16.1",
    "react-native-iap": "^12.15.7",
    "react-native-international-phone-number": "^0.8.0",
    "react-native-maps": "1.14.0",
    "react-native-reanimated": "~3.10.1",
    "react-native-safe-area-context": "4.10.5",
    "react-native-screens": "3.31.1",
    "react-native-svg": "15.2.0",
    "react-native-vector-icons": "^10.0.2",
    "rrule": "^2.8.1",
    "vexo-analytics": "^1.3.15"
  },
  "devDependencies": {
    "@babel/core": "^7.24.0"
  },
  "private": true,
  "resolutions": {
    "react-native-reanimated": "~3.6.2"
  },
  "prettier": {
    "trailingComma": "none"
  }
}

firebase.json for react-native-firebase v6:

# N/A

iOS

Click To Expand

ios/Podfile:

  • I'm not using Pods
  • I'm using Pods and my Podfile looks like:
# N/A

AppDelegate.m:

// N/A


Android

Click To Expand

Have you converted to AndroidX?

  • my application is an AndroidX application?
  • I am using android/gradle.settings jetifier=true for Android compatibility?
  • I am using the NPM package jetifier for react-native compatibility?

android/build.gradle:

// N/A

android/app/build.gradle:

// N/A

android/settings.gradle:

// N/A

MainApplication.java:

// N/A

AndroidManifest.xml:

<!-- N/A -->


Environment

Click To Expand

react-native info output:

~/Projects/bessa git:[1.6.47]
react-native info
info Fetching system and libraries information...
System:
  OS: macOS 15.0.1
  CPU: (12) arm64 Apple M2 Max
  Memory: 102.56 MB / 32.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 20.12.2
    path: ~/.nvm/versions/node/v20.12.2/bin/node
  Yarn:
    version: 1.22.22
    path: ~/.nvm/versions/node/v20.12.2/bin/yarn
  npm:
    version: 10.8.2
    path: ~/.nvm/versions/node/v20.12.2/bin/npm
  Watchman:
    version: 2024.04.29.00
    path: /opt/homebrew/bin/watchman
Managers:
  CocoaPods:
    version: 1.15.2
    path: /opt/homebrew/bin/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 24.1
      - iOS 18.1
      - macOS 15.1
      - tvOS 18.1
      - visionOS 2.1
      - watchOS 11.1
  Android SDK: Not Found
IDEs:
  Android Studio: Not Found
  Xcode:
    version: 16.1/16B40
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 17.0.9
    path: /Users/topher/.sdkman/candidates/java/current/bin/javac
  Ruby:
    version: 2.6.10
    path: /usr/bin/ruby
npmPackages:
  "@react-native-community/cli": Not Found
  react:
    installed: 18.2.0
    wanted: 18.2.0
  react-native:
    installed: 0.74.5
    wanted: 0.74.5
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: Not found
  newArchEnabled: Not found
iOS:
  hermesEnabled: Not found
  newArchEnabled: Not found

info React Native v0.76.2 is now available (your project is running on v0.74.5).
info Changelog: https://github.com/facebook/react-native/releases/tag/v0.76.2
info Diff: https://react-native-community.github.io/upgrade-helper/?from=0.74.5
info For more info, check out "https://reactnative.dev/docs/upgrading?os=macos".
  • Platform that you're experiencing the issue on:
    • iOS
    • Android
    • iOS but have not tested behavior on Android
    • Android but have not tested behavior on iOS
    • Both
  • react-native-firebase version you're using that has this issue:
    • ^21.4.0
  • Firebase module(s) you're using that has the issue:
    • auth, storage, and analytics
  • Are you using TypeScript?
    • Y/N & VERSION


@mikehardy
Copy link
Collaborator

So if it works in one environment but not the other than it must be a configuration error? I'm not sure how to provide help for that other than the vague + I'm certain you already through of it "triple check absolutely every single configuration item" 🤔

@topherjamesknoll
Copy link
Author

lol thanks yep triple checked everything and made several deployments nothing seems to work. i have Authntication enabled in Firebase with both email authentication and Google authentication enabled. both my dev and prod projects in firebase are setup the same as far as I can see and I've been reviewing them very closely. been doing research for about two days now and haven't found many other things to change. is there anything other info I can provide to help?

@mikehardy
Copy link
Collaborator

Plug a real device running the production build into a computer and either run the production build from xcode or use console.app to watch the phone logs while you reproduce the error, and fish out anything related to the internal error while it happens, there may be clues there

@topherjamesknoll
Copy link
Author

I use Sentry to view logs in production. As mentioned, all it throws is auth/internal-error as the code and "Please try again." as the mesage. I've checked even reset the password to the user I've testing. I can see in the request that my API key is present too. This leads me to belive that my .plist file is indeed being read correctly.

I did notice that Firebase Analytics, which I also installed through react-native-firebase, is picking me up as a user. So Analytics works but Auth still does not. I see that Analytics doesn't need a plugin, so if there is a plugin issue, that would make sense. Currently, I have the following in my app.config.js under expo.plugins as you have laid out in your docs:

"@react-native-firebase/app",
"@react-native-firebase/auth",
[
"expo-build-properties",
{
ios: {
useFrameworks: "static"
}
}
]

@mikehardy assuming you're the author? Do you know of anything in the auth plugin file that might help? Trying every combination of settings I know and following suggested from the web. Really would love to use your software and get this released. I appreciate the help!

@mikehardy
Copy link
Collaborator

You really want to do this:

Plug a real device running the production build into a computer and either run the production build from xcode or use console.app to watch the phone logs while you reproduce the error, and fish out anything related to the internal error while it happens, there may be clues there

You can watch it in real time. You can get all the surrounding context

I'm not "the author" though I help a lot 😆 - this suite of modules is huge, many authors! https://github.com/invertase/react-native-firebase/graphs/contributors

I don't use Expo, sorry, so unsure what could be going on. The source is available though and none of the plugins are very complicated, quick to read through

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants