mirror of
https://github.com/fsouza/fake-gcs-server.git
synced 2026-04-25 13:45:52 +03:00
[GH-ISSUE #346] Resumable upload fails with 400 using nodejs client. #68
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#68
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 @jeantil on GitHub (Oct 19, 2020).
Original GitHub issue: https://github.com/fsouza/fake-gcs-server/issues/346
While working on #345 I was unable to make the default
file.save(...)call work and was forced to add{ resumable: false }to make it pass.The error was:
Running the script in a debugger yields an HTTP 400 error on the following request
result in
@gnarea commented on GitHub (Jan 25, 2021):
I ran into this issue, but instead of getting a
400, thefile.save(...)just hung. I fixed it by passingresumable: false.@gnarea commented on GitHub (Jul 9, 2021):
@fsouza, #497 didn't fix this issue. It just made it different. Consider this:
file.save()now fails with a more cryptic error:Server logs:
Adding
resumable: falsefixes the issue.@fsouza commented on GitHub (Jul 9, 2021):
Hm I wonder where it's trying to connect to. I'll investigate later, thanks for sharing a reproducer.
@stoffeastrom commented on GitHub (Dec 14, 2021):
FYI
I just got hit by this as well. Doing:
e.g changing
s.URL()->s.PublicURL()ensures getting the correct url. However after this I get aError: Retry limit exceededwhich I haven't investigated yet.@stoffeastrom commented on GitHub (Dec 14, 2021):
Just found the
ExternalURLoptions.. so no need for above change :D@sergseven commented on GitHub (Jan 4, 2022):
Setting ExternalURL is a clue to have fake-gcs-server working for Testcontainer!
Just in case someone is looking for a solution for Testcontainers & Spring & JUnit 5:
the difficulty with Testcontainers is that a random mapped port(external port) is available after the generic container is spinned up and running, so we can't know it before. So the trick is to get random port before the container is started(
FixedHostPortGenericContainerused).@sergseven commented on GitHub (Jan 25, 2022):
As a follow up, it doesn't work on CI environments where docker containers run on a remote VM, so "container IP" is different than localhost(0.0.0.0) and is only known after container is eventually started.
A workaround for this case is to update external-url of a started fake-gcs-server container, that is proposed in #659.
@fsouza would be nice if you look into #659