You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 25, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Sep 25, 2026. It is now read-only.
StorageException: Resumable upload is already complete. #666
java.lang.NullPointerException: null
at com.google.cloud.storage.spi.v1.HttpStorageRpc.getCurrentUploadOffset(HttpStorageRpc.java:783)
at com.google.cloud.storage.BlobWriteChannel$1.run(BlobWriteChannel.java:125)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at com.google.api.gax.retrying.DirectRetryingExecutor.submit(DirectRetryingExecutor.java:105)
at com.google.cloud.RetryHelper.run(RetryHelper.java:76)
at com.google.cloud.RetryHelper.runWithRetries(RetryHelper.java:50)
at com.google.cloud.storage.BlobWriteChannel.flushBuffer(BlobWriteChannel.java:70)
at com.google.cloud.BaseWriteChannel.close(BaseWriteChannel.java:151)
at com.google.cloud.storage.StorageImpl.createFrom(StorageImpl.java:265)
...snip...
This appeared in 1.113.4 but no longer appears in 1.113.6. Thanks for the fix.
Instead (in 1.113.6) we now sometimes see:
com.google.cloud.storage.StorageException: Resumable upload is already complete.
at com.google.cloud.storage.spi.v1.HttpStorageRpc.getCurrentUploadOffset(HttpStorageRpc.java:769)
at com.google.cloud.storage.BlobWriteChannel$1.run(BlobWriteChannel.java:125)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at com.google.api.gax.retrying.DirectRetryingExecutor.submit(DirectRetryingExecutor.java:105)
at com.google.cloud.RetryHelper.run(RetryHelper.java:76)
at com.google.cloud.RetryHelper.runWithRetries(RetryHelper.java:50)
at com.google.cloud.storage.BlobWriteChannel.flushBuffer(BlobWriteChannel.java:70)
at com.google.cloud.BaseWriteChannel.close(BaseWriteChannel.java:151)
at com.google.cloud.storage.StorageImpl.createFrom(StorageImpl.java:265)
...snip...
I don't have a self-contained reproducer; this seems quite intermittent. Generally we just call com.google.cloud.storage.Storage#createFrom(com.google.cloud.storage.BlobInfo, java.io.InputStream, int, com.google.cloud.storage.Storage.BlobWriteOption...) with content in the range of 100 bytes to a few MiB in length. I added retry logic to my own code, which repeats this call unmodified and without delay (with a fresh java.io.InputStream having the exact same content); this always seems to succeed on the second try. We always use BlobWriteOption#disableGzipContent and sometimes use BlobWriteOption#encryptionKey(java.security.Key). The only instances I have seen have all occurred while CSEK was in use, but that doesn't necessarily prove it doesn't also happen without CSEK.
I can try to write a reproducer but it would basically consist of uploading random objects using this API in a tight loop until (hopefully) encountering the same issue.
Following #647, we no longer sometimes see:
This appeared in 1.113.4 but no longer appears in 1.113.6. Thanks for the fix.
Instead (in 1.113.6) we now sometimes see:
What do you think? More tweaks to #604 required?
Thanks for your time.