cloudflare / cloudflare/workers-sdk

Wrangler Pipelines command does not recognize R2 bucket with the jurisdiction specified

Open
#10,123 4 comments 3 reactions 1 assignee Claimed by @aninibread View on GitHub
package:wrangler product:pipelines product:r2
Dominant language
TypeScript
Stars
4.5k
Forks
1.5k
Avg merge
3d 8h
Merged PRs (30d)
187

Description

### What versions & operating system are you using?

System:
OS: Linux 6.5 Ubuntu 22.04.5 LTS 22.04.5 LTS (Jammy Jellyfish)
CPU: (20) x64 12th Gen Intel(R) Core(TM) i7-12800H
Memory: 8.89 GB / 31.01 GB
Container: Yes
Shell: 5.1.16 - /bin/bash
Binaries:
Node: 24.2.0 - /usr/local/bin/node
Yarn: 1.22.10 - /usr/local/bin/yarn
npm: 10.9.0 - /usr/local/bin/npm
npmPackages:
wrangler: ^4.26.1 => 4.26.1

### Please provide a link to a minimal reproduction

_No response_

### Describe the Bug

Wrangler Pipelines command does not recognize R2 bucket with the jurisdiction specified:
```shell
$ WRANGLER_LOG_SANITIZE=false npx wrangler pipelines create \
test-pipeline \
--source worker \
--r2-bucket test-logs \
--r2-prefix test

⛅️ wrangler 4.26.1
───────────────────
▲ [WARNING] 🚧 `wrangler pipelines create` is an open-beta command. Please report any issues to https://github.com/cloudflare/workers-sdk/issues/new/choose

✘ [ERROR] The R2 bucket [test-logs] doesn't exist

🪵 Logs were written to "/home/user/.config/.wrangler/logs/wrangler-2025-07-29_17-18-34_508.log"
```
The log:
```shell
$ cat /home/user/.config/.wrangler/logs/wrangler-2025-07-29_17-18-34_508.log

--- 2025-07-29T17:18:34.581Z debug
🪵 Writing logs to "/home/user/.config/.wrangler/logs/wrangler-2025-07-29_17-18-34_508.log"
---

--- 2025-07-29T17:18:34.581Z debug
Metrics dispatcher: Posting data {"deviceId":"9f930c1b-58e9-4d87-bd02-7f96aa65947b","event":"wrangler command started","timestamp":1753809514581,"properties":{"amplitude_session_id":1753809514580,"amplitude_event_id":0,"wranglerVersion":"4.26.1","osPlatform":"Linux","osVersion":"#28-Ubuntu SMP PREEMPT_DYNAMIC Thu Jul 25 13:32:46 UTC 2024","nodeVersion":24,"packageManager":"npm","isFirstUsage":false,"configFileType":"none","isCI":false,"isPagesCI":false,"isWorkersCI":false,"isInteractive":true,"hasAssets":false,"argsUsed":["pipeline","r2Bucket","r2Prefix","source"],"argsCombination":"pipeline, r2Bucket, r2Prefix, source","command":"wrangler pipelines create","args":{"source":[""],"r2Bucket":"","r2Prefix":"","xJsonConfig":true,"j":true,"requireHttpAuth":false,"compression":"","pipeline":""}}}
---

--- 2025-07-29T17:18:34.586Z debug
.env file not found at ".env". Continuing... For more details, refer to https://developers.cloudflare.com/workers/wrangler/system-environment-variables/
---

--- 2025-07-29T17:18:34.608Z log

⛅️ wrangler 4.26.1
───────────────────
---

--- 2025-07-29T17:18:34.636Z warn
▲ [WARNING] 🚧 `wrangler pipelines create` is an open-beta command. Please report any issues to https://github.com/cloudflare/workers-sdk/issues/new/choose

---

--- 2025-07-29T17:18:34.638Z debug
Retrieving cached values for account from node_modules/.cache/wrangler
---

--- 2025-07-29T17:18:34.639Z debug
-- START CF API REQUEST: GET https://api.cloudflare.com/client/v4/accounts//r2/buckets/test-logs
---

--- 2025-07-29T17:18:34.639Z debug
QUERY STRING:
---

--- 2025-07-29T17:18:34.639Z debug
HEADERS: {}
---

--- 2025-07-29T17:18:34.639Z debug
INIT: {}
---

--- 2025-07-29T17:18:34.639Z debug
-- END CF API REQUEST
---

--- 2025-07-29T17:18:34.809Z debug
Metrics dispatcher: Failed to send request: fetch failed
---

--- 2025-07-29T17:18:36.831Z debug
-- START CF API RESPONSE: Not Found 404
---

--- 2025-07-29T17:18:36.831Z debug
HEADERS: {}
---

--- 2025-07-29T17:18:36.831Z debug
RESPONSE: {"success":false,"errors":[{"code":10006,"message":"The specified bucket does not exist."}],"messages":[],"result":null}
---

--- 2025-07-29T17:18:36.831Z debug
-- END CF API RESPONSE
---

--- 2025-07-29T17:18:36.832Z log

---

--- 2025-07-29T17:18:36.834Z error
✘ [ERROR] The R2 bucket [test-logs] doesn't exist

---

--- 2025-07-29T17:18:36.840Z debug
Error: The R2 bucket [test-logs] doesn't exist
at authorizeR2Bucket (/home/user/node_modules/wrangler/wrangler-dist/cli.js:130186:15)
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
at async Object.handler (/home/user/node_modules/wrangler/wrangler-dist/cli.js:130550:24)
at async Object.handler (/home/user/node_modules/wrangler/wrangler-dist/cli.js:82543:7)
---

--- 2025-07-29T17:18:36.840Z debug
Metrics dispatcher: Posting data {"deviceId":"9f930c1b-58e9-4d87-bd02-7f96aa65947b","event":"wrangler command errored","timestamp":1753809516840,"properties":{"amplitude_session_id":1753809514580,"amplitude_event_id":1,"wranglerVersion":"4.26.1","osPlatform":"Linux","osVersion":"#28-Ubuntu SMP PREEMPT_DYNAMIC Thu Jul 25 13:32:46 UTC 2024","nodeVersion":24,"packageManager":"npm","isFirstUsage":false,"configFileType":"none","isCI":false,"isPagesCI":false,"isWorkersCI":false,"isInteractive":true,"hasAssets":false,"argsUsed":["pipeline","r2Bucket","r2Prefix","source"],"argsCombination":"pipeline, r2Bucket, r2Prefix, source","command":"wrangler pipelines create","args":{"source":[""],"r2Bucket":"","r2Prefix":"","xJsonConfig":true,"j":true,"requireHttpAuth":false,"compression":"","pipeline":""},"durationMs":2270,"durationSeconds":2.27,"durationMinutes":0.03783333333333334,"errorType":"FatalError"}}
```

Getting R2 bucket info - not found:
```shell
$ npx wrangler r2 bucket info test-logs

⛅️ wrangler 4.26.1
───────────────────
Getting info for 'opal-logs'...

✘ [ERROR] A request to the Cloudflare API (/accounts//r2/buckets/test-logs) failed.

The specified bucket does not exist. [code: 10006]

If you think this is a bug, please open an issue at:
https://github.com/cloudflare/workers-sdk/issues/new/choose
```

Getting R2 buckert info specifying the jurisdiction - success:
```shell
$ npx wrangler r2 bucket info test-logs --jurisdiction fedramp

⛅️ wrangler 4.26.1
───────────────────
Getting info for 'test-logs'...
name: test-logs
created: 2025-07-17T16:50:35.667Z
location: ENAM
default_storage_class: Standard
object_count: 0
bucket_size: 0 B
```

### Please provide any relevant error logs

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.