cloudflare / cloudflare/workers-sdk

R2 binding deployment fails with error 10136 despite R2 being enabled on the account

Open
#15,610 1 comment 0 reactions 0 assignees View on GitHub
product:r2
Dominant language
TypeScript
Stars
4.5k
Forks
1.5k
Avg merge
3d 8h
Merged PRs (30d)
186

Description

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

Environment

Workers Free plan
R2 Paid (active in Billing > Subscriptions)
Wrangler 4.131.0
OAuth login, correct account

### Please provide a link to a minimal reproduction

https://gist.github.com/Partil/53e2d0206550bf86da2a183a298f92e4

### Describe the Bug

Deploying a Worker with an R2 binding fails with:

R2 binding error for bucket '': Please enable R2 through the Cloudflare Dashboard. [code: 10136]

his occurs even though R2 is enabled on the account. The error appears to be a stuck account-level enablement flag in the binding validation path, not an actual missing entitlement.

Steps to reproduce

Have an account with Workers Free + R2 Paid (active subscription).
Create an R2 bucket (confirmed via npx wrangler r2 bucket list).
Configure a Worker with an R2 binding:
name = "r2-binding-test"
main = "src/index.js"
compatibility_date = "2026-09-08"

[[r2_buckets]]
binding = "MY_BUCKET"
bucket_name = ""
Run npx wrangler deploy.
Observe error 10136.
Expected behavior

Worker deploys successfully with the R2 binding. R2 bindings are not gated behind Workers Paid (per docs: https://developers.cloudflare.com/r2/get-started/workers-api/).

Actual behavior

Deployment fails with error 10136. Same error when adding the binding via the dashboard. Same error with both EU-jurisdiction and default-location buckets. Deleting and recreating the Worker did not help.

Evidence that rules out the plan explanation:

npx wrangler r2 bucket list succeeds — R2 storage API sees the buckets.
A D1 binding on the same Worker deploys without issue — if the Free plan were the blocker, D1 would also fail.
Account entitlements confirm r2.enabled = true. (as per the Cloudflare agent, so treat this with usual llm scepticism)
Both EU-jurisdiction and default-location buckets fail identically.
Dashboard binding creation fails with the same error — not a Wrangler-specific issue.
Likely root cause

The R2 binding validation path checks a separate enablement/entitlement flag from the R2 storage API. The storage API correctly sees R2 as enabled, but the binding subsystem reads a stale or stuck flag, returning 10136.

Note: this only reproduces on affected accounts. The same config deploys fine elsewhere. Several other users report the identical pattern on the Cloudflare Community forum.

### Please provide any relevant error logs

Wrangler: X [ERROR] A request to the Cloudflare API (/accounts/MY_ACCOUNT_ID/workers/scripts/r2-binding-test) failed.

R2 binding error for bucket 'r2-binding-repro: Please enable R2 through the Cloudflare Dashboard.
[code: 10136]

Contributor guide

Open the contributing guide

Research direction

Start with the linked gist and reproduce the issue using Wrangler 4.131.0: run `npx wrangler r2 bucket list`, then `npx wrangler deploy` with the shown `[[r2_buckets]]` configuration. Compare the result with the documented R2 entitlement behavior and the dashboard binding attempt; done means an enabled R2 account deploys the Worker successfully without error 10136.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, typescript
Domain
api, cli, cloud
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.