-
Notifications
You must be signed in to change notification settings - Fork 209
Object part missing hash - DigitalOcean Spaces #85
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
Comments
The file storage code is more battle tested with S3 than with other providers. @Spioune worked on R2 support and might be able to help you out if they have time. #53 If you want to take a stab at it yourself, you can get the full stack trace via the instructions in the error message
Then work from there to understand the missing hash issue and submit a fix if necessary. Ideally if it's claiming to be s3 compatible, then it should just work, but it seems like maybe there's some additional requirements. |
that would be great! ran the server with the log and backtrace but didn't get much information:
|
ah yeah - I remember that the prebuilt docker image is built in release mode with debug symbols stripped (to save space) I just found the spot from searching convex-backend/crates/aws_s3/src/types.rs Line 64 in c8b0780
You can also build from source https://github.com/get-convex/convex-backend/blob/main/BUILD.md - and then the backtrace will work fully. You (or whoever picks this up) will have to build from source anyway to try to do a fix. |
It seems like Digital Ocean doesn't return crc32 field in the response to the UploadPart call like S3 does. So it seems like Digital Ocean is slightly overpromising on its claim of being S3 compatible. A path forward might be to set up some logic to tolerate missing crc32 if you set an env var (eg S3_STORAGE_SKIP_CHECKSUMMING) or something like that. I wouldn't be willing to have it on by default, because we care about checksumming in general, but it might be what you need to work with digital ocean's storage. |
Yeah I'm also not a big fan of skipping checksum, but I'd be willing to fiddle with the source to see if I can get something that's acceptable running and submit a PR for review if we get somewhere that's acceptable. Is there any documentation to have a docker image built directly with docker? I have tried building both latest release and main branch using the self hosted backend dockerfile script but they don't seem to run successfully after build - so I might be missing something. |
We've typically gone with building from source on the host machine. That's what I'd recommend and usually do personally. If ya really want to build it inside a docker container, you can use this |
May also be worth scouring digital ocean's API docs - perhaps there's a way to get it to do checksumming that is slightly different. Whatever you come up with - I'll take a look. |
we did just update the AWS SDK versions very recently (not yet in the prebuilt docker image, but will appear if you build from source) So it may be worth testing with that to see if there are any differences. |
You could also consider in parallel - filing an issue with digital ocean spaces. See if they're willing to fix on their end. |
I have been trying to set up convex to use DigitalOcean Spaces to work with convex, but I'm facing some issues.
https://docs.digitalocean.com/products/spaces/reference/s3-compatibility/
It seems it gets a header error but based on the docs, DigitalOcean does generate the required headers.
Env variables that I used (with redactions):
The error that I receive in convex is:
2025-05-04T16:38:47.420031Z ERROR common::errors: Caught error (RUST_BACKTRACE=1 RUST_LOG=info,common::errors=debug for full trace): Object part missing hash! Expected crc32
Noting that this is a self-hosted instance of convex - any help is much appreciated! I would prefer to use DigitalOcean and not Amazon S3. I just tested the s3 integration and after having to regenerate the access token twice, it finally worked.
The text was updated successfully, but these errors were encountered: