Error on remote worker: APIError: A request to the Cloudflare API

I'm trying to test out a browser deployed on worker in a DO and getting this error
✘ [ERROR] Error on remote worker: APIError: A request to the Cloudflare API (/accounts/5aa6cae4d0260b6aae9d255f3b63242f/workers/scripts/playground-worker/edge-preview) failed.

at throwFetchError
(/Users/am/Coding/playground/node_modules/wrangler/wrangler-dist/cli.js:159817:18)
at fetchResult
(/Users/am/Coding/playground/node_modules/wrangler/wrangler-dist/cli.js:159730:5)
at process.processTicksAndRejections
(node:internal/process/task_queues:95:5)
at async createPreviewToken
(/Users/am/Coding/playground/node_modules/wrangler/wrangler-dist/cli.js:174177:29)
at async createWorkerPreview
(/Users/am/Coding/playground/node_modules/wrangler/wrangler-dist/cli.js:174198:17)
at async start
(/Users/am/Coding/playground/node_modules/wrangler/wrangler-dist/cli.js:174924:34)
{
text: 'A request to the Cloudflare API
(/accounts/5aa6cae4d0260b6aae9d255f3b63242f/workers/scripts/playground-worker/edge-preview)
failed.',
notes: [
{
text: 'An unknown error has occured. If this
error persists, please file a report in the
workers-sdk GitHub repository
(https://github.com/cloudflare/workers-sdk/issues) or
reach out to your account team. [code: 10002]'
}
],
location: undefined,
kind: 'error',
code: 10002,
accountTag: '5aa6cae4d0260b6aae9d255f3b63242f'
}
✘ [ERROR] Error on remote worker: APIError: A request to the Cloudflare API (/accounts/5aa6cae4d0260b6aae9d255f3b63242f/workers/scripts/playground-worker/edge-preview) failed.

at throwFetchError
(/Users/am/Coding/playground/node_modules/wrangler/wrangler-dist/cli.js:159817:18)
at fetchResult
(/Users/am/Coding/playground/node_modules/wrangler/wrangler-dist/cli.js:159730:5)
at process.processTicksAndRejections
(node:internal/process/task_queues:95:5)
at async createPreviewToken
(/Users/am/Coding/playground/node_modules/wrangler/wrangler-dist/cli.js:174177:29)
at async createWorkerPreview
(/Users/am/Coding/playground/node_modules/wrangler/wrangler-dist/cli.js:174198:17)
at async start
(/Users/am/Coding/playground/node_modules/wrangler/wrangler-dist/cli.js:174924:34)
{
text: 'A request to the Cloudflare API
(/accounts/5aa6cae4d0260b6aae9d255f3b63242f/workers/scripts/playground-worker/edge-preview)
failed.',
notes: [
{
text: 'An unknown error has occured. If this
error persists, please file a report in the
workers-sdk GitHub repository
(https://github.com/cloudflare/workers-sdk/issues) or
reach out to your account team. [code: 10002]'
}
],
location: undefined,
kind: 'error',
code: 10002,
accountTag: '5aa6cae4d0260b6aae9d255f3b63242f'
}
My toml
name = "playground-worker"
main = "src/index.ts"
compatibility_date = "2024-09-23"
compatibility_flags = [ "nodejs_compat" ]

observability = { enabled = true }

workers_dev = false
send_metrics = false
browser = { binding = "MYBROWSER" }

[durable_objects]
bindings = [
{ name = "BROWSER_DO", class_name = "BrowserDurableObject" }
]

[[migrations]]
tag = "v1" # Should be unique for each entry
new_classes = ["BrowserDurableObject"]

[triggers]
# every 5 minutes
crons = ["*/5 * * * *"]
name = "playground-worker"
main = "src/index.ts"
compatibility_date = "2024-09-23"
compatibility_flags = [ "nodejs_compat" ]

observability = { enabled = true }

workers_dev = false
send_metrics = false
browser = { binding = "MYBROWSER" }

[durable_objects]
bindings = [
{ name = "BROWSER_DO", class_name = "BrowserDurableObject" }
]

[[migrations]]
tag = "v1" # Should be unique for each entry
new_classes = ["BrowserDurableObject"]

[triggers]
# every 5 minutes
crons = ["*/5 * * * *"]
4 Replies
DiamondDragon
DiamondDragon3w ago
https://community.cloudflare.com/t/error-on-remote-worker-apierror-a-request-to-the-cloudflare-api-failed/716272 it appears to be this issue I get this runnign wrangler dev --remote wrangler 3.78.12
texan
texan3w ago
I'm not so sure that's the same issue. I'm seeing several errors for MYBROWSER being bound more than once for your account
DiamondDragon
DiamondDragon3w ago
Ah I see. I changed the bounding name and am able to use dev now. Is there a way on my end to see MYBROWSER is bound more than once?
texan
texan3w ago
Not that I’m aware of (not that there isn’t, I’m just new enough to not definitively know 🙂)
Want results from more Discord servers?
Add your server