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

The "path" argument must be of type string or an instance of URL

I'm trying to port our Hono backend to CF workers. Everything seems fine util I start the dev server: ```...

how can i update my worker version?

i can't see ant button created deployment, so how can't i deploy new version for worker ???
No description

workers cron stopped

4 hours ago all my scheduled workers stopped triggering events. It stopped at the same time all my workers with scheduled. i tried to redeploy and removing and adding back again but still it doesnt works. I check my limits and I am far from reaching my plan limits.

Precompressed Brotli File in Workers Static Asset is not decompressed properly

Previously I have been putting .js.br file in Cloudflare Pages (React+Vite, linked to git and run build script in Pages) I'm migrating to Workers, but when I put the same file in public folder, even with _headers (same as when using Pages) set to: ```...
No description

Delete pages project, script error

Hello, I need to delete one of my project with more than 100 deploys. I use the script they give to delete all deployments, as usual but... even this throw an error ^^"...
No description

Pages + Workers | /functions folder with SvelteKit is not working

I'm developing an app using SvelteKit and I'm deploying it via github -> cloudflare pages. I have a /functions folder at the root of my project but cloudflare does not seem to be picking it up. I tried adding a postbuild script in my package to try and move functions into the output but that didn't work. My function is at /functions/api-submit-resource.js (originally was /functions/api/submit-resource). It had an export Default { async fetch() } method but I tried export async function onRequestPost(context) since it wasn't working. I'm not really sure where to put my functions folder since Cloudflare isn't picking up the folder and I can't move it into the svelte output folder since cloudflare will be building it on their server. What should I do? At the current I have a worker function and a pages worker, on different domains (api is on <mysite>.<me>.workers.dev and the svelte app is on <mysite>.pages.dev), which technically works, but I'd rather it all be on one project....
No description

Preview URLs gets disabled (automatically?) for no apparent reason

Hey everyone, I have a github repo set up with automatic deployment and Preview URLs on PRs. Recently, the setting for preview urls in the project settings gets disabled without me touching it. I'm guessing there's an automation or a rule or something that gets it to disable but honestly not really sure how to tackle that. I have to manually get to project settings and turn it back on. Any ideas how to even debug that?

openai call 403 error

I use cloudflare workers. And inside my sveltekit app, i call openai api it returns Error: 403 Country, region, or territory not supported sometimes. ...

Email failed: internal error; reference = teo4evnoo4cs5dt7fsd97a1q

Getting error using the send_email function to send an email to users with the email_form = myapp.worker.dev Also in cloudflare free version how to read worker logs?...

Workers HTTP/2 support?

Is it right that Workers do not support sending fetch requests with HTTP/2? Apple's push notification service (APNS) is requiring that.
Use HTTP/2 and TLS 1.2 or later to establish a connection between your provider server and one of the following servers.
When sending a normal fetch request I get this error: Error: Network connection lost. I think this is because Apple drops all non-HTTP/2 requests. Anyone who can help me out?...

Workers, react-router 7, vite, and wasm

I've been working on a blog that uses wasm for og:image generation and mdx for posts, all powered by workers. Been a lot of fun to noodle on, but I've found a strange bug that I'm trying to understand. If I try and prerender here, I get a wasm file error. ``` import type { Config } from "@react-router/dev/config"; import { init } from "./app/lib/mdx-routes.js";...

Puppeteer: How to install package from WebUI?

Dear, Because of restrictions in our environment I can only create workers online and not locally. Is there a way to install the @Cloudflare/puppeteer package from the vs-code WebUI? ...

Which Cache Method to use at when? Which one take precedence?

So there are two way to custom CDN cache behavior. There is a way to cache using fetch API (https://developers.cloudflare.com/workers/examples/cache-using-fetch/), so this subrequest would become cachable. There is also a Cache API (caches.default), and an example usage that looks like this https://developers.cloudflare.com/workers/examples/cache-api/. It is also used by some popular Cloudflare Workers framework (like hono's hono/cache https://hono.dev/docs/middleware/builtin/cache). So my question is, which one should I use at when? If I do both, i.e. set cf.cacheTtl when fetching a subrequest, where that subrequest route is actually cached by caches.default. Now what happens?...

Cloudflare Secrets Open Beta

Hey! We love using Cloudflare Secrets. I know its in open beta, but is there anything on the roadmap for expanding the 100 secrets limitation?...

Dynamic wildcard routing with Pages?

I want to serve my static website through Cloudflare pages and have 4 wildcard urls routed to my Kubernetes cluster. Currently, my static website is served from a Docker container in my Kubernetes cluster, and Cloudflare proxies to my cluster's ingress IP address. All my DNS is managed in Cloudflare. One approach, I thought, would be to create a new subdomain, backend.apex.tld, and use Cloudflare URL Rewrite rules, to send the 4 wildcard routes to the K8s cluster, and all other traffic routed to Cloudflare pages. However Cloudflare URL Rewrite rules do not allow dynamically routing to a different hostname....

Worker return 1101

Since 29 September my worker start return 1101 error, worker used to upload files to R2 and looks like: ``` if (request.body === null) { return response400(requestContext.request, "Missing request body");...

Getting waitUntil warn in logs, even though I don't have one in the worker.

Getting this warn log: "IoContext timed out due to inactivity, waitUntil tasks were cancelled without completing." But I don't actually have any waitUntils. The worker uses browser rendering, if that has something to do with it

Is it safe to put my env variables during build time?

I have a next application that I am trying to deploy on cloudflare workers. Im confused about whether it is safe to put my env variables like DB_URL during build time...

I have sveltekit app and it use openai api. I deployed on workers.

But when the user reload the page after call api(which call openai api inside) before openai api return result, that api cannot hear result from openai. How could i treat this?

Need Serious Help: Migrating off realm-web (MongoDB App Services EOL) to run with Cloudflare Workers

Hey all I had a Worker that used realm-web to talk to MongoDB (Atlas App Services). With App Services / Device Sync / Data API now deprecated/EOL, my endpoint is effectively dead. I need a supported way to access MongoDB from Cloudflare Workers. Goal: Keep my Worker as the public endpoint, keep MongoDB Atlas as the database, and replace the Realm/Data API path with something that’s actually supported and reliable. ...
Next