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

How do I specify producer and consumer workers in TOML under an environment?

TOML continues to hurt my head and I'm struggling to bind queues within an environment. I've tried the following (both suggested by Cursor but both apparently wrong): ``` [env.production] queues = { producers = [...

Service bindings - do I need to use waitUntil() in this scenario?

Suppose I have a service binding from worker A to worker B. Worker A is triggered over HTTP, and hands off to worker B to do a task e.g. update a DB record or call a remote API. Worker A does NOT need to know the result of worker B's task - it simply kicks it off. Worker A is then free to terminate. In this scenario, do I need to use waitUntil() in worker A or not? Struggling to understand when waitUntil() is and is not required. Thank you in advance....

Server Sent Events buffering

Hi, I have a worker endpoint that sends server events to the client. It was working fine until a few weeks ago but recently the client started receiving all the events from a request all at once. This behaviour seems odd, I would expect server side events not to be buffered and return immediately to minimise the response TTFB. I have tried creating a page rule to disable caching but that did not make it work. Is there a new configuration I am missing? What could be causing the events to be buffe...

Unable to upload image to R2 via workers

Hey folks I am unable to upload an image to my R2 bucket with custom domain endpoints, using my workers api. Here is my code. When executed, there is no error. And the web based dashboard doesn't shows the image in the bucket. ```...

~5% of our workers requests never return from Cloudflare after the worker returns

We recently migrated our production API backend onto Workers compute and now ~5% of requests never get a response. E.g. in devtools the requests remain pending forever (i.e. several minutes until I get bored), with no headers or status code received. Experiencing the issue across all browsers and client apps. When I encounter it on my machine I am able to identify these requests in workers observability logs, and they appear as successful response i.e. outcome: "ok" and $cloudflare.event.response.status: 200 but they remain hanging and never return from Cloudflare's edge. How can the response remain hanging in Cloudflare after the worker returns?? What mechanisms could be at play here? Can someone give me tips on how to debug this? Can I give some Ray IDs or worker/account IDs to the team to investigate?...

Can I run two workers from one monorepo?

I'm sure the answer is yes; I'm just wondering what the set up here would look like. If my repo was: ``` | worker1/ | - <all worker 1 files here - src/, wrangler.toml, etc.> | worker2/...

Two Domains Reporting Weird IP Banned Errors for Plutio and Canva websites

I have two websites that are no longer working with Cloudflare’s basic DNS service. I have one which is a Canva website that should be directing my www.hybridhelix.consulting to an IP associated with Canva - details here - https://www.canva.com/help/dns-settings/ That website is reporting a DNS 1000 error saying the DNS points to a prohibited IP. Then my other website which is my.hybridhelix.consulting should be pointing to a custom domain for another tool - Plutio - which is just a CNAME to hybrid-helix-consulting-llc.plutio.com is giving an error 1014 CNAME cross-user banned. ...

How to upload workers sourcemap for Sentry?

Hey, I'm trying to implement sentry inside my cloudflare worker with sourcemaps exporting, I ran into an issue documented here: https://github.com/getsentry/sentry-javascript/issues/14841. Does anyone has been able to find a trick to produce a sourcemaps and use it with Sentry?

Is it possible to use spanner nodejs client library in workers?

Anyone know if it's possible to use the nodejs spanner client library in a cloudflare worker with node compatibility flags? I tried but failed so just wanted to check if it's a skill issue. I get this error: ...

I bought a domain with a TLD that cloudflare does not yet support

I bought a .pt domain and i have been building my app to deploy to workers. Is it me, or is this, as of now, impossible? .pt domains are not yet supported by cloudflare registrar, so how can i deploy workers to this domain?...

404 on Pages with Workers

My Remix app is deployed on cloudflare pages + workers, the app suddenly started throwing 404 errors without even me deploying anything. Now I'm not sure how to debug that because the requests are not hitting my app at all, Anyone faced this issue before? Any idea what could have gone wrong?...

Dynamic require of "tty" is not supported

Hey! I'm running a long-time project that we are deploying on Vercel. I wanted to move it over to Cloudflare workers, but I've had few challenges along the way. The most recent being this Dynamic require of "tty" is not supported when attempting to visit the site. The project uses Sveltekit that builds with Rollup....

Apple Pay implementation on the Web with Cloudflare

Hello, I was tasked where I work at to implement Apple Pay. on the web I am stuck when it comes to validating the merchant ID by requesting a paymentSession. https://developer.apple.com/documentation/apple_pay_on_the_web/apple_pay_js_api/requesting_an_apple_pay_payment_session If I make the POST request through POSTMAN or Curl while attaching the certificates and private key it works. As far as I could see the Cloudflare equivalent of this is mtls binding (https://developers.cloudflare.com/workers/runtime-apis/bindings/mtls/) However for some reason I get 520 error when I make such request with my worker with that new Fetcher and no further info. ...

Browser rendering and queue

I am running a browser rendering queue consumer which takes data and start the crawling of the mentioned link If i start dev env, it says browser does not work in dev And in remote queue is not working...

High latency on certain endpoints, can't get Smart Placement working so far

Hey, I'm experiencing pretty high latencies on certain endpoints on a Worker I'm working on, very probably because the Planetscale DB is in Europe and I'm in Perú (although my cofounder being in Frankfurt/Germany also experiences almost 2s slow endpoints which should be pretty close to the db and therefore faster right?), so I'm experimenting with Smart Placement, but as I'm in Perú I can't manually drive European requests and this Worker is still in dev so there's almost no requests other than...

Correct TypeScript from WorkerEntrypoint Binding

If I have this service below ``` export default class Users extends WorkerEntrypoint<Env> { async fetch() {...
No description

Is it possible to use Cap'n Proto, to deserialize payloads instead of JSON, in Workers requests?

I'd like to know if anyone has been using Cap'n Proto to deserialize binary incoming requests payloads to a Worker before. I'm expecting a high volume of data and I'd need to optimize workers performance to avoid deserializing (and also serializing on the emitter side) from Json as text the payload of each request. I've seen that @kenton is the author of both Cap'n Proto and Workers and that these 2 are used underneath the CF architecture, but I was wondering if it's also possible to use a standalone lib for Workers that can achieve this. Researches didn't bring much information, and also JS libraries for Cap'n Proto are very outdated....

Hono and an empty env variable

I'm trying to run an worker ai using hono. This is my index file: import { fromHono } from 'chanfana';...

PayPal IPN to a Worker always 403

HI,I am using cf worker as a PayPal IPN. Recently I have been seeing lots of 403 errors. My domain was set tls 1.2 as minimum level and 1.3 supported. Besides, I have added IP ranges of PayPal to my WAF. Two Days ago it still worked, and now the error occurred again. I wanna know if you have met the similar issue and what is the solution?:NotLikeThis:
No description
Next