Skip to content

aalej/firebase-admin-2843

Repository files navigation

Repro for issue 2843

Versions

firebase-tools: v13.30.0
firebase-admin: v13.1.0
node: v22.13.1
platform: macOS Sonoma 14.7.2

Steps to reproduce

  1. Install dependencies
    • Run cd admin-app
    • Run npm i
    • Run cd ../
  2. Run firebase emulators:start --project demo-project
  3. Open a new terminal
    • Run cd admin-app
    • Run node dataconnect.js
    • Errors with:
FirebaseAppError: Credential implementation provided to initializeApp() via the "credential" property failed to fetch a valid Google OAuth2 access token with the following error: "Could not load the default credentials. Browse to https://cloud.google.com/docs/authentication/getting-started for more information.".
    at <PATH>/issue-reports/admin-app/node_modules/firebase-admin/lib/app/firebase-app.js:87:19
    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
    at async <PATH>/issue-reports/admin-app/node_modules/firebase-admin/lib/data-connect/data-connect-api-client-internal.js:91:26
    at async main (file://<PATH>/issue-reports/admin-app/dataconnect.js:20:25) {
  errorInfo: {
    code: 'app/invalid-credential',
    message: 'Credential implementation provided to initializeApp() via the "credential" property failed to fetch a valid Google OAuth2 access token with the following error: "Could not load the default credentials. Browse to https://cloud.google.com/docs/authentication/getting-started for more information.".'
  },
  codePrefix: 'app'
}

Expected behavior

Running node dataconnect.js should output:

{"data":{"movies":[]}}

Notes

Firestore and Auth does not require credentials when connecting to the emulator

  1. Run firebase emulators:start --project demo-project
  2. Run cd admin-app
  3. (AUTH) Run node auth.js
  4. (FIRESTORE) Run node firestore.js

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published