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

Edge runtime for crypto functionality different from Node.js

I am trying to build a solution using Telegram oAuth. This requires some small amount of crypto transformation for validation from Telegram's servers. Recommendations which work use Node.js' crypto methods. I was able to convert these to crypto.subtle equivalents. Unfortunately, these crypto.subtle functions create different results when using Node.js vs. Cloudflare's Workers edge runtime. If anyone has suggestions, I would appreciate it. Below is my TypeScript code. ```typescript // Node.js original code: const key = createHash('sha256').update(BOT_TOKEN).digest()...

Worker route not working

Hey, I've created a worker and want to have dynamic subdomain based routing like - *.app.domain.com. I did everything and it's working in local, but in live it's created the route and all but it's not able to be browsed. ```ts import { Hono } from 'hono'...

Trigger worker build from webhook

I'm using Cloudflare Workers to deploy a website built with Astro. I have setup the gitlab integration and when I push changes to the repo, it creates a new build and deploys it. My question is: Can I also trigger a build from the CMS I'm using through a webhook or similar? I've searched the on multiple places in the docs but couldn't find anything that answered this question....

Support for Ubuntu 20.04 LTS - workerd compatibility with GLIBC 2.31

I'm running Cloudflare Workers on Ubuntu 20.04 LTS, which ships with GLIBC 2.31. When trying to run the local development server (workerd), I'm encountering compatibility issues as workerd requires GLIBC ≥2.32. While I understand there are workarounds (using miniflare, Docker, or upgrading Ubuntu), many developers and organizations still use Ubuntu 20.04 LTS as it's supported until April 2025. Are there any plans to provide workerd binaries compatible with GLIBC 2.31 to support Ubuntu 20.04 LTS users? This would help developers who are required to stay on LTS versions for stability or compliance reasons....

Specifying a method for a worker route

Hello! I am using workers to run a specific script for a specific method at a given route (for example website.com/specific-route). In order to to this I currently run this check in the worker:...

Multiple assets bindings within a single worker

Hi, is 1 worker restricted to having 1 assets binding? I want to serve up different UIs with different ACLs that I apply in my worker & dispatch based on route dynamically but the assets binding in wrangler.json doesn't appear to be an array like other bindings typically are. I understand why that doesn't work when 'run_worker_first' is ever false but certainly when it's true it could be allowed. I just want to double check that this is indeed a limitation of static assets currently.

No log display after using static assets

I'm trying to convert a project I wrote in JS to TS, but when I made the changes, there were no more logs on the worker's log page, and even the request records themselves (such as log records like "GET URL") were not displayed. However, when developing locally or debugging with the web editor, the logs are normal. Does anyone know why? https://sub.schwi.workers.dev/ 我正在尝试把我用JS写的项目改为使用TS,但当我修改完成后,在worker的日志页面就再也没有日志了,甚至不会显示请求记录本身(例如“GET URL”这样的日志记录),但是本地开发状态下或使用网页编辑器调试时,日志却是正常的,有人知道这是为什么吗? any more information needed, please reply, thanks...
No description

Photon module usage

I need to use photon module to resize images stored in clouldflare R2 in my nuxt project. But I can't install photon npm package. How can I resolve this ?...

Client disconnected

I have observed multiple instances of Client Disconnected invocation errors on my Worker. As I understand it this is caused by the client disconnecting (link) . All my requests come from the same source and 99.5% of them are successful. Each call also takes no more than 2 seconds to execute attached is a sample request which never finished executing. How do I recreate this and fix this?
No description

r2 custom domain with worker to setup OpenGraph Data for URL

Is it possible to setup a worker so that for example if i post a r2 bucket link to make the worker show some open graph data in the link would i need to setup a seperate subdomain for that or can i just setup a worker on my current subdomain thats configured for my r2 bucket

I can't connect Github to Cloudflare

I am using Cloudflare workers to host Nuxt project. I connected Github to Cloudflare but just got 404 pages not found issue. Hope quick help! 🙏...

Hono + Workers + Browser rendering: How to screenshot a localhost path?

Hi 👋🏼 I'm following this example at https://developers.cloudflare.com/browser-rendering/workers-binding-api/screenshots/ How do I point puppeteer to this page for the screenshot? Is there a trick to get the "localhost" from withing the worker? ...

ENOSPC: no space left on device when build

I'm following to OpenNext docs: opennext.js.org/cloudflare/get-started and build NextJS latest with workers then happen this error:
No description

Supabase project linking completely broken

When you click "Integrations" and click "Supabase", after the OAuth, you get this error: 400: {"message":"grant_type: Required"} See this recording to see it happen 😢...

When a custom domain is added for CF worker it changes the host URL

When I added a custom domain to my CF worker It changes host name in the browser URL. Url for my worker is https://wf-worker.support-c31.workers.dev/ However, I have added this custom domain wfweb.whoisfreaks.com. Attached is an image of worker code. PLease look into this issue.
No description

All Cloudflare Snippets are throwing errors

Error 1101 Worker threw exception there's nothing on the cf status page informing about this issue. and no one discusses it here, so I need info about why is this happening to all our snippets. ...

Whats the best route to take to build PR previews?

Whats the best route to take to build PR previews? I already have it set to rebuild on a merge to main, but when a dev puts in a PR I want a preview build to be generated

Question about workers-mcp and "Unsupported content type: undefined" error

I've been experiencing issues using my deployed mcp servers from Claude Desktop. When I make an http request to the server, the server returns a json object with the expected format. When I try to call a tool in my Claude client, and can see from the logs using wrangler tail that a successful post request was made. However, no matter what I try, I keep seeing a "Unsupported content type: undefined" error. Does anyone have any experience building mcp servers using workers-mcp and know the proper...
No description

Workers Plan stuck on Free Plan - Cannot upgrade to Workers Paid

I was on a Workers Paid plan some time ago, then downgraded it, and now I want to enable it again. I can't do this because of a Workers -> Plans state bug. It says "Your current plan" on the Paid plan, which is not true - I disabled it a while ago. Can someone unstuck me from this situation? I don't have any unpaid invoices. On March 15th, I issued a case for support without an actual response (just a general auto-response that solves nothing). Case number: 01429354
No description

Extremely High Wall Time (900k ms) in Cloudflare Queues + Browser Rendering

While developing a Cloudflare Queues consumer worker integrated with Browser Rendering (@Cloudflare/puppeteer), we observe abnormally high wall time (~900,000 ms) despite normal CPU usage. The worker functions correctly but appears to hang due to potential asynchronous blocking. ```typescript // consumer worker/index.ts import puppeteer, { Browser } from '@cloudflare/puppeteer';...
No description