mirror of
https://github.com/fsouza/fake-gcs-server.git
synced 2026-04-25 21:55:56 +03:00
[GH-ISSUE #1714] Golang: Can't get object by name error in example code #212
Labels
No labels
bug
compatibility-issue
docker
documentation
enhancement
help wanted
needs information
pull-request
question
stale
unfortunate
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/fake-gcs-server#212
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @sondrehd on GitHub (Aug 12, 2024).
Original GitHub issue: https://github.com/fsouza/fake-gcs-server/issues/1714
Using the official google storage sdk version 1.43.0 I get the error code "object doesn't exists" when trying to fetch an object that is in fact there.
I preloaded data and have tried and have also tried to write the file first. It shows up if i iterate over all objects in the bucket, but if i try to create a NewReader it will yield "object doesn't exist".
To start the emulator i run:
docker run -d --name fake-gcs-server -p 4443:4443 -v ${PWD}/examples/data:/data fsouza/fake-gcs-server -scheme httpThen i run the example code
go run ./examples/go/main.goIt outputs :
I am able to get the file with curl:
curl --insecure "http://localhost:4443/storage/v1/b/sample-bucket/o/some_file.txt?alt=media"Perhaps something has changed in the client library?
@snorrealv commented on GitHub (Feb 25, 2025):
Hey, did you find a solution to this issue?