Unknown error 10013

Error on remote worker: APIError: A request to the Cloudflare API (/accounts/3ee55606f881222ad1efb703537713b1/workers/scripts/backoffice/edge-preview) failed.

at throwFetchError
(/node_modules/wrangler/wrangler-dist/cli.js:122866:18)
at fetchResult
(/node_modules/wrangler/wrangler-dist/cli.js:122779:5)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async createPreviewToken
(/node_modules/wrangler/wrangler-dist/cli.js:175341:29)
at async createWorkerPreview
(/node_modules/wrangler/wrangler-dist/cli.js:175362:17)
at async #previewToken
(/node_modules/wrangler/wrangler-dist/cli.js:175631:34)
at async #onBundleComplete
(/node_modules/wrangler/wrangler-dist/cli.js:175684:21)
at async Mutex.runWith
(/node_modules/wrangler/node_modules/miniflare/dist/src/index.js:3632:16)
{
text: 'A request to the Cloudflare API
(/accounts/3ee55606f881222ad1efb703537713b1/workers/scripts/backoffice/edge-preview) failed.',
notes: [ { text: 'workers.api.error.unknown [code: 10013]' } ],
location: undefined,
kind: 'error',
code: 10013,
accountTag: '3ee55606f881222ad1efb703537713b1'
}
Error on remote worker: APIError: A request to the Cloudflare API (/accounts/3ee55606f881222ad1efb703537713b1/workers/scripts/backoffice/edge-preview) failed.

at throwFetchError
(/node_modules/wrangler/wrangler-dist/cli.js:122866:18)
at fetchResult
(/node_modules/wrangler/wrangler-dist/cli.js:122779:5)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async createPreviewToken
(/node_modules/wrangler/wrangler-dist/cli.js:175341:29)
at async createWorkerPreview
(/node_modules/wrangler/wrangler-dist/cli.js:175362:17)
at async #previewToken
(/node_modules/wrangler/wrangler-dist/cli.js:175631:34)
at async #onBundleComplete
(/node_modules/wrangler/wrangler-dist/cli.js:175684:21)
at async Mutex.runWith
(/node_modules/wrangler/node_modules/miniflare/dist/src/index.js:3632:16)
{
text: 'A request to the Cloudflare API
(/accounts/3ee55606f881222ad1efb703537713b1/workers/scripts/backoffice/edge-preview) failed.',
notes: [ { text: 'workers.api.error.unknown [code: 10013]' } ],
location: undefined,
kind: 'error',
code: 10013,
accountTag: '3ee55606f881222ad1efb703537713b1'
}
I am getting this error using wrangler 3.86.1 and authentificated with wrangler login It happens when using wrangler dev --remote on a sveltekit deployed in workers with a D1 database binding Any idea what this could mean.
9 Replies
Walshy
Walshy•4w ago
looks like you have an assets binding and that is breaking it, not sure it's supported in remote yet - cc: @texan
texan
texan•4w ago
Ah, yup that's exactly right. dev --remote isn't yet supported (but on the roadmap for GA!)
Walshy
Walshy•4w ago
(we should have a proper error here 😅 )
texan
texan•4w ago
I thought we did handle this on the backend; I'll file a ticket for it in the meantime, but maybe I can sneak a fix in this week
Walshy
Walshy•4w ago
well it's the api that's throwing unknown error here
texan
texan•4w ago
@apolodoro can you share your wrangler.toml, and perhaps the version of wrangler you're using?
apolodoro
apolodoroOP•4w ago
Of course I disabled assets to be able to use remote but thats when i got the error
#:schema node_modules/wrangler/config-schema.json
name = "backoffice"
compatibility_date = "2024-11-06"
main = ".svelte-kit/cloudflare/_worker.js"
# Disabled assets to be able to use wrangler dev --remote
# assets = { directory = ".svelte-kit/cloudflare", binding = "ASSETS" }

# Workers Logs
# Docs: https://developers.cloudflare.com/workers/observability/logs/workers-logs/
# Configuration: https://developers.cloudflare.com/workers/observability/logs/workers-logs/#enable-workers-logs
[observability]
enabled = true


[[d1_databases]]
binding = "DB"
#:schema node_modules/wrangler/config-schema.json
name = "backoffice"
compatibility_date = "2024-11-06"
main = ".svelte-kit/cloudflare/_worker.js"
# Disabled assets to be able to use wrangler dev --remote
# assets = { directory = ".svelte-kit/cloudflare", binding = "ASSETS" }

# Workers Logs
# Docs: https://developers.cloudflare.com/workers/observability/logs/workers-logs/
# Configuration: https://developers.cloudflare.com/workers/observability/logs/workers-logs/#enable-workers-logs
[observability]
enabled = true


[[d1_databases]]
binding = "DB"
Walshy
Walshy•4w ago
Will is OOO, I think this may be fixed - does it still throw an error?
apolodoro
apolodoroOP•4w ago
Yep just tried, and still the same on the latest version of wrangler
Want results from more Discord servers?
Add your server