Skip to content
This repository was archived by the owner on Mar 3, 2026. It is now read-only.
This repository was archived by the owner on Mar 3, 2026. It is now read-only.

Version 6.5.3 breaks emulator usage #2086

@flovouin

Description

@flovouin

Environment details

  • OS: macOS
  • Node.js version: 16
  • npm version: 8
  • @google-cloud/storage version: 6.5.3

Steps to reproduce

Run the following code against the Firebase Storage emulator:

process.env.STORAGE_EMULATOR_HOST = "http://localhost:9199";

const { Storage } = require("@google-cloud/storage");

const s = new Storage();

s.bucket("demo-test.appspot.com")
  .file("test")
  .delete()
  .then(() => console.log("Done"))
  .catch((error) => console.error(error.stack));

With version 6.5.2 you'll get a "no such object" error (which is normal):

Error: No such object: demo-test.appspot.com/test
    at new ApiError (/workspace/node_modules/@google-cloud/storage/build/src/nodejs-common/util.js:79:15)
    at Util.parseHttpRespBody (/workspace/node_modules/@google-cloud/storage/build/src/nodejs-common/util.js:214:38)
    at Util.handleResp (/workspace/node_modules/@google-cloud/storage/build/src/nodejs-common/util.js:155:117)
    at /workspace/node_modules/@google-cloud/storage/build/src/nodejs-common/util.js:536:22
    at onResponse (/workspace/node_modules/retry-request/index.js:240:7)
    at /workspace/node_modules/teeny-request/build/src/index.js:217:17
    at processTicksAndRejections (node:internal/process/task_queues:96:5)

With version 6.5.3 you'll get a "not implemented" error:

Error: Not Implemented
    at new ApiError (/workspace/node_modules/@google-cloud/storage/build/src/nodejs-common/util.js:79:15)
    at Util.parseHttpRespMessage (/workspace/node_modules/@google-cloud/storage/build/src/nodejs-common/util.js:181:41)
    at Util.handleResp (/workspace/node_modules/@google-cloud/storage/build/src/nodejs-common/util.js:155:76)
    at /workspace/node_modules/@google-cloud/storage/build/src/nodejs-common/util.js:536:22
    at onResponse (/workspace/node_modules/retry-request/index.js:240:7)
    at /workspace/node_modules/teeny-request/build/src/index.js:226:13
    at processTicksAndRejections (node:internal/process/task_queues:96:5)

This is a minimal reproducible example, however I encountered this bug while using the Storage client through the firebase-admin/storage package. Everything else equal (firebase-admin version included), my tests pass with version 6.5.2 of the client, and fail with "Not Implemented" errors when using 6.5.3.
If the new behaviour / URLs are indeed the expected ones, then this could also be a bug in the Firebase Storage emulator.

Probably related:

Metadata

Metadata

Labels

api: storageIssues related to the googleapis/nodejs-storage API.priority: p2Moderately-important priority. Fix may not be included in 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