I am using GCS Transfer Service to move objects from S3 into GCS, I then have a ruby script on GAE that downloads the new GCS object and operates on it. The script fails to download because the MD5 and CRC32C hash verification fails. The verification (part of the google-cloud-storage gem) works by comparing the object.md5 and object.crc32c hashes to the file's calculated hashes, but these are mismatched.
I downloaded the file from AWS and calculated the md5 and crc32c hashes and I got the same value that the file attributes on GCS has: object.md5 and object.crc32c, however when I download directly from GCS and calculate the hashes, I get different md5 and crc32c hashes.
To replicate this:
gsutil ls -L gs://bucket/path/to/file
The error that I originally got was:
/usr/local/bundle/gems/google-cloud-storage-0.23.2/lib/google/cloud/storage/file/verifier.rb:34:in `verify_md5!': The downloaded file failed MD5 verification. (Google::Cloud::Storage::FileVerificationError)
from /usr/local/bundle/gems/google-cloud-storage-0.23.2/lib/google/cloud/storage/file.rb:809:in `verify_file!'
from /usr/local/bundle/gems/google-cloud-storage-0.23.2/lib/google/cloud/storage/file.rb:407:in `download'
from sample.rb:9:in `'