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 Apr 2, 2026. It is now read-only.
Thanks for stopping by to let us know something could be better!
PLEASE READ: If you have a support contract with Google, please create an issue in the support console instead of filing on GitHub. This will ensure a timely response.
Environment details
Specify the API at the beginning of the title. For example, "BigQuery: ...").
General, Core, and Other are also allowed as types
OS type and version: any
Java version: Java 8 and later
storage_nio version(s): com.google.cloud:google-cloud-nio:0.122.0 and later
com.google.cloud.storage.StorageException: 412 Precondition Failed
PUT https://storage.googleapis.com/upload/storage/v1/b/nf-bucket/o?uploadType=resumable&name=foo.txt&ifGenerationMatch=0&upload_id=ADPycdtER9Udv5f3mdmhElr4rbAf-0U0L59G6pHmMw92d6SUtppicKL0slMnCdx8JhX1_2MPZo9MBUph1Q9NqQXuUjIUVoCeHQ
{
"error": {
"code": 412,
"message": "At least one of the pre-conditions you specified did not hold.",
"errors": [
{
"message": "At least one of the pre-conditions you specified did not hold.",
"domain": "global",
"reason": "conditionNotMet",
"locationType": "header",
"location": "If-Match"
}
]
}
}
at com.google.cloud.storage.spi.v1.HttpStorageRpc.translate(HttpStorageRpc.java:231)
at com.google.cloud.storage.spi.v1.HttpStorageRpc.writeWithResponse(HttpStorageRpc.java:822)
at com.google.cloud.storage.BlobWriteChannel$1.run(BlobWriteChannel.java:69)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
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:61)
at com.google.cloud.BaseWriteChannel.close(BaseWriteChannel.java:151)
at com.google.cloud.storage.contrib.nio.CloudStorageWriteChannel.close(CloudStorageWriteChannel.java:55)
at java.nio.file.Files.createFile(Files.java:632)
Thanks for stopping by to let us know something could be better!
PLEASE READ: If you have a support contract with Google, please create an issue in the support console instead of filing on GitHub. This will ensure a timely response.
Environment details
General, Core, and Other are also allowed as types
Steps to reproduce
foo.txtintomy-bucketbar.txtintomy-bucketfoo.txttobar.txtCode example
Stack trace
External references such as API reference guides
Any additional information below
This work as expected up to version
0.121.2