Firebaseui-web: Error: Could not find the firebaseUI widget element on the page

Created on 27 Aug 2018  路  2Comments  路  Source: firebase/firebaseui-web

Hi,

I just use FirebaseUI in my react app, I run dev-server to test the app on localhost. The sign-in buttons (email, Google, Facebook, and etc.) on the sign-in page show up as normal for every first time that I run dev-server, but if I refresh the page (without signing in) or I sign in and sign out, all sign-in buttons is gone (returning to the sign-in page but there is no sign-in buttons). In the console, error pop up showing

Error: Could not find the FirebaseUI widget element on the page

I have to shut down and rerun the dev-server to make the app works again.
Is there any suggestion for this issue?

Most helpful comment

It is what the error message says. The DOM element where the UI instance is being rendered is no longer available for some reason:

ui.start('#firebaseui-auth-container', uiConfig);

In this case, the DOM element with ID firebaseui-auth-container is not available.

All 2 comments

It is what the error message says. The DOM element where the UI instance is being rendered is no longer available for some reason:

ui.start('#firebaseui-auth-container', uiConfig);

In this case, the DOM element with ID firebaseui-auth-container is not available.

@autsada for react apps, feel free to use our React Wrapper: https://github.com/firebase/firebaseui-web-react this should take care of most of these issues for you.

Was this page helpful?
0 / 5 - 0 ratings