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

[BUG] R2 put() never completes in dev mode #377

Open
1 task done
buchgr opened this issue Aug 22, 2023 · 0 comments
Open
1 task done

[BUG] R2 put() never completes in dev mode #377

buchgr opened this issue Aug 22, 2023 · 0 comments

Comments

@buchgr
Copy link

buchgr commented Aug 22, 2023

Is there an existing issue for this?

  • I have searched the existing issues

What version of workers-rs are you using?

0.0.18

What version of wrangler are you using?

3.5.1

Describe the bug

My worker writes to an R2 bucket.

[[r2_buckets]]
binding = "FOO"
bucket_name = "foo"
preview_bucket_name = "foo-test"
let bucket = ctx.bucket("FOO")?;
console_log!("before");
let res = bucket.put("bar", vec![1,2,3,4]).execute().await?;
console_log!("after");

The above code works as expected in production, but bucket.put() hangs indefinitely when in dev mode (npx wrangler dev). However, listing all keys of the bucket prints ["bar"]. Accessing the object's body errors. When I inspect the bucket in the CF dashboard it doesn't show bar.

let objs = bucket.list().execute().await?;
console_log!("{:?}", objs.objects().into_iter().map(|o| o.key()).collect::<Vec<_>>());

Again, everything works as expected in production.

Steps To Reproduce

No response

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

No branches or pull requests

1 participant