Skip to content

TypeError: headers[headerName].trim is not a function #100

Description

@AdamGaskins

When I run this command:

npx s3p sync s3://<bucket1>/folder s3://<bucket2>/folder --acl --verbose

The items that already exist in the destination folder aren't touched (the ACL isn't copied over), but the items that don't exist, I'm getting this error:

error: Error:
  class: class TypeError
  stack:
    TypeError: headers[headerName].trim is not a function
        at getCanonicalHeaders (/home/forge/.npm/_npx/301b345c5affbb3b/node_modules/@smithy/signature-v4/dist-cjs/index.js:129:58)
        at _SignatureV4S3Express.signRequest (/home/forge/.npm/_npx/301b345c5affbb3b/node_modules/@smithy/signature-v4/dist-cjs/index.js:487:30)
        at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
        at async _AwsSdkSigV4Signer.sign (/home/forge/.npm/_npx/301b345c5affbb3b/node_modules/@aws-sdk/core/dist-cjs/submodules/httpAuthSchemes/index.js:108:27)
        at async /home/forge/.npm/_npx/301b345c5affbb3b/node_modules/@aws-sdk/middleware-sdk-s3/dist-cjs/index.js:483:15
        at async /home/forge/.npm/_npx/301b345c5affbb3b/node_modules/@smithy/middleware-retry/dist-cjs/index.js:320:38
        at async /home/forge/.npm/_npx/301b345c5affbb3b/node_modules/@aws-sdk/middleware-sdk-s3/dist-cjs/index.js:110:22
        at async /home/forge/.npm/_npx/301b345c5affbb3b/node_modules/@aws-sdk/middleware-sdk-s3/dist-cjs/index.js:138:14
        at async /home/forge/.npm/_npx/301b345c5affbb3b/node_modules/@aws-sdk/middleware-logger/dist-cjs/index.js:34:22

This error only happens when I have the --acl flag. Sorry, I'm not sure how to see any more information (like the list of headers, since it seems like one of which isn't a string but was expected to be).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions