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

Error deploying bonsol manifest.json with Cloudflare R2: Binary mismatch issue #108

Closed
kidneyweakx opened this issue Dec 14, 2024 · 4 comments · Fixed by #110
Closed

Error deploying bonsol manifest.json with Cloudflare R2: Binary mismatch issue #108

kidneyweakx opened this issue Dec 14, 2024 · 4 comments · Fixed by #110

Comments

@kidneyweakx
Copy link
Contributor

Description

I am attempting to deploy a bonsol manifest.json using Cloudflare R2 as the S3-compatible storage. The bucket region and URL settings are configured correctly. However, I encountered the following error during deployment:

P.S. also happen when using iDrive e2

Steps to Reproduce

  1. Set up an S3-compatible bucket on Cloudflare R2. (follow this guide https://developers.cloudflare.com/r2/api/s3/api/#bucket-region)
    • Bucket Name: bonsol202412
    • Region: us-east-1
    • URL: https://***.r2.cloudflarestorage.com/bonsol202412
  2. Run the following deployment command:
    bonsol deploy -m ./ikkyuz/manifest.json -t url --url https://***.r2.cloudflarestorage.com/bonsol202412 --region us-east-1 --bucket bonsol202412 --access-key *** --secret-key *** --storage-account s3://bonsol202412  

Error Message

Error: The binary uploaded does not match the local binary at path './ikkyuz/target/riscv-guest/riscv32im-risc0-zkvm-elf/docker/ikkyuz/ikkyuz', is the URL correct?  
upload_url: https://***.r2.cloudflarestorage.com/bonsol202412  

Expected Behavior

The manifest and binary should be successfully uploaded to the specified bucket on Cloudflare R2 without mismatch errors.

Actual Behavior

The deployment fails with an error stating that the binary uploaded does not match the local binary.

Environment

  • OS: macOS 15.1.1
  • Bonsol Version: v0.2.1

Additional Information

  • I have verified that the bucket URL and region are correct.
  • The error suggests a binary mismatch between the local file and the uploaded binary.

Would appreciate any guidance or fixes for this issue!

@austbot
Copy link
Contributor

austbot commented Dec 15, 2024

hmm, i wonder if its some kinf of compression issue, could you share the full urls to me?

@kidneyweakx
Copy link
Contributor Author

hmm, i wonder if its some kinf of compression issue, could you share the full urls to me?

Hi! I believe the issue might be related to URL formatting.

The original S3 URL was always parsed as
https://{bucket}.s3.{region}.amazonaws.com/{path}, which was causing the problem. Additionally, the URL option couldn't be used to upload to S3-compatible services.

With the #110 , it can now specify a custom endpoint if needed.

@austbot
Copy link
Contributor

austbot commented Dec 16, 2024

there is a bug in the cli now where yo uare required to add other deployment args , this will be fixed soon.

@austbot
Copy link
Contributor

austbot commented Dec 16, 2024

saw your endpoint pr very nice

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants