-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
Thumbnails example -Error: The uploaded data did not match the data from the server. #140
Comments
It looks like sometimes validation of the uploaded image fails. It may be failing for good reasons but, if you want you can disable validation by passing return bucket.upload(tempFilePath, {
destination: thumbFilePath,
validation: false
}); The alternative is to catch the error and retry the upload. Maybe with something like this: // Try one upload with validation and if it fails another one without validation.
return bucket.upload(tempFilePath, {
destination: thumbFilePath
}).catch(e => {
return bucket.upload(tempFilePath, {
destination: thumbFilePath,
validation: false
}); And of course you could do something more sophisticated with multiple retry and exponential backoff etc... :) If some of you could try this in some cases where these errors usually happen and repport that would be great :) |
I'm getting this problem too and it seems a very erratic behavior. Where is the appropriate place to report this bug? |
I'm also seeing this and it's very frustrating! Whenever I update an image I get this issue ... |
does using Looking at this issue: googleapis/google-cloud-node#2604 it seems that disabling resumable upload could help too. Can you try passing Re: the correct place to report this bug would be on https://github.com/googleapis/google-cloud-node/. If resumable uploads are the issue you could add onto googleapis/google-cloud-node#2604 |
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)```
Hello,
I use Thumbnails example, and sometimes (little) I'm getting this error when uploading files from Storage :
Here is some code snippet, for the deletion part :
index.js
thumbnail
The text was updated successfully, but these errors were encountered: