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

Missing apis for worker versions?

I am working to setup deployment workflows, deploying preview versions with alias. I got everything setup and its working great! However, I cannot find any apis to get, delete or list these uploaded versions. When listing deployments from this endpoint: https://developers.cloudflare.com/api/resources/workers/subresources/scripts/subresources/deployments/methods/list/...

An internal error occurred. Please retry your build. If this problem persists, contact Cloudflare

Hey folks, I've been constantly seeing this in cloudflare builds, in a lot of my CI runs. 🙁 Organization ID: b75ee9798c9c48a874af240b29724270 ID of One example Build with the issue: 8b86c4a4-8f9a-4ce4-941d-459c782e1cde ...

Shared secrets across workers

I wanna build a monorepo of multiple workers and wondering if it's possible to provide the path to the .dev.vars file or its directory in the wrangler config? Something like this: ```json {...
No description

Is it possible to invoke API for a private Worker using HTTP Service bindings?

Is it possible to make arbitrary API requests from the frontend to the backend using the worker's HTTP Service Bindings? In a typical use case, it is known that a request to a worker can be forwarded to another worker. It is also stated that arbitrary requests can be made by providing a fully qualified URL as shown below. via https://developers.cloudflare.com/workers/runtime-apis/bindings/service-bindings/http/...

Recurring Cloudflare Workers Error 1101 with Random I/O Exception

Hi, we are experiencing recurring errors with our Cloudflare Workers and we can’t pinpoint the exact cause. In the browser, this message appears: ...

Workers bot traffic / exposing workers.dev url in production

So I have two workers that I'm using at the moment, one purely for front end (migrated from pages) and one for a backend API/logic. Is this the wrong pattern or architecture? Should it all be in one? I got an email saying my API had a spike in bot traffic, and was wondering how to protect against that - and if I go to production is exposing the workers.dev url the way to do it, or how is it meant to be done?...

Caching a Vercel endpoint using cloudflare workers

We are trying to simply cache a nextjs endpoint hosted on vercel. We are using the standard code from the docs (https://developers.cloudflare.com/workers/examples/cache-api/): ``` interface Env {} export default {...

Workers-KV Slow Response time

Hello I have a Cloudflare Worker that fetches data from a KV store and I am finding the response time of most requests to be quite slow, often taking around 1 second. Please note that I am doing a get and put operation in the worker, this is because I need to get/retrieve a user ID (Key) first from KV then update the data/value. Could there be a better way to find a key and update it without performing the get and put operation? If this workflow is standard practice, are the response times from Cloudflare normal? Please check the following screenshots of some Postman API calls to the Worker, please note the response times...
No description

"Error: Network connection lost" when calling fetch, Works fine in CURL and Browser

So when I call
fetch('https://wslgis.water.co.nz/arcgis/rest/services/Services/WastewaterComb/MapServer/2/query?f=json&geometry=%7B%22xmin%22%3A1752242.4364089235%2C%22ymin%22%3A5939768.593982927%2C%22xmax%22%3A1752548.184522064%2C%22ymax%22%3A5940074.342096068%7D&maxAllowableOffset=0.5971642834777837&orderByFields=OBJECTID&outFields=OBJECTID%2CPROCESS&outSR=2193&quantizationParameters=%7B%22extent%22%3A%7B%22spatialReference%22%3A%7B%22latestWkid%22%3A2193%2C%22wkid%22%3A2193%7D%2C%22xmin%22%3A1752242.4364089235%2C%22ymin%22%3A5939768.593982927%2C%22xmax%22%3A1752548.184522064%2C%22ymax%22%3A5940074.342096068%7D%2C%22mode%22%3A%22view%22%2C%22originPosition%22%3A%22upperLeft%22%2C%22tolerance%22%3A0.5971642834777837%7D&resultType=tile&returnExceededLimitFeatures=false&spatialRel=esriSpatialRelIntersects&where=1%3D1&geometryType=esriGeometryEnvelope&inSR=2193')
fetch('https://wslgis.water.co.nz/arcgis/rest/services/Services/WastewaterComb/MapServer/2/query?f=json&geometry=%7B%22xmin%22%3A1752242.4364089235%2C%22ymin%22%3A5939768.593982927%2C%22xmax%22%3A1752548.184522064%2C%22ymax%22%3A5940074.342096068%7D&maxAllowableOffset=0.5971642834777837&orderByFields=OBJECTID&outFields=OBJECTID%2CPROCESS&outSR=2193&quantizationParameters=%7B%22extent%22%3A%7B%22spatialReference%22%3A%7B%22latestWkid%22%3A2193%2C%22wkid%22%3A2193%7D%2C%22xmin%22%3A1752242.4364089235%2C%22ymin%22%3A5939768.593982927%2C%22xmax%22%3A1752548.184522064%2C%22ymax%22%3A5940074.342096068%7D%2C%22mode%22%3A%22view%22%2C%22originPosition%22%3A%22upperLeft%22%2C%22tolerance%22%3A0.5971642834777837%7D&resultType=tile&returnExceededLimitFeatures=false&spatialRel=esriSpatialRelIntersects&where=1%3D1&geometryType=esriGeometryEnvelope&inSR=2193')
Or any URL for that domain I just get Error: Network connection lost. without any explanation....

Secret "MY_SECRET" not found

I'm trying to use secrets store locally by running wrangler dev --x-remote-bindings but when I try to access my secrets using env.MY_SECRET.get() I get a secret not found error. Note that when I run wrangler dev --remote, everything works fine...

@opennextjs/cloudflare v1.6.3 .open-next/assets/index.html Bug?

I get a clean build in my local dev environment with "opennextjs-cloudflare build && opennextjs-cloudflare preview --port 8789" but the generated file ".open-next/assets/index.html" references the wrong chunk files. Is there possibly a bug here in v1.6.3 (latest as of this writing). For example, .open-next/assets/index.html refers to webpack-b0bd85f5ab45543e.js. However, this file is not in the build; rather, webpack-57c771ad3d897bce.js is there instead (in .open-next/assets/_next/static/chunks/). I chose the webpack file for this example because there's only one of them. I'm also getting this error for about 30 other chunk files. The browser gives me a 404 error for webpack-b0bd85f5ab45543e.js and renders nothing, and the curl command shows a 404 as well but returns a bunch of unrelated gibberish. The browser pulls up webpack-57c771ad3d897bce.js correctly, as does curl....

*previewurl.workers.dev : how to disable from wrangler.toml ?

hello, I found that we can disable the main workers.dev domain
workers_dev = false
workers_dev = false
, but not those "preview" one. I cannot find the way to do it from wrangler.toml unless by triggering the dashboard api. is there a way to do so inside wrangler config file ?...

worker and favicons

i have my title set up in the html file and the image files for the favicons are in my github repo but the images themselves are not appearing in the final build
No description

cannot create worker project

I'm trying to create a new workers project from a private GitHub repo. I can choose the repo, and get the "Set up your application" page. But after filling out the Project name, Build command, and Deploy command, pressing "Create and deploy" has no effect. It seems to do nothing at all. I've tried both Arc and Firefox, with no luck.

Workers Builds: How to set a package manager?

In my repository, I'm mainly using Bun as the package manager. However, I need to deploy a subdirectory which is using npm (because of irrelevant reasons). Unfortunately, it still detects bun and tries to install dependencies with bun instead of npm, causing the build to fail. I tried setting BUN_VERSION=0 which failed because it tried to install bun@0. I also tried setting "packageManager": "npm@..." in package.json, but it ignores it. Ended up skipping dependency installation using SKIP_DEPENDENCY_INSTALL=1 and then use npm install && npm run build as build command. This sometimes work, sometimes doesn't......

worker list files

How do I access list array of pictures in r2 bucket? Any good examples?

Migrating an Eleventy (11ty) site from Pages to Workers

I have 2 projects on CF Pages and, from what I've read, Workers has "nearly all" of the functionality of Pages and I've also read that Workers will continue to be developed whereas Pages perhaps not so much. I see that there are several guides for migrating for various frameworks. But I do not see any instructions for migrating Eleventy sites from Pages to Workers. I attempted to use the instructions for Astro, but did not succeed. Does CF have plans to write up instructions for this? Or if anyone has done this and has either written a blog post about it or has instructions that will work, I'm all ears. Thanks for listening....

Issue with wrangler deployment

Am trying to deploy my hono app using GitHub actions wrangler. But any time I create a cloudflare token including selecting the Edit Cloudflare Workers template, am getting an error: ⛅️ wrangler 4.26.1...

Cloudflare does not create Preview URLs for Workers

Why is that? Am I missing something? It seems that for PRs, cloudflare does deploy to production.
No description