question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

🐛 BUG: wrangler r2 object CLI

See original GitHub issue

What version of Wrangler are you using?

2.5.0

What operating system are you using?

Mac

Describe the Bug

To reproduce:

  1. Create a new r2 bucket called foobar
  2. Create a README.md
  3. Attempt to upload the README.md file to foobar with the following command: wrangler r2 object put foobar/README.md -f ./README.md
❯ wrangler r2 object put foobar/README.md -f ./README.md
 ⛅️ wrangler 2.5.0
-------------------
Creating object "README.md" in bucket "foobar".

✘ [ERROR] Failed to fetch /accounts/<account id>/r2/buckets/foobar/objects/README.md - 404: Not Found);

If you think this is a bug then please create an issue at https://github.com/cloudflare/wrangler2/issues/new/choose
Running this command outputs the following error:

Now I don’t think this is a bug and is likely PEBKAC. Hopefully, someone can point me in the right direction, and I’ll close this issue. But this is not the only time I’ve been frustrated by the Cloudflare developer experience. All that I want to do is copy a file from my local system to R2. The cli wasn’t intuitive enough for me to guess–I assumed it would be similar to the cp command–but the -h was well done. After trying many variations of this command and still receiving similar errors, I gave up and went to the docs. I’m not using workers in any capacity, but I have to go to the workers help to get any information on wrangler, a little confusing, but maybe I’m an outlier here. I get to the commands section and see r2 bucket documentation. But nothing for r2 object. I am, again, frustrated. I try the official R2 documentation, also a little confusing going to multiple product pages. No examples using wrangler, just 3rd party libs. Hence, filing this bug.

I love what y’all are doing, and I like the direction Cloudflare is heading with its developer-focused products. Still, I’ve encountered many paper cuts, primarily in the fragmented documentation across multiple product umbrellas. I consider pages, workers, r2, images etc., all to be bleeding-edge products, and I constantly advocate for their use over more traditional software development patterns, but these issues make that more difficult.

Issue Analytics

  • State:closed
  • Created 10 months ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
rozenmdcommented, Dec 1, 2022

Hi @lucasnad27, I’m so sorry you experienced this issue.

We’ll update the wrangler command docs to document the wrangler r2 object commands, and I’ve raised with the team whether it still makes sense to keep Wrangler underneath Workers in the docs.

1reaction
rozenmdcommented, Dec 2, 2022

@lucasnad27 I’ll make a PR into https://github.com/cloudflare/cloudflare-docs resolving the issue, which will automatically close this issue and the one I just filed in that repo (https://github.com/cloudflare/cloudflare-docs/issues/6894)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Debugging Workers - Cloudflare Docs
When you are developing your Workers application, the wrangler dev command can significantly reduce the time it takes to test and debug new ......
Read more >
@cloudflare/wrangler | Yarn - Package Manager
Command-line interface for all things Cloudflare Workers. wrangler, cloudflare ... Note: If you're looking for the latest version of the wrangler package, ...
Read more >
Workerd: Open-source Cloudflare workers runtime
... KV and R2 for testing purposes, which the Wrangler CLI tool will ... Last wish list item: a Postgres service on Workers...
Read more >
oCM - River Thames Conditions
Wright brothers memorial in kitty hawk, 2011 wrangler jk programmer, ... Kia ecotaxi, Beer mug silhouette clip art, High intermediate 2 vocabulary, ...
Read more >
Brendan Coll | Noise
Let us know what you think in the #wrangler channel on the Cloudflare ... more { unknown object } s or massive JSON...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found