Skip to content
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

PUTs fail to S3 with Request Error: Header "x-amz-content-sha256" set to the hex-encoded SHA256 hash ... AWS Version 4 #11038

Closed
cyberduck opened this issue Apr 29, 2020 · 7 comments
Assignees
Labels
bug fixed s3 version:7.3.1
Milestone

Comments

@cyberduck
Copy link
Collaborator

@cyberduck cyberduck commented Apr 29, 2020

4e36ae0 created the issue

Something must be wrong with my macOS install? Writing a 100M file to Amazon S3 fails with:

Request Error: Header "x-amz-content-sha256" set to the hex-encoded SHA256 hash of the request payload is required for AWS Version 4 request signing, please set this on: PUT https://X.s3.amazonaws.com:443/test/duck_100M HTTP/1.1. Please contact your web hosting service provider for assistance.

I've reinstalled and confirmed Cyberduck 7.1.0 does not have this problem.

"defaults read ch.sudo.cyberduck" shows:
"s3.location" = "us-west-2";
"s3.signature.version" = AWS4HMACSHA256;


Attachments

@cyberduck
Copy link
Collaborator Author

@cyberduck cyberduck commented May 23, 2020

@dkocher commented

I cannot reproduce this error. Can you please provide some log output.

@cyberduck
Copy link
Collaborator Author

@cyberduck cyberduck commented May 26, 2020

4e36ae0 commented

Thank you for investigating. I attached logs though I don't see these menu items in my Cyberduck:
Action → Include Info Messages and Action → Include Debug Messages

Hopefully the logs are still useful, let me know if you want me to test anything else or gather more logs.

@cyberduck
Copy link
Collaborator Author

@cyberduck cyberduck commented Jun 5, 2020

@dkocher commented

Can you let me know if you can still reproduce with version 7.4.

@cyberduck
Copy link
Collaborator Author

@cyberduck cyberduck commented Jun 8, 2020

4e36ae0 commented

Same error with 7.4.0. Do you want another set of logs, were the previous logs helpful? If it's something in my config maybe you could tell me what to clear or I could attach the file?

@cyberduck
Copy link
Collaborator Author

@cyberduck cyberduck commented Jun 9, 2020

4e36ae0 commented

Aha a breakthrough! It appears to be specific to certain files. Download this file (100M of NULs) then try uploading to an Amazon S3 bucket.
https://jam.cloud.caringo.com/public/duck_100M
You should now see the V4 signature error related to "x-amz-content-sha256".

A colleague verified the same error with a 100MB random bytes file, so it seems more about the size than contents.

dd if=/dev/urandom of=Desktop/test-100M.out bs=1024k count=100

Hopefully you can see the bug now, let me know if you need anything. Thanks!

@cyberduck
Copy link
Collaborator Author

@cyberduck cyberduck commented Jun 10, 2020

@dkocher commented

I can reproduce the bug which should only affects files with exactly 104857600B in file length.

@cyberduck
Copy link
Collaborator Author

@cyberduck cyberduck commented Jun 11, 2020

@ylangisc commented

In 83789e7.

@iterate-ch iterate-ch locked as resolved and limited conversation to collaborators Nov 27, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug fixed s3 version:7.3.1
Projects
None yet
Development

No branches or pull requests

2 participants