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 Mar 31, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Mar 31, 2026. It is now read-only.
Version 3.3.1 has broken blob.upload_from_file(file_obj) with error: Provided CRC32C xMvOLw== doesn't match calculated CRC32C ObqI+Q== #1541
Hi @dougEdwards , in version 3.3.1. support was added to include CRC32C checksum of an object. i.e. users can now provide crc32c checksum (calculated by them) while initializing the blob.
This checksum will be matched by the checksum calculated by server, if they don't match, server will send an error. Which is what is happening.
Sample to send checksum of the object while initializing
storage_client=storage.Client()
bucket=storage_client.bucket(bucket_name)
blob=bucket.blob(
destination_blob_name, crc32c_checksum="your_calculated_checksum"
)
# Optional: set a generation-match precondition to avoid potential race conditions# and data corruptions. The request to upload is aborted if the object's# generation number does not match your precondition. For a destination# object that does not yet exist, set the if_generation_match precondition to 0.# If the destination object already exists in your bucket, set instead a# generation-match precondition using its generation number.generation_match_precondition=0blob.upload_from_filename(
source_file_name, if_generation_match=generation_match_precondition
)
print(f"File {source_file_name} uploaded to {destination_blob_name}.")
Could you also provide us with a sample to replicated the behaviour you're observing ?
Activity
chandra-siri commentedon Sep 8, 2025
Hi @dougEdwards , in version 3.3.1. support was added to include CRC32C checksum of an object. i.e. users can now provide crc32c checksum (calculated by them) while initializing the blob.
This checksum will be matched by the checksum calculated by server, if they don't match, server will send an error. Which is what is happening.
Sample to send checksum of the object while initializing
Could you also provide us with a sample to replicated the behaviour you're observing ?
chrisaiello commentedon Sep 8, 2025
@chandra-siri
I'm encountering the same/similar issue via django-storages
The pattern that reproduces the error appears to be:
blob.reload()is called, which populates the crc32c checksum propertyHere's a reproducible example that succeeds in v3.3.0 but fails in v3.3.1
https://gist.github.com/chrisaiello/6c393cbbb96bb93db9e22ac24c1c391a
Details
jacobg commentedon Sep 16, 2025
Yep me too! Since updating from version 3.3.0 to 3.4.0, I'm also seeing lots of these errors in production:
jacobg commentedon Sep 16, 2025
@chandra-siri Do you have an update on a fix for the regression caused in version 3.3.1?
chandra-siri commentedon Sep 22, 2025
Hi all,
We'll soon be fixing this issue, you should see the fix rolled out in < 2 weeks.
Thanks @chrisaiello for providing with the repro script, & thanks @dougEdwards for reporting the bug.
fix: send entire object checksums via upload methods (#1561)
chandra-siri commentedon Oct 8, 2025
Hi @jacobg , @chrisaiello and @dougEdwards
This issue is now fixed. Please upgrade to the latest version v3.4.1