gcp-storage-emulator icon indicating copy to clipboard operation
gcp-storage-emulator copied to clipboard

Does it work with current SDK versions?

Open galvesribeiro opened this issue 1 year ago • 2 comments

Hello! Thanks for being the only one around who cared to make an emulator for GCP Storage!

So, I've tried to use it with Docker and run the simple hello world from Google in .Net, and I'm getting "NotImplemented" response with this in the container logs:

2023-06-03 23:02:26 Starting server at 0.0.0.0:9594
2023-06-03 23:02:26 [SERVER] All services started
2023-06-03 23:02:38 Method not implemented: POST - /b
2023-06-03 23:02:38 "POST /b?project=orleans-test HTTP/1.1" 501 -

This is happening with the call to create a bucket.

I'm setting the STORAGE_EMULATOR_HOST.

Also tried building the client explicitly with this:

var client = new StorageClientBuilder()
        {
            BaseUri = this.StorageEndpoint,
            UnauthenticatedAccess = true
        }.Build();

Same problem...

Any idea what may be wrong?

Thank you! I appreciate any help!

galvesribeiro avatar Jun 04 '23 02:06 galvesribeiro

I had the same issue, this can be resolved by providing the full enpoint (in your case with PORT=9594)

STORAGE_EMULATOR_HOST=http://localhost:9594/storage/v1

Works flawlessly on nodejs 20

MarcDanjou avatar Mar 07 '24 17:03 MarcDanjou

Issue gardening. @galvesribeiro Did it worked for you? Can the issue be closed?

pataquets avatar Mar 11 '24 12:03 pataquets