-
Notifications
You must be signed in to change notification settings - Fork 252
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
Error: Uncaught (in promise) Error: AuthUI instance is deleted! #59
Comments
I just checked my web app without the '/connect' page, and it works fine, with no slowdown. I'm pretty sure the problem has to do with I also got this error when using the example with state:
|
@nicolasgarnier is there any possibility you could look into this? I'm stuck in the middle of a project because I can't get auth set up :) |
👍
|
Exactly the same bahaviour as nebrelbug (OP). I still cannnot figure out what is wrong. |
I'm getting a similar issue -- if you have more than one instance of the component, something (the component?) deletes the inner children DOM nodes of the other instances. Of note, the component uses the |
@estill01 @daviddudas99 were you able to find any solutions? |
@nebrelbug no I don't have a final solution. I have workaround for my web app. First login works just fine. Login, logout and than login again is the issue. So after each log out I reload whole page. Not elegant but it works fine. |
I was able to get around this by moving my uiConfig to the top App component, and dispatching it to state.
Then I set a conditional on the StyledFirebaseAuth component to render if there is a config.
Not sure if helpful, but worked for me. Initially had the uiConfig directly in the SignInContainerA component and was getting the same error. |
+1 |
Same here. I had this error when there was more than one instance of the component rendered on the screen. The error went away as I removed the duplicate component. |
Hm, maybe we can solve this by using a ref instead of a static |
@jhuleatt Any progress on this? I am having this issue in version 5.0.2 |
Having this issue too |
Hi, I solved the issue by adding something like :
|
I too was having this problem. I removed the <React.StrictMode> from index.js and the issue was resolved. |
Removing StrictMode was the only thing that has worked for me... would rather not have to do that though. |
I removed the <React.StrictMode> from index.js and the issue was resolved. |
Any other solution other than removing StrictMode? |
I think there is specifically an issue with it in React 18. I have gotten AuthUI to work on React 17 with no issues; but once the project is upgraded to react 18 this error occurs if strict mode is enabled. The react team did mention that 18 could cause some apps to break given strict mode got more strict this patch. |
looks like we might have a fix here |
I suggest that the id of the auth ui be generated with useId or any other random thing, that will allow multiple UIs in a single page. |
don't know if this will cause any other issues but this works for me meanwhile:
|
This problem is still very much present. |
thank, thanks actually works for me. |
Still issue for me, removing strict mode fixed it as a workaround for now "next": "12.3.1",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-firebaseui": "^6.0.0", |
With Nextjs and
/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: false, // changed from true to false
swcMinify: true,
}
module.exports = nextConfig |
The problem still persists, only removing strict mode works. |
suffering this one too |
For anyone coming in late 2023, an easy workaround is shown in this firebase issue. Basically, create your own StyledFirebaseAuth component (from source in the linked issue) and get rid of react-firebaseui. The firebaseui package is required instead. |
I'm using React-Router, with code like this:
And here's my App.js
I won't explain all of the code, since it's irrelevant. The problem is that the 'Sign In with Google' button only shows up the first time I go to the '/connect' page. If I navigate again and go back, the Auth UI is gone, and when I look in the console I see: "Error: Uncaught (in promise) Error: AuthUI instance is deleted!"
My app also gets slower the more I navigate to and away from the 'connect' page, which makes me think that there might be a memory leak involved.
I have the same problem with the example on the front page using state.
I'd appreciate any help. Thanks!
The text was updated successfully, but these errors were encountered: