Skip to content

Storage emulator: file#copy failed with an error - Not Implemented #3751

Closed
@MarcusCemes

Description

@MarcusCemes

[REQUIRED] Environment info

firebase-tools: 9.18.0

Platform: Windows

[REQUIRED] Test case

exports.storageFinalise = functions().storage.object().onFinalize(async (object) => {
  await storage().bucket().file(object.name).move("some/other/path");
})

[REQUIRED] Steps to reproduce

  1. Create a cloud storage trigger that copies or moves the object to another location
  2. Setup the cloud storage and functions emulator environment
  3. Upload a file to the storage emulator and review the logs

[REQUIRED] Expected behavior

The object can be copied or moved to a different location in the same bucket.

[REQUIRED] Actual behavior

The triggered function encounters an error, it receives an HTTP Not Implemented response from the storage emulator.

function[europe-west3-storageFinalise]
Error: file#copy failed with an error - Not Implemented
    at new ApiError (C:\Users\Marcus\[...]\functions\node_modules\.pnpm\@[email protected]\node_modules\@google-cloud\common\build\src\util.js:73:15)
    at Util.parseHttpRespMessage (C:\Users\Marcus\[...]\functions\node_modules\.pnpm\@[email protected]\node_modules\@google-cloud\common\build\src\util.js:175:41)
    at Util.handleResp (C:\Users\Marcus\[...]\functions\node_modules\.pnpm\@[email protected]\node_modules\@google-cloud\common\build\src\util.js:149:76)
    at C:\Users\Marcus\[...]\functions\node_modules\.pnpm\@[email protected]\node_modules\@google-cloud\common\build\src\util.js:477:22
    at onResponse (C:\Users\Marcus\[...]\functions\node_modules\.pnpm\[email protected]\node_modules\retry-request\index.js:228:7)
    at C:\Users\Marcus\[...]\functions\node_modules\.pnpm\[email protected]\node_modules\teeny-request\build\src\index.js:226:13
    at processTicksAndRejections (internal/process/task_queues.js:95:5)

The cloud storage emulator is very new, is copying files supported from the admin SDK or is it a very basic implementation for serving files to the client?

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions