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

Worker domain change [urgent]

I had a worker and after deploying a new version the domain changed from "production.<WORKER_ID>.<ACCOUNT_ID>.workers.dev" to "<WORKER_ID>.<ACCOUNT_ID>.workers.dev" without the "production" part. Please help me retrieve the old URL because I have many things pointing to it that I cannot update. I have a business plan in cloudflare and already created the ticket but didn't get any response yet. Please DM me if you're from cloudflare support because live chat does not work

Snippets returning only "There is nothing here yet"

I'm trying to develop a new snippet, but in the preview pane I only get a page with "There is nothing here yet" and a 404 response. I can deploy the snippet and see that it works by adding a new header in the response, so it is working, but it makes it very difficult to develop it.
No description

telegram bot issue wrkr not responding, no logs

I have one bot made the same way in JS that responding fine with telegraf api, but I have tried to build new ones with JS or TS , with hono JS or TS, grammY or without bot API . I tried to make very small project with only one bot.command() but it is not working properly as expected...the /start cmd are always pending and coming randomly all at once...so I have maybe 3 answers per cmd. I figure because I have one working that it should something I'm missing towards the functioning of workers. I pretty much do the same , but the working one is using KV.......

patchCached

I am trying the new @opennextjs/cloudflare but I am having the error below: patchCached file:///Users/xxxxxxxxx/xxxxxxxxx/ixxxxxxxx/node_modules/@opennextjs/cloudflare/dist/cli/index.mjs:6860 throw new Error("Cache patch not applied");...

DurableObjectNamespace losing its type?

I have a worker-configuration.d.ts that looks like this: ``` interface Env { CHATSTORE: DurableObjectNamespace<import("./build/index").ChatStore>; }...

File size limit

Cannot deploy new remix + vite blog app to cloudflare worker because of 1 mb file size limit. Can you please increase to 10mb? Account Id: cd78c815cc8afdc708dedabdcb7ade24

Best way to count own SaaS API limits/usage

Hey, So, currently I'm providing an API through RapidAPI. They deal with billing, users, limits, etc. I'm looking of moving that to Workers instead, and I'll deal with user sign-ups, limits for requests they can make, etc. Ideally, I would like all customer requests to my workers to add a header like "X-Requests-Remaining: 1000", and decrease that every time they GET the worker, with their auth-id. And then have a hard limit, so it responds with HTTP error 403/429 when they've made 1000 requests....

Latency on worker and Durable object

Hi guys, Is the latency between the Worker and the Durable object expected to be around 100-160ms provided that they both are in the same location?...

How to catch websocket closed due to code changes

I have an internal system to count the number of session using KV, and this can break it if there are any active connections when code is deployed. Is there a way to catch this event? As far as I can tell the normal webSocketClose isn't called https://developers.cloudflare.com/durable-objects/reference/websockets/...
No description

Durable opbject bindings?

Do durable objects need to be bound through the dashboard? There's a space for it, but I have no dur

Can Cloudflare Workers Cron Support a 65-Second Script Running Every 2 Minutes?

I have a Node.js script that I need to run periodically, and I'm considering using Cloudflare Workers with Cron Triggers. Here are the details of my use case: 1. Script execution time: 65 seconds 2. Desired frequency: Every 2 minutes 3. Script overview:...

Issue with wrangler dev --remote

I have a new employee, and they are having trouble deploying to remote with workers: ``` Total Upload: 938.60 KiB / gzip: 185.17 KiB ✘ [ERROR] Error on remote worker: APIError: A request to the Cloudflare API (/accounts/.../workers/scripts/just-worker/edge-preview) failed....

Reaching 1MB size limit with nextjs on workers

Hey community / cloudflare team, im trying the new next.js on workers approach (opennext adapter) instead of using next-on-pages but im getting size limit error ```â–² [WARNING] Here are the 5 largest dependencies included in your script: - node_modules/.pnpm/[email protected][email protected][email protected][email protected]/node_modules/next/dist/compiled/node-fetch/index.js - 784.40 KiB...

Error while deploying with Github Integration

I am deploying my workers via github integration and getting this error [ERROR] In a non-interactive environment, it's necessary to set a CLOUDFLARE_API_TOKEN environment variable for wrangler to work. Please go to https://developers.cloudflare.com/fundamentals/api/get-started/create-token/ for instructions on how to create an api token, and assign its value to CLOUDFLARE_API_TOKEN. The API token is specified in the Build settings for my workers so the CLOUDFLARE_API_TOKEN shouldn't be a problem....
No description

Queue in specific/region

Can I let a queue message run in a specific colo/ region? any idea to achieve this

Error on remote worker: APIError: A request to the Cloudflare API

I'm trying to test out a browser deployed on worker in a DO and getting this error ```ts ✘ [ERROR] Error on remote worker: APIError: A request to the Cloudflare API (/accounts/5aa6cae4d0260b6aae9d255f3b63242f/workers/scripts/playground-worker/edge-preview) failed. ...

I am having a problem uploading files to my r2 bucket from my running server in my PC.

I am having a problem uploading files to my r2 bucket from my running server in my PC. I can upload from my notebook, but not on my desktop. Error: Access to fetch at 'https://assets.1bcd53a1084b67fa3ddf1a0699695e41.r2.cloudflarestorage.com/listings/6fbc9c1c0163001bfa55/fb2f1779-dc0f-4a5e-b985-ad3deb6802a3?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=31ebe7697dfe3b67c1dfc8f7deabc836%2F20240928%2Fauto%2Fs3%2Faws4_request&X-Amz-Date=20240928T221701Z&X-Amz-Expires=60&X-Amz-Signature=1fc3a9ba142244b76db925a3563f03a7ce26534621c0624dd56eafa025b4b453&X-Amz-SignedHeaders=host&x-id=PutObject' from origin 'http://localhost:3000' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled. My R2 CORS:...

Worker Environment

When request comes into the worker you have two objects (context and environment). Is environment scoped to the specific reqeust like context or is shared across the requests? Example if I set some unique value on environment, will it stay in that request or it can leak into other requests. Afaik context is scoped to the request and is not leaking (like global scope) across requests in the same worker, but I am not sure if the same is for environment