-
Notifications
You must be signed in to change notification settings - Fork 595
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Storage: small file uploads are randomly returning md5 errors #2604
Comments
Can you try disabling resumable uploads?: - .pipe(targetFile.createWriteStream({ validation: 'md5' }))
+ .pipe(targetFile.createWriteStream({ validation: 'md5', resumable: false })) Related: |
With Forgot the stack trace (note that I modified the code to print the MD5 sums):
|
Ran with 250k files and still no repro. Seems like resumable uploads are the source of the issue. |
Reproduced with It seems like the second chunk of the file is not uploaded when I reproduce, as the actual MD5 is the same (the base file) and I add a counter to the end of each chunk: https://gist.github.com/gcochard/5dd10b16911a57f3bad2b71bbbab833e#file-poc-gcs-upload-bug-js-L38 Is there an issue with the resumable upload module that would cause this? Am I doing it wrong? |
Digging further into this, the |
Just to as some feedback regarding
After digging a lot, we finally ends on this issue and tried the same Here are our results:
|
Some uploads randomly return checksum errors. These can be mitigated using resumable: false (optionally validation: false) See - googleapis/google-cloud-node#2604 - firebase/functions-samples#140 Example error: ```$ ../../node_modules/@finn-no/cdn-uploader/index.js --credentials ${CDN_UPLOADER_CREDENTIALS} --project-id foo-storage --bucket-name foo-assets --app-prefix foo-web/_next build/next /foo/node_modules/@google-cloud/storage/src/file.js:1093 const error = new Error(message); ^ Error: The uploaded data did not match the data from the server. As a precaution, the file has been deleted. To be sure the content is the same, you should try uploading the file again. at /foo/node_modules/@google-cloud/storage/src/file.js:1093:23 at Object.handleResp (/foo/node_modules/@google-cloud/common/src/util.js:134:3) at /foo/node_modules/@google-cloud/common/src/util.js:496:12 at Request.onResponse [as _callback] (/foo/node_modules/retry-request/index.js:198:7) at Request.self.callback (/foo/node_modules/request/request.js:185:22)```
Some uploads randomly return checksum errors. These can be mitigated using resumable: false (optionally validation: false) See - googleapis/google-cloud-node#2604 - firebase/functions-samples#140 Example error: ```$ ../../node_modules/@finn-no/cdn-uploader/index.js --credentials ${CDN_UPLOADER_CREDENTIALS} --project-id foo-storage --bucket-name foo-assets --app-prefix foo-web/_next build/next /foo/node_modules/@google-cloud/storage/src/file.js:1093 const error = new Error(message); ^ Error: The uploaded data did not match the data from the server. As a precaution, the file has been deleted. To be sure the content is the same, you should try uploading the file again. at /foo/node_modules/@google-cloud/storage/src/file.js:1093:23 at Object.handleResp (/foo/node_modules/@google-cloud/common/src/util.js:134:3) at /foo/node_modules/@google-cloud/common/src/util.js:496:12 at Request.onResponse [as _callback] (/foo/node_modules/retry-request/index.js:198:7) at Request.self.callback (/foo/node_modules/request/request.js:185:22)```
Some uploads randomly return checksum errors. These can be mitigated using resumable: false (optionally validation: false) See - googleapis/google-cloud-node#2604 - firebase/functions-samples#140 Example error: ```$ ../../node_modules/@finn-no/cdn-uploader/index.js --credentials ${CDN_UPLOADER_CREDENTIALS} --project-id foo-storage --bucket-name foo-assets --app-prefix foo-web/_next build/next /foo/node_modules/@google-cloud/storage/src/file.js:1093 const error = new Error(message); ^ Error: The uploaded data did not match the data from the server. As a precaution, the file has been deleted. To be sure the content is the same, you should try uploading the file again. at /foo/node_modules/@google-cloud/storage/src/file.js:1093:23 at Object.handleResp (/foo/node_modules/@google-cloud/common/src/util.js:134:3) at /foo/node_modules/@google-cloud/common/src/util.js:496:12 at Request.onResponse [as _callback] (/foo/node_modules/retry-request/index.js:198:7) at Request.self.callback (/foo/node_modules/request/request.js:185:22)```
Some uploads randomly return checksum errors. These can be mitigated using resumable: false (optionally validation: false) See - googleapis/google-cloud-node#2604 - firebase/functions-samples#140 Example error: ```$ ../../node_modules/@finn-no/cdn-uploader/index.js --credentials ${CDN_UPLOADER_CREDENTIALS} --project-id foo-storage --bucket-name foo-assets --app-prefix foo-web/_next build/next /foo/node_modules/@google-cloud/storage/src/file.js:1093 const error = new Error(message); ^ Error: The uploaded data did not match the data from the server. As a precaution, the file has been deleted. To be sure the content is the same, you should try uploading the file again. at /foo/node_modules/@google-cloud/storage/src/file.js:1093:23 at Object.handleResp (/foo/node_modules/@google-cloud/common/src/util.js:134:3) at /foo/node_modules/@google-cloud/common/src/util.js:496:12 at Request.onResponse [as _callback] (/foo/node_modules/retry-request/index.js:198:7) at Request.self.callback (/foo/node_modules/request/request.js:185:22)```
Some uploads randomly return checksum errors. These can be mitigated using resumable: false (optionally validation: false) See - googleapis/google-cloud-node#2604 - firebase/functions-samples#140 Example error: ```$ ../../node_modules/@finn-no/cdn-uploader/index.js --credentials ${CDN_UPLOADER_CREDENTIALS} --project-id foo-storage --bucket-name foo-assets --app-prefix foo-web/_next build/next /foo/node_modules/@google-cloud/storage/src/file.js:1093 const error = new Error(message); ^ Error: The uploaded data did not match the data from the server. As a precaution, the file has been deleted. To be sure the content is the same, you should try uploading the file again. at /foo/node_modules/@google-cloud/storage/src/file.js:1093:23 at Object.handleResp (/foo/node_modules/@google-cloud/common/src/util.js:134:3) at /foo/node_modules/@google-cloud/common/src/util.js:496:12 at Request.onResponse [as _callback] (/foo/node_modules/retry-request/index.js:198:7) at Request.self.callback (/foo/node_modules/request/request.js:185:22)```
Some uploads randomly return checksum errors. These can be mitigated using resumable: false (optionally validation: false) See - googleapis/google-cloud-node#2604 - firebase/functions-samples#140 Example error: ```$ ../../node_modules/@finn-no/cdn-uploader/index.js --credentials ${CDN_UPLOADER_CREDENTIALS} --project-id foo-storage --bucket-name foo-assets --app-prefix foo-web/_next build/next /foo/node_modules/@google-cloud/storage/src/file.js:1093 const error = new Error(message); ^ Error: The uploaded data did not match the data from the server. As a precaution, the file has been deleted. To be sure the content is the same, you should try uploading the file again. at /foo/node_modules/@google-cloud/storage/src/file.js:1093:23 at Object.handleResp (/foo/node_modules/@google-cloud/common/src/util.js:134:3) at /foo/node_modules/@google-cloud/common/src/util.js:496:12 at Request.onResponse [as _callback] (/foo/node_modules/retry-request/index.js:198:7) at Request.self.callback (/foo/node_modules/request/request.js:185:22)```
Getting intermittent errors with codes
FILE_NO_UPLOAD_DELETE
andFILE_NO_UPLOAD
when I am uploading a large amount of files in parallel.Environment details
Steps to reproduce
This gist is a complete, self-contained example
https://gist.github.com/gcochard/5dd10b16911a57f3bad2b71bbbab833e
I have verified that the MD5sum of the file is correct before uploading, and that it is incorrect after uploading. It appears that the MD5sum returned is of the file minus the last 3 bytes. I will investigate further and see if this is consistent behavior.
The text was updated successfully, but these errors were encountered: