Skip to content
This repository was archived by the owner on Nov 20, 2025. It is now read-only.
This repository was archived by the owner on Nov 20, 2025. It is now read-only.

Unsuccessful response status code. Request failed with status code 404 #1706

@matt-oakes

Description

@matt-oakes

I am using the google-auth-library to run v2 Firebase task functions as per the documentation. After I deployed today, I was getting this error everytime another function tried to queue a task:

Error: Unsuccessful response status code. Request failed with status code 404
    at Gaxios._request (/workspace/node_modules/gcp-metadata/node_modules/gaxios/build/src/gaxios.js:141:23)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async metadataAccessor (/workspace/node_modules/gcp-metadata/build/src/index.js:110:21)
    at async GoogleAuth._GoogleAuth_getUniverseFromMetadataServer (/workspace/node_modules/google-auth-library/build/src/auth/googleauth.js:777:26)
    at async GoogleAuth.getUniverseDomain (/workspace/node_modules/google-auth-library/build/src/auth/googleauth.js:186:168)
    at async GoogleAuth.getApplicationDefaultAsync (/workspace/node_modules/google-auth-library/build/src/auth/googleauth.js:252:42)
    at async GoogleAuth.getClient (/workspace/node_modules/google-auth-library/build/src/auth/googleauth.js:674:17)
    at async getFunctionUrl (/workspace/lib/helpers/taskQueue.js:37:20)
    at async enqueueTask (/workspace/lib/helpers/taskQueue.js:55:23)
    at async Promise.all (index 0)

The issue seems to have been introduced by #1692 (cc @danielbankhead).

It suddenly appeard for me because Firebase doesn't respect your lockfile when deploying. My package.json specified "google-auth-library": "^9.2.0" but I was getting the latest 9.4.0 when deploying. I can resolve this issue by instead fixing my dependency to "google-auth-library": "9.2.0". The error when goes away and I am able to queue tasks correctly.

Environment details

  • OS: macOS
  • Node.js version: 18.18.2
  • npm version: 9.8.1
  • google-auth-library version: 9.4.0

Metadata

Metadata

Labels

priority: p1Important issue which blocks shipping the next release. Will be fixed prior to next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions