Cannot find list of Firebase projects
Following the book Firebase Web App with ESP (v 1.2), I successfully created a Realtime Database in Firebase and, after programing the ESP with the help of Visual Studio Code/PlatformIO, I can see, under the Realtime Database / Data on https://console.firebase.google.com/project/…. , the changing values of the BME280 sensor.
I am however stuck at the Initializing Web App Firebase Project, page 125, paragraph 5 of the book: the list of the Firebase projects is not found. I must say that on the firebase login (page 121, section 2 of the book) I had the “Already logged in as user@gmail.com” message.
It looks like an authentication problem but I know not enough to solve this. How should I proceed?
Log extract:
Start your code here[info]
=== Project Setup
[info]
[info] First, let's associate this project directory with a Firebase project.
[info] You can create multiple project aliases by running firebase use --add,
[info] but for now we'll just set up a default project.
[info]
[debug] [2022-09-23T10:03:44.328Z] > refreshing access token with scopes: []
[debug] [2022-09-23T10:03:44.330Z] >>> [apiv2][query] POST https://www.googleapis.com/oauth2/v3/token [none]
[debug] [2022-09-23T10:03:44.331Z] >>> [apiv2][body] POST https://www.googleapis.com/oauth2/v3/token [omitted]
[debug] [2022-09-23T10:03:44.608Z] <<< [apiv2][status] POST https://www.googleapis.com/oauth2/v3/token 400
[debug] [2022-09-23T10:03:44.609Z] <<< [apiv2][body] POST https://www.googleapis.com/oauth2/v3/token [omitted]
[debug] [2022-09-23T10:03:44.609Z] >>> [apiv2][query] GET https://firebase.googleapis.com/v1beta1/projects pageSize=100
[debug] [2022-09-23T10:03:44.868Z] <<< [apiv2][status] GET https://firebase.googleapis.com/v1beta1/projects 401
[debug] [2022-09-23T10:03:44.869Z] <<< [apiv2][body] GET https://firebase.googleapis.com/v1beta1/projects [omitted]
[debug] [2022-09-23T10:03:44.869Z] HTTP Error: 401, Request had invalid authentication credentials. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project.
[debug] [2022-09-23T10:03:44.871Z] FirebaseError: HTTP Error: 401, Request had invalid authentication credentials. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project.
at responseToError (C:\Users\Sailabout\AppData\Roaming\npm\node_modules\firebase-tools\lib\responseToError.js:49:12)
at RetryOperation._fn (C:\Users\Sailabout\AppData\Roaming\npm\node_modules\firebase-tools\lib\apiv2.js:288:77)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
[error]
[error] Error: Failed to list Firebase projects. See firebase-debug.log for more info.
Hi.
I’m not sure what’s the issue.
But I found this discussion, and the problem seems the same as yours.
Here’s the suggestion to fix the issue: https://stackoverflow.com/a/57941356
Let me know if this solves the issue.
Regards,
Sara
Hi Sara
Thank you. This helped me. I previously tried a logout on https://console.firebase.google.com/project/ with no avail. Doing it on the terminal was the solution.
Regards
Paul