Open lotas opened 2 weeks ago
Oh, I just found out that it is not reproducible on a standalone script, which means something inside the test suite is breaking S3Client.
I'll keep updating my findings though here.
Found out that context
is getting "poisoned" in https://github.com/smithy-lang/smithy-typescript/blob/main/packages/middleware-serde/src/serializerMiddleware.ts#L28 where context.endpointV2.url
already contains pathname from the previous request, so url builder thinks that basepath is not /
This issue has not received a response in 1 week. If you still think there is a problem, please leave a comment to avoid the issue from automatically closing.
Checkboxes for prior research
Describe the bug
We noticed our tests started to fail with this dependabot upgrade: https://github.com/taskcluster/taskcluster/pull/7365#issuecomment-2456871515 (please note that this PR contains multiple packages, it was tested separately and confirmed with just
@aws-sdk/client-s3@3.649.0
to be broken for us)Tests were failing with
SignatureDoesNotMatch: The request signature we calculated does not match the signature you provided. Check your key and signing method.
Upon further investigation it was determined that breaking change was introduced around https://github.com/aws/aws-sdk-js-v3/compare/v3.645.0...v3.649.0 (with 3.645.0 being the last version working, and 3.649.0 first one being broken)
After adding debug middleware I've discovered that request objects might be sharing some properties from the previous request, namely
path
. I suspect this might be a reason, but I'm not too sure.Regression Issue
SDK version number
@aws-sdk/client-s3@3.649.0
Which JavaScript Runtime is this issue in?
Node.js
Details of the browser/Node.js/ReactNative version
v22.11.0, v20.16.0
Reproduction Steps
Code:
Running this sequence on 3.645.0 works and produces different output.
Here is how the output of the 3.649.0 looks like:
Second one contains
path
which belongs to the previous command that was sent.With
3.645.0
this request looked like:Observed Behavior
List command fails:
Expected Behavior
ListCommand is being sent with the correct signature
Possible Solution
No response
Additional Information/Context
No response