-
Notifications
You must be signed in to change notification settings - Fork 646
Closed
Labels
bugThis issue is a bug.This issue is a bug.closed-for-stalenessp2This is a standard priority issueThis is a standard priority issueresponse-requestedWaiting on additional info and feedback. Will move to \"closing-soon\" in 7 days.Waiting on additional info and feedback. Will move to \"closing-soon\" in 7 days.
Description
Checkboxes for prior research
- I've gone through Developer Guide and API reference
- I've checked AWS Forums and StackOverflow.
- I've searched for previous similar issues and didn't find any solution.
Describe the bug
We're getting errors from AWS SDK when using:
import { Upload } from '@aws-sdk/lib-storage';We create an instance of S3 client via:
const s3Client = new S3({ apiVersion: '2016-04-01' });then the code (where params is of type PutObjectCommandInput):
const upload = new Upload({
client: s3Client,
params,
});
await upload.done();These are most likely race conditions in the SDK as we're getting weird errors at times when we perform many simultaneous uploads to S3.
Errors we have observed:
"name":"400","message":"UnknownError""name":"XAmzContentSHA256Mismatch","message":"The provided 'x-amz-content-sha256' header does not match what was computed.""name":"Error","message":"char 'H' is not expected.:1:1\n Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object."
SDK version number
"@aws-sdk/client-s3": "3.565.0", "@aws-sdk/lib-storage": "3.565.0"
Which JavaScript Runtime is this issue in?
Node.js
Details of the browser/Node.js/ReactNative version
20.12.2
Reproduction Steps
We upgraded our node js from 14 to 20 and these errors started appearing.
Observed Behavior
Errors we have observed, which seem to be race conditions:
"name":"400","message":"UnknownError""name":"XAmzContentSHA256Mismatch","message":"The provided 'x-amz-content-sha256' header does not match what was computed.""name":"Error","message":"char 'H' is not expected.:1:1\n Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object."
Expected Behavior
No errors happening.
Possible Solution
No response
Additional Information/Context
This issue started to appear when we upgraded Node.js from version 14 to 20.
It appears someone else reported this but was ignored, see #5455
jkburges, fenos, the-dream-machine and m-kemarskyi
Metadata
Metadata
Assignees
Labels
bugThis issue is a bug.This issue is a bug.closed-for-stalenessp2This is a standard priority issueThis is a standard priority issueresponse-requestedWaiting on additional info and feedback. Will move to \"closing-soon\" in 7 days.Waiting on additional info and feedback. Will move to \"closing-soon\" in 7 days.