[GH-ISSUE #1166] unsupported protocol scheme "" #171

Closed
opened 2026-03-03 12:08:54 +03:00 by kerem · 1 comment
Owner

Originally created by @Geisha84 on GitHub (May 16, 2023).
Original GitHub issue: https://github.com/fsouza/fake-gcs-server/issues/1166

Hi,

When writing to the storage bucket faker from a Golang project using the package sftp I get the following error message in my Go project:

Post "/upload/storage/v1/b/cc-acquiring-local-clearing-files/o?uploadType=resumable&name=mastercard%2F2023%2F05%2F16%2FYTF.AR.TR54.B.E0000000.D230516.T090025.txt&upload_id=b198a18a6a9c869741e648b294569fa5": unsupported protocol scheme ""

The logs of the storage faker however show:
storage_bucket |time="2023-05-16T18:15:56Z" level=info msg="10.4.1.1 - - [16/May/2023:18:15:56 +0000] \"POST /upload/storage/v1/b/cc-acquiring-local-clearing-files/o?alt=json&ifGenerationMatch=0&name=logs.txt&prettyPrint=false&projection=full&uploadType=resumable HTTP/1.1\" 200 479"

We create an io.WriteCloser from a BucketHandle object using the "cloud.google.com/go/storage".

Running this from a Mac (M1) with the env STORAGE_EMULATOR_HOST set to http://localhost:4443 using version v1.45.1.

I downgraded to v1.44.2 which doesn't has this issue.

Originally created by @Geisha84 on GitHub (May 16, 2023). Original GitHub issue: https://github.com/fsouza/fake-gcs-server/issues/1166 Hi, When writing to the storage bucket faker from a Golang project using the package sftp I get the following error message in my Go project: `Post "/upload/storage/v1/b/cc-acquiring-local-clearing-files/o?uploadType=resumable&name=mastercard%2F2023%2F05%2F16%2FYTF.AR.TR54.B.E0000000.D230516.T090025.txt&upload_id=b198a18a6a9c869741e648b294569fa5": unsupported protocol scheme ""` The logs of the storage faker however show: `storage_bucket |time="2023-05-16T18:15:56Z" level=info msg="10.4.1.1 - - [16/May/2023:18:15:56 +0000] \"POST /upload/storage/v1/b/cc-acquiring-local-clearing-files/o?alt=json&ifGenerationMatch=0&name=logs.txt&prettyPrint=false&projection=full&uploadType=resumable HTTP/1.1\" 200 479"` We create an io.WriteCloser from a BucketHandle object using the `"cloud.google.com/go/storage"`. Running this from a Mac (M1) with the env `STORAGE_EMULATOR_HOST` set to `http://localhost:4443` using version v1.45.1. I downgraded to v1.44.2 which doesn't has this issue.
kerem 2026-03-03 12:08:54 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@bochenekmartin commented on GitHub (May 16, 2023):

Got the same issue in Java, both on Mac and Linux:

com.google.cloud.storage.StorageException: java.lang.IllegalArgumentException: java.net.MalformedURLException: no protocol: /upload/storage/v1/b/test-bucket-nnvvuz/o?uploadType=resumable&name=gcs-UKgsMN%2Ftopic-integrationtest-ikrtvr-2-0&upload_id=cdc521f66f2d5db9e2a252c08ae5c738

Downgrade to v1.44.2 fixed it.

<!-- gh-comment-id:1550290238 --> @bochenekmartin commented on GitHub (May 16, 2023): Got the same issue in Java, both on Mac and Linux: `com.google.cloud.storage.StorageException: java.lang.IllegalArgumentException: java.net.MalformedURLException: no protocol: /upload/storage/v1/b/test-bucket-nnvvuz/o?uploadType=resumable&name=gcs-UKgsMN%2Ftopic-integrationtest-ikrtvr-2-0&upload_id=cdc521f66f2d5db9e2a252c08ae5c738` Downgrade to v1.44.2 fixed it.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/fake-gcs-server#171
No description provided.