• Skip to main content
  • Skip to primary sidebar

RNTLab.com

The Ultimate Shortcut to Learn Electronics and Programming with Open Source Hardware and Software

  • Courses
  • Forum
    • Forum
    • Ask Question
  • Shop
  • Account
  • Blog
  • Login

Console errors trying to open “Firebase” web app.

Q&A Forum › Category: ESP32 › Console errors trying to open “Firebase” web app.
0 Vote Up Vote Down
William Lucid asked 3 years ago

Have not been able to resolve these two “Google Chrome”, console errors:

index.html:29 Uncaught ReferenceError: initializeApp is not defined
at index.html:29
auth.js:2 Uncaught ReferenceError: auth is not defined
at auth.js:2

Link to index.html and auth.js

ESP32/ESP8266: Firebase Web App to Display Sensor Readings (with Authentication)” is the tutorial I followed.

William

Question Tags: Firebase, Web app
5 Answers
0 Vote Up Vote Down
Sara Santos Staff answered 3 years ago

In.

In which step of the tutorial do you get the errors?

Did you create all the files and folders mentioned in the tutorial?

Regards,
Sara

0 Vote Up Vote Down
William Lucid answered 3 years ago

Hi Sara,

Previous errors are resolved; no longer displayed in “Chrome” console.  I had to change the version number for “Firebase” on all “script src” links.  Running “Firebase –version” gives the version numbers.

Project folder I created is on the desktop, “Firebase-project.”  Inside folder “public” are files: “index.html,” “404.html” and more…  Inside of “public” another folder “scripts” are “auth.js” and “index.js.”  I am getting “page not found.”

Path when I execute “Firebase init” is “C:\Users\username\Desktop\Firebase-project.”  When prompted for a folder I use the “public” default.  Once “Firebase deploy” is executed; result link produced is “page not found.”

Best Regards,
William

0 Vote Up Vote Down
Sara Santos Staff answered 3 years ago

Hi William.
 
So, now you are getting the “page not found” error, is that correct?
How did you set up the Firebase project? Did you follow the instructions on the tutorial to create the Firebase default files using the commands on the Terminal window?
 
Regards,
Sara

0 Vote Up Vote Down
William Lucid answered 3 years ago

Good Morning Sara,

 

Commands were entered in VScode; using VS code terminal.

Down to two errors.

auth.js:2 Uncaught ReferenceError: auth is not defined
at auth.js:2
weather-f819c.web.app/:1 Uncaught TypeError: Failed to resolve module specifier “firebase/app”. Relative references must start with either “/”, “./”, or “../”.

Files and file structure:

Directory of C:\Users\1234\Weather
12/18/2021 08:43 AM <DIR> .
12/18/2021 07:05 AM <DIR> ..
12/18/2021 01:18 AM <DIR>  .firebase
12/18/2021 08:28 AM 146      .firebaserc
12/18/2021 12:39 AM 1,166   .gitignore
12/18/2021 01:07 AM <DIR> . vscode
12/16/2021 07:24 PM 212     database.rules.json
12/18/2021 08:28 AM 190     firebase.json

12/18/2021 08:43 AM <DIR> public
Directory of C:\Users\1234\Weather\public
12/18/2021 08:43 AM <DIR> .
12/18/2021 08:43 AM <DIR> ..
12/18/2021 06:51 AM 1,808   404.html
12/18/2021 08:26 AM 17,540 favicon.ico
12/18/2021 08:27 AM 3,927   index.html
12/18/2021 06:51 AM 1,252   style.css

Caught missing scripts folder;  folder pah:  “C:\users\1234\desktop\weather\public\scripts”.

 

Regards,
William

0 Vote Up Vote Down
Sara Santos Staff answered 3 years ago

Hi.
It is very difficult to troubleshoot things like this.
Please send me an email with some screenshots.
I think you have my email.
Regards,
Sara

Primary Sidebar

Login to Ask or Answer Questions

This Forum is private and it’s only available for members enrolled in our Courses.

Login »

Latest Course Updates

  • [eBook Updated] Learn Raspberry Pi Pico/Pico W with MicroPython eBook – Version 1.2 May 26, 2025
  • [New Edition] Build ESP32-CAM Projects eBook – 2nd Edition April 16, 2025

You must be logged in to view this content.

Contact Support - Refunds - Privacy - Terms - MakerAdvisor.com - Member Login

Copyright © 2013-2025 · RandomNerdTutorials.com · All Rights Reserved

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.