-
Notifications
You must be signed in to change notification settings - Fork 906
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
firebase/auth problem in expo/react-native #7448
Comments
Just curious, are you using any kind of splash screen, because I am experiencing something similar (I'm using SDK 10), however it only started after I started work on a splash screen. |
@jacobhq I use expo-splash-screen to handle with the Splash Screen, but in the general, the Splash Screen is managed by the Expo. It is just a image, which the path I put on app.json. If there is no image, the screen stay in blank. |
Oh ok, I was using the |
@jacobhq That is from expo-splash-screen, isn't? I use it here. If you remove it, the app works? |
Yep |
@jacobhq Nice. I've been tested here and it didn't work. =/ |
Oh, well thanks for trying. If you paste in your |
Hello, having the same issue. App completely freezes after splash screen when using getAuth or initializeAuth. If I launch the development-build without the call to authentication (located in a separated firebaseConfig file), app gets loaded. Calling const auth = getAuthentication(app) will work correctly on refresh. Reloading completely the app however gets the app completely frozen back. Package.json "@expo/config-plugins": "~7.2.2", Simple App import { getAuth } from "firebase/auth";
import React from "react";
import { Text } from "react-native";
import "react-native-gesture-handler";
import { SafeAreaView } from "react-native-safe-area-context";
import { firebaseApp } from "./app/setup/configs/firebaseConfig";
export default function AppDetails() {
console.log("AppDetails");
const auth = getAuth(firebaseApp);
console.log(auth);
return (
<SafeAreaView style={{ flex: 1, backgroundColor: "red" }}>
<Text>OK</Text>
</SafeAreaView>
);
} If I comment |
It seems that the reason is that the package firebase/auth is using an incompatible version of I tried to add an override and force the version
in my package.json, and it seems to work like a charm. I'll take a look to upgrade the default version, but in the meantime, this can work for you ! |
Thanks for finding the cause. Would it solve the problem if auth/package.json used a caret, so if instead of:
we had
|
Yes definitely :) Is there a reason why you are using this specific version ? :) |
Nope, it's just standard for us to pin all dependencies for better control but I think we should make an exception for this dependency since users should have more control over it. |
Ok ! I was looking at a way to send a pull request, do you want me to open it or you're on it ? |
I can do it, I'm just double checking a few things. The current version of |
Well, at least, the teams can control the final version of the package that is deployed in their project. On my side, I'll obviously need to force the 1.18.2 as expo consider (actually) that the 1.19.0 of @react-native-async-storage/async-storage is incompatible. But that's not a problem for the firebase package I think. But at least I'm not blocked with 2 versions of the package on our projects :) |
|
Operating System
Ubuntu 22.04
Browser Version
Firefox 114.0.2
Firebase SDK Version
10.0.0
Firebase SDK Product:
Auth
Describe your project's tooling
A expo app using firebase auth.
Describe the problem
This week I needed to upgrade my Expo SDK, so I also had to upgrade react-native library. Because of this upgrades I was taken to upgrade my firebase SDK.
The problem was reported by another person here: #7425 (comment) and is exactly that. When I call the function getAuth() or even initializeAuth() the app simply freeze and get stuck in the SplashScreen. Passing the parameters or not the problem continues. And it happens only with firebase auth module.
This occurred in Android 11 and 13, tested in emulator and physical device.
Versions:
Steps and code to reproduce issue
Only import and call getAuth() or initializeAuth() in firebase sdk 10.0.0.
The text was updated successfully, but these errors were encountered: