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

Cloud Connectors broke out from under us

I have used a URI Rewrite and Cloud Connector for a long time to distribute updates for our native app via Sparkle. The same app was able to check for updates yesterday, but today the Cloud Connector is not working. We did not change anything about our configuration. When I run Trace, it shows the Cloud Connector being activated, but the response is not from the GCS bucket. Is there a better way to debug this?...

Limits when converting from free to paid for plan

I've just updated my subscription from free to paid-for but I keep getting an error for hitting the 50 subrequests limit. Is there a migration time before the new limites will go in effect? Will the limit apply to existing workers or do I need to create a worker from scratch to have the new limits applied?...

workerd/server/workerd-api.c++:961: error: wrapped binding module can't be resolved

Trying to run wrangler dev, results in an instant crash: ``` ⛅️ wrangler 4.22.0 ─────────────────── Your Worker has access to the following bindings:...

"Hello World" sample worker returns ERR_NAME_NOT_RESOLVED

I'm trying out Workers for the first time and created one from the Hello World sample. When I try to access it, at https://plain-frog-b829.orb-389.workers.dev/, my browser displays ERR_NAME_NOT_RESOLVED. Here is the content of the Worker: ```export default { async fetch(request, env, ctx) {...

Worker hanging up during request?

cloudflare worker is getting hung up on a fetch i make again, not sure why. ```js async knock(){
console.log("knocking...");...

How to provide correct document link to AUTORAG ai search?

The aisearch() response takes the document.name as the link of actual document caused broken/invalid link reference in the response markdown, while I have provided the valid link in the content as well in the customMetadata mentioned in the docs ``` await env.R2.put(pathname, content, { customMetadata: {...
No description

Access to Google Cloud Tasks from Workers via Workload Identity Federation

I want my worker to schedule a task into Google Cloud Task, but i don't know how to configure it. I've searched for tutorial but only found for AWS or Github Actions. Is it possible to do it with cloudflare workers? Reference: https://cloud.google.com/iam/docs/workload-identity-federation...

How to use Cloudflare Browser Rendering and Cloudflare Workflows in one worker during development?

Hello, I have created a worker that uses browser rendering and workflows to generate a pdf file in the background. When I ran wrangler dev, the browser rendering requires the --remote flag but when I ran wrangler dev --remote the workflow didn't work because workflows does not support wrangler dev --remote according to docs. Anyone had experienced this and is there a solution to this problem? Thank you.

How to include another handler (scheduled, email) in a Worker based on a framework such as Svelte?

Hello! I'm experimenting with a new Svelte app built on Cloudflare Workers instead of Pages, and my understanding is that doing do, I can use other handlers such as an Email, Queue or Scheduler Handler. My problem is that, the app is mainly a Svelte app, so@sveltejs/adapter-cloudflare automatically creates the output file to Cloudflare Workers, with the fetch handler. Is there a good way to add other handlers in this setup?...

Trying to create a worker that fetches the size of my R2 bucket, and reports it on the website.

Hi all, I asked ChatGPT if it could do exactly what the title says. It gave me all the code to do so, and I filled in the areas that need to be done. But after deploying both the worker and website via Pages it won't work. My website reports a CORS error in the console, and I get an error 1101 with the logs of my worker stating env.MY_BUCKET.list(...) is not a function or its return value is not async iterable....
No description

Worker exceeded CPU time limit

We’re encountering issues where Workers perform reliably for a while but eventually start failing with the error: Worker exceeded CPU time limit. I’m trying to better understand how CPU time consumption is calculated. I’ve reviewed the documentation at Cloudflare Workers CPU Time Limits https://developers.cloudflare.com/workers/platform/limits/#cpu-time, but I still have a few questions: 1) If a DurableObject sets an alarm, does the alarm callback continue consuming the same CPU time budget, or does it receive a fresh, separate budget? 2) In the case where a Worker is being non-stop invoked via RPCs, does each invocation receive a seperate CPU time budget? Or does the Worker need to be inactive for a period before its CPU time budget resets? If a cooldown or reset period is required, what is the duration?...

Workers Static Pages - Dashboard or Wrangler

Hello, I'm attempting to deploy a static site built with zola, and as this is a new project, as per recommendation in Pages docs I'm trying to use Workers instead of Pages. I already have a repo on GitHub with the site, and I added a wrangler.toml with some basic configuration as per migration docs, so name, compatibility_date, routes (a single pattern with custom_domain = true), assets.directory = "./public/", and build.command set to install and run zola build (as per this issue). I went to Cloudflare Dashboard > Compute > Workers & Pages > Create > Workers > Import a repository > Get started, connected to GitHub (org), and after I selected the repo the next step asked me for details of the project, but it said it will create a new Git repo for it. That was a bit confusing, but I went ahead to see what it would do, and it turned out it didn't actually create a new git repo, but used the one I had. However it also didn't seem to pick up any of the settings in my wrangler.toml as the domains and routes use the default workers.dev domain, etc....

CfSocket is not a constructor

I am trying to connect a postgres database via Hyperdrive inside Cloudflare Worker with Hono. and I tried to follow this docs: https://developers.cloudflare.com/hyperdrive/get-started/#_top ```ts const client = new Client({...

The Workers runtime canceled this request because it detected that your Worker's code had hung and w

hey there, my rust worker start throwing this error since few days , before everything worked fine but now i get this id: 01JYJD6116YXXQN7KTHK3M165D request id: 9550e2d61c07eeba...

Upload file to R2

Hey guys im using Cloudflare Workers to upload a pdf to R2. im not getting any errors at all. i have the binding setup properly. nothing pops up in my R2 bucket. so weird. any input? ``` /* 1. Get bytes */ const pdfBytes = await pdfRes.arrayBuffer();...

Bun's `fetch` crashes local Worker

Whenever a request is made using bun's fetch, it crashes my local Cloudflare worker (Miniflare). I came across this open issue on Bun's github repo, which seems related, but based on the behavior, it feels more like a problem on miniflare side rather than Bun itself. Client output: ``` error: The socket connection was closed unexpectedly. For more information, p...

How do I disable the Wrangler banner in the CLI

The R2 command output has the banner if an update is available, is there a flag to remove it?
No description

Embedding via REST endpoint

@cf/baai/bge-base-en-v1.5 ...is reaaaaaally slow. is it because I'm on the free tier?...

`EMFILE: too many open files` during build

Anyone happen to know anything about the EMFILE: too many open files error with workers builds? I see a bunch of people posting about it in the past, but none of them have any replies. Basically, I'm trying out workers builds for a full-stack site built with SvelteKit, hoping to eventually move my Pages projects to workers since Pages is basically abandoned at this point, but I'm getting this error. I've retried many times and have gotten that error every time. Build works fine locally. Any help with this would be greatly appreciated....

Api call 1003 error

Hey there! on a worker that we have, we are making an API call to a domain. Most of the times it works fine, the api responds correctly, but a portion of our requests, lets say 1 out of 10, we get an error which says 1003. From what i understand, cloudflare returns this error for direct IP address call, which is not allowed, but this is not the case. Has it happened to anyone else, or do you have any output on this?...