Firebaseui-web: `Firebase is not defined` js error

Created on 9 Nov 2016  路  4Comments  路  Source: firebase/firebaseui-web

Probably stupid mistake, but using the sample page and even though https://www.gstatic.com/firebasejs/ui/live/1.0/firebase-ui-auth.js loads FireFox says

15:04:07.673 ReferenceError: firebase is not defined <anonymous>firebase.html:18

I'm not using firebase serve though.

Most helpful comment

make sure the library is loaded before your js starts running,
I fixed this by putting the firebase configuration in a function that is called when the body is loaded.
Screen Shot 2020-03-28 at 12 27 55 PM
Screen Shot 2020-03-28 at 12 28 09 PM

All 4 comments

You need to load the firebase.js library too, and initialize it, usually done by copy pasting the Web Snippet from the Firebase Console into your HTML page.

See here in the <head> tags, you have to include the snippet. Please close the issue if this works for you.

Got it. as expected- so obvious that it hurts, thanks!

make sure the library is loaded before your js starts running,
I fixed this by putting the firebase configuration in a function that is called when the body is loaded.
Screen Shot 2020-03-28 at 12 27 55 PM
Screen Shot 2020-03-28 at 12 28 09 PM

thx man this helped me to make my project

Was this page helpful?
0 / 5 - 0 ratings