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

Cloudflare Workers cannot connect to Vultr's API

Connecting to Vultr's API through Cloudflare workers causes a 403 forbidden. The 403 forbidden seems to be coming from Cloudflare directly looking at the developer tools. Is there anyway to get any insight into what's causing this? Vultr have confirmed they have no banned or blocked any of Cloudflare's IPs and 403 is not expected.
No description

Using Hono.js on Cloudflare Workers Free Plan with Postgres, JWT, and OAuth

Can honojs work on cloudflare workers free plan with postgres db and hono's built-in JWT and auth with google, github (google and github from hono's list of oauth providers) and custom email auth?

Deploy working, but Cloudflare build failing

I'm having a bit of a weird problem with https://github.com/jakearchibald/random-stuff. If I pnpm run build and pnpm run deploy, everything works fine. However, if I push to GitHub, the Cloudflare build fails with:
Error: The provided Wrangler config main field (/opt/buildhome/repo/dist/random_stuff/index.js) doesn't point to an existing file
Error: The provided Wrangler config main field (/opt/buildhome/repo/dist/random_stuff/index.js) doesn't point to an existing file
...

I have paid for Workers plans but still getting a 1102 resource limit error for my pages app

I deployed my app on pages, not workers, my account id is b8115041c042b125ed83f7aaf5f99373 I have checked my app metrics and the 99.9th percentile CPU time is 261.7 ms, so it should be below the limits. I have already specify
[limits]
cpu_ms = 30_000 # 30 seconds max for paid plan
[limits]
cpu_ms = 30_000 # 30 seconds max for paid plan
...

OG IMAGE ON MY SITE WONT UPDATE!!!

All morning been trying to change the OG image on my site, but the template-based image (not even on the project anymore) keeps showing up!! The only possible explanation is that Cloudflare Worker Pages has cached the image. Since I have new images that must use the same filenames (I’m deploying a Nextjs static site on Cloudflare Workers), I need to purge the cached image from the worker."...

DNS issues

We transferred two websites from GoDaddy. Why did all the DNS records for DigitCells.com transfer successfully, but gopathdx.com did not? Do you have all the DNS records on your end? We have the business plan.

Can we get more worker requests served in Korea.

Hi, we’re serving about 95% Korean traffic, and our database is also located in South Korea. However, since Cloudflare only provides a very limited amount of Worker capacity, most of our requests are being routed to Japan or even Hong Kong. Could we have more Worker requests served in Korea? I’d be willing to pay for this if it’s affordable....

I am on Worker's paid plan but getting 1102 error

I am using open next to do the deployments I have changed the max CPU time to 30000ms but still this is happening again and again.
No description

Sending and receiving realtime audio in a worker

https://blog.cloudflare.com/cloudflare-realtime-voice-ai/ says "WebRTC audio as PCM in Workers" but I can't find any documentation. I'm looking to send audio to my own backend because I need to use a self-hosted STT model. Is that possible, ideally over a websocket, or less ideally WebRTC or some other method?

No such Durable Object class is exported from the worker

Hey there, I am currently trying to setup OpenNext to work with a durable object, but I can't seem to get it to work. I always get this error message:
A DurableObjectNamespace in the config referenced the class "DatabaseDurableObject", but no such Durable Object class is exported from the worker. Please make sure the class name matches, it is exported, and the class extends 'DurableObject'. Attempts to call to this Durable Object class will fail at runtime, but historically this was not a startup-time error. Future versions of workerd may make this a startup-time error.
A DurableObjectNamespace in the config referenced the class "DatabaseDurableObject", but no such Durable Object class is exported from the worker. Please make sure the class name matches, it is exported, and the class extends 'DurableObject'. Attempts to call to this Durable Object class will fail at runtime, but historically this was not a startup-time error. Future versions of workerd may make this a startup-time error.
...

Route not being added

I have a workers app made with svelte kit and TS The app is linked to a Github repo I have set the deploy command to wrangler deploy --env bbc && wrangler deploy --env az And I have the envs in my wrangler config https://pastes.dev/rtPbCgBBbV But after it builds I only see az.<the domain>.com in the routes...

Worker exceeded CPU time limit despite paid tier

Dear all, I started getting "Worker exceeded CPU time limit"-Errors when I would start opening multiple tabs of a website I own and host on cloudflare. I upgraded to the paid worker tier but still seem to be getting this error. From the logs, the wall-/and cpu time are higher, but nowhere the 30s allowed time. I also set the CPU time limit to 30s on my page. What could be the problem here? ...

Workers Build: API token does not work

Hi, I am trying to deploy my Nuxt app to cloudafare workers but the problem is that I followed the setup on the website, everything builds fine just for the last step when it tries to deploy it throws this error ``` 15:18:11.308
15:18:11.362 ✘ [ERROR] A request to the Cloudflare API (/accounts/.../pages/projects/...) failed. 15:18:11.362 ...

Worker deployed but unreachable?

I've developed an SPA (just one page, no SSR) and deployed on Workers. I also defined a custom domain with a pattern in the wrangler.jsonc. But now when I try to access the route, it won't work (the worker doesn't even log that a route has been accessed). It just shows this:...
No description

Efficient caching for presigned S3 buckets ?

I am using a CF Worker as a front to an S3 bucket. The worker fetches the file from S3 bucket using AWS sdk to presign the request (the bucket is not publicly accessible) It works okay, but I get a cache MISS every time because the URL that goes to S3 contains the signature key in a query parameter. It's not clear to me how to resolve the cache MISS issue, does anyone have an idea ?...

Is there a plan to fix "LaLiga" blocking in Spain?

Or at least allow Business and not only Enterprise to bring its own IP? Maybe charge an extra dollars for it. But the current situation is bad, my whole company is rethinking cloudflare entirely. I know its not a Cloudflare problem, but a solution should be proposed or being worked on. We can't be like this forever.

When my worker runs out of CPU time, it generates hundreds of errors

When my worker runs out of CPU time, it generates hundreds to thousands of errors that just say that the worker has exceeded its CPU time limit. This is creating a bunch of observability events that I'd rather not pay for, so I'm looking for a way to make sure only one event is being created when this happens.
No description

Cannot find module 'cloudflare:workers' when creating RPC WorkerEntrypoint

I'm following the first example in https://developers.cloudflare.com/workers/runtime-apis/rpc/, but encounter this "cannot find module" error in vscode. If I delete the import WorkerEntrypoint, vscode can't find the class. This is not a new project but an attempt to add RPC to an existing worker codebase.

How long for a new custom domain routed worker to go live?

I decided to switch from hosting on GitHub Pages to hosting with a Cloudflare worker with an associated custom domain. I know that officially, it's said that it can take 24 hours for DNS changes to propagate, but I feel like that's very conservative. It's been about an hour, and from dig I'm getting Cloudflare A records. But my site isn't coming up, and I feel like something's wrong. I've actually published this exact site (same version of the same code) via wrangler versions upload, and that comes up exactly as documented and expected. But wrangler deploy hasn't gone as smoothly. What should I look at to get a better sense of whether I've configured everything correctly, or whether I just need to be patient and wait for some propagation?...

Is there a wall time limit for the free workers?

doucmentation seems to state that we dont but in practice all my calls die at 29,999 ms which is oddly specific async fetch(request, env, ctx) { .... ctx.waitUntil(processingPromise);...