Cloudflare Developers

CD

Cloudflare Developers

Welcome to the official Cloudflare Developers server. Here you can ask for help and stay updated with the latest news

Join

Deployment of static site failing

Hey folks I'm getting this error trying to deploy the static react router 7 template, why does it need a server folder:
11:20:25.691 ✓ built in 6.17s 11:20:25.797 Success: Build command completed...

Deploying worker consumer is cutting off the existing long running connection from older version.

Hi, we’re frequently shipping new updates to our workers and we’ve realized that deploying a new worker will cut the long running job for the same worker off. How can we persist the long running job while deploying new versions?...

Worker is counting 1 fetch (with no redirects) as 2 subrequests

Hello all! I am currently blocked and puzzled by CF Worker's subrequest counting behavior. I have a worker that makes a GET request to a hal+json API, and it appears to be counting every 1 fetch as 2.
I know this because I wrote a test route that fetches until it throws the "too many subrequests" error, it stops at the 26th instead of the 51st. When I set the URL to get from another API, it can do 50 requests like normal, so it seems to be something about this specific API. My main question is: are there any cases other than redirects that would cause a Worker to count 1 fetch request as 2 subrequests?...

Hi Devs,

I am trying to implement Early Hint Headers (Status Code 103) for my next js application at cloudflare worker. And I want to add some static assets like 'https://int2-www.my-domain.com/assets/icons/cart-light.svg', 'https://int2-www.my-domain.com/assets/fonts/Circular-Bold.woff2' to my Early link headers which i will emit from my cloudlfare worker, as 103 response code. I have implemented this solution at my handler at worker: ...
No description

Compress a binary blob served as worker asset

I have a binary blob that's served as worker asset as part of a react vite app. I want to compress it before it is sent as it can reduce the size by a lot. Apparently server on wrangler dev is compressing the blob but not when it is deployed to the worker. How can I compress it? The attached screenshots show the difference when it is served on localhost vs production...
No description

`wrangler types` breaks VS Code typing

I ran pnpm wrangler types (Wrangler 4.40.1) and it added a new GlobalProps interface to my worker-configuration.d.ts. This appears to break types in VS Code - I now get Property 'Foo' does not exist on type 'Env' errors for all my bindings and environment variables (screenshot). Manually editing worker-configuration.d.ts to remove the GlobalProps import makes the VS Code errors go away. How can I fix?...
No description

CPU time limit ignored in paid worker

I have a worker which needs to perform a long task for about 2 minutes after the initial fetch request has been dealt with. I'm using ctx.waitUntil, but after about 30 seconds it stops. I've set CPU time limit to 300_000 ms (5 minutes), but it hasn't helped. ...
No description

Accessing assets between different versions of the same worker

I have a worker which is deploying both a PWA web application (using static assets) and a small worker that I am using for routing purposes. I also have a custom domain for my entire application (ex. myapp.com) I want to be able to control which customer is using which version of the application. For that reason, the web application is setting a certain version header in the request for resources to the web worker. If the web worker that was hit is the one of the indicated version, it would simply return the requested assets (await env.ASSETS.fetch(request)); if the assets should be returned from another version, I am trying to perform a fetch (from within the worker) to the correct version of the same worker (using the preview url). This one always fails with a 404. Trying to reach the URL of the other version from outside of the worker, it works. Any thoughts how I could achieve this? Thanks!...

Preview deployment domain

Hey folks, Context: I'm migrating my project from Pages to Workers (SvelteKit site). ...

Capacity temporarily exceeded & timed out

Hi, i am using cloudflare autorag services. However, recently i am facing quite a few instances of the following issues: ``` model: undefined, status: 400, txt: '{"errors":[{"code":7019,"message":"Workers AI: 3040: Capacity temporarily exceeded,...

Started receiving messages about potential deadlock

Starting today I'm suddenly getting lots of rather lengthy messages in the "Observability" log of my worker:
A stalled HTTP response was canceled to prevent deadlock. This can happen when a Worker calls fetch() or cache.match() several times without reading the bodies of the returned Response objects. There is a limit on the number of concurrent HTTP requests that can be in-flight at one time. Normally, additional requests made beyond that limit are delayed until previous responses complete. However, because the Worker did not read the responses, they would never complete. Therefore, to prevent deadlock, the oldest response was canceled. To avoid this warning, make sure to either read the body of every HTTP Response or call response.body.cancel() to cancel a response that you don't plan to read from.
Where are these coming from? I tried to narrow down to a logging statement in my code. But I think it's not coming from any of them. Nor can I figure out what would be triggering these. I tried to reproduce locally in my dev environment using the same parameters as the original call. But that wouldn't cause anything. Is there any way to find out where (in my code) these are coming from?...

How can I view the log from a failed deployment?

For some reason, my deployment is failing after builid, and the build log does not state why. It says it saves undo log file, but it doesn't seem like that log file is accessible via Cloudflare?

Preview deployments URLs

Hey folks, Context: I'm migrating my project from Pages to Workers (SvelteKit site). Branch control > Pull request previews: Enabled(default)...

TanStack Start with Deno runtime on Workers?

Can I deploy the TanStack Start with deno project to Cloudflare workers?

Infinite Pages delete error

Hi. Tried this in an open channel, but no dice. There's no Pages Help forum, so I'll try here, too. Here's the situation: I can't delete an old Pages project....

OpenAI Completions compatibility for gpt-oss models?

/v1/chat/completions seems to implement Responses for gpt-oss, instead of Completions. Is this the intended behavior? ```sh curl https://gateway.ai.cloudflare.com/v1/ACCOUNT_ID/GATEWAY_NAME/workers-ai/v1/chat/completions -H "Authorization: Bearer TOKEN" -X POST -d '{ "model": "@cf/openai/gpt-oss-120b", "messages": [ { "role": "user", "content": "hello" } ] }' ...

deployed worker always returning 403 when uploading file via the routed domain.

Can someone help me with this behavior? It keeps returning 403 when I am trying to upload a file via the routed domain? it works fine when using the "workers.dev" domain/route. Based on it's behavior, it seems like it didn't actually reach the worker because I don't see any 403 logs when I am trying to upload....
No description

worker deployment using wrangler fails [code: 10013]

While deploying worker (using wrangler) I'm getting next error:
An unknown error has occurred. If this error persists, please file a report in workers-sdk (https://github.com/cloudflare/workers-sdk/issues) or reach out to your account team. [code: 10013]
A request to the Cloudflare API (/accounts/<account_ID>/workers/scripts/<worker_name>/routes) failed.
An unknown error has occurred. If this error persists, please file a report in workers-sdk (https://github.com/cloudflare/workers-sdk/issues) or reach out to your account team. [code: 10013]
A request to the Cloudflare API (/accounts/<account_ID>/workers/scripts/<worker_name>/routes) failed.
...

Use ca/cert/key with Cloudflare Worker

I have a request that requires a cert - after trying it - I'm only getting 526 back. And it looks like certs are not supported in https (and the documentation backs that up https://developers.cloudflare.com/workers/runtime-apis/nodejs/https/) ```ts...