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

Custom Domain seems to behave differently.

I am trying to enable a custom domain on Workers, which works fine (DNS-wise). But when I open the URL I get a 500 internal server error for the custom domain, but not for the workers.dev domain, which works as intened. For confidential reasons, I cannot share the URL. The worker applications connects to a headless cms, using graphql and server side fetch. Environment is exactly the same, so I guess my question would be if there is anything that behaves differently behind a custom domain instead of the workers.dev domain? Something that would cause certain fetch actions to behave differently which might cause the errors?...

wrangler tail --version-id does not show any logs

I am trying to look at logs for a specific Worker version that is not yet deployed (to debug/validate before going live) and tried using
wrangler tail --version-id <version>
wrangler tail --version-id <version>
...

metroCode undefined

I'm having an issue with the metro code being undefined (request.cf.metroCode). I've cloned and uploaded https://github.com/cloudflare/docs-examples/tree/main/workers/geolocation-hello-world as is, and no matter what ip address i've tested with, it's always undefined. I can confirm that maxmind has the correct data for the tested ip addresses. Is there anything that I'm missing that needs to be defined within wrangler.jsonc to enable this? Or am I missing something that's absent from the example?...

cron schedule every few seconds

Is it possible to schedule a worker to be invoked every 15 seconds for example? https://developers.cloudflare.com/workers/configuration/cron-triggers/ This syntax is considered to be invalid...

How to purge cache for workers.dev?

I have a worker that is currently under development and only available via *.workers.dev, not connected to a domain. I am trying to purge cached content for it but have not been successful. The worker makes basic fetch() calls to origin that (seem) to get cached. There is nothing in the Cloudflare Dashboard that I could find (only the cache purge for domains which this worker is not)....

Wrangler is trying to bundle 'fs'. Why? even if I excluded it.

So i am using sveltekit template with to develop app for workers. One of my packages has required('fs') but it is false-positive. I tried to exclude it from vite build by using: ``` fs: fileURLToPath(new URL('./src/empty-module.js', import.meta.url)), path: fileURLToPath(new URL('./src/empty-module.js', import.meta.url)), os: fileURLToPath(new URL('./src/empty-module.js', import.meta.url))...

Error code 10013 - An unknown error has occurred

When I try to deploy or delete a worker through api I receive an unknown error. The problem occurs with cli commands also.
{ "result": null, "success": false,...

Cloudflare Pages - Server error (5XX) in Google Search Console

Hi folks, i'm running on Cloudflare Pages with static Astro.dev page from Github pipeline and this started to happend in Google Search Console couple of weeks ago. Some of the pages throw "Server error (5XX)". Nothing in Cloudflare settings seems to be visible / no allerts. It's hard to identify what is blocking Google Crawler to request pages. Pages are indexed in Google and after inspecting via Google Search Console they response properly...
No description

Chunked HTTP response support

Do Cloudflare workers/containers support when the container returns Transfer-Encoding: Chunked ?

Uncaught Error: No such module "node:http2".

hey yall, im building a vercel mono repo. In my package i have an client api with hey-api library (https://heyapi.dev/). The output of the heyapi genrates is in a package and im importing that package in one of my workers to call but im running into this error. Any way to debug this? Or understand why. please help thank you! my wranger.jsonc ```json...
No description

Image binding CPU Time

Hello, I have a worker that's using R2 and Images bindings to composite a single image from layers. Previously this was all done with a sub request to the image transform via url and I had very little CPU time but I wasn't able to test the transforms using the preview URL so switched to bindings. Is the Images binding and transform/output calls whats contributing to my CPU time? I would have thought that would be just wall time? Is there a way this can be made more efficient?...

i get an "EACCES: permission denied, scandir '/lost+found'" error when trying to build

hello! this is my first time trying to have my own website, so please bear with me if i don't know/understand anything obvious (or if this is in the wrong channel) :) i'm trying to build a simple website using html, css and js. i have a .xyz domain that i connected to a free cloudflare plan, but after i added my github repo to a cloudflare worker and tried building, i get the EACCES: permission denied, scandir '/lost+found' error. i searched for a solution but couldn't find anything so i'm hoping that i can get some help here :D i'm not sure if i need to attach any code, so if it's needed just ask :)...

Why can't my tail worker ever complete its job and why does it get terminated by CF quietly?

I have a very simple tail worker, see code below: ```javascript export default { async tail(events: TailEvent[], env: any, ctx: ExecutionContext): Promise<void> { let sequenceNumber = 0;...
No description

"internal error" error while using service binding.

Hi, I have two workers. One worker (Worker A) is trying to make an API call to another worker (Worker B). I have enabled the service binding where I have bound Worker A with Worker B, and when I'm trying to call the API, I'm getting this error log in Worker B: internal error; reference = 01d9n3paq7mnnnamd35rml8p. This is how I'm calling the API: await env.data_injection_worker.fetch(aktoReq);....

Wrangler deploy throwing error 10013

Hi, When deploying an app to a worker using Wrangler deploy or a new app through Cloudflare dashboard using a worker template, every build fails with the error code 10013 since yesterday. The full error message that gets returned during deploy: ```...

Run payloadcms on cloudflare worker

Hi, I'm trying to run payloadcms on worker but it's not working, I'm using opennext with payloadcms. Is there anyway I can run payloadcms on worker?

Dynamic Require Error

Hi I've built a project where I'm importing @solana/web3.js in my APIs. I have nodejs_compat on. However I'm getting an error of dynamic require that's causing an internal error: Dynamic require of "node:buffer" is not supported\n at functionsWorker-0.8285285433039806.js:8:9 Is there a solution or workaround for this? Or do I need a node.js runtime? ...

Incorrect `.env` file with Vite deployment

Hi all, My aim: - Cloudflare preview links to run with .env.development file - Cloudflare production deployment to run with .env.production file...

Custom Headers with Worker Fetch

I'm trying to interact with the Walmart API using fetch from a Queue consumer. The API requires I provide some custom headers which are not x-prefixed. It seems that Cloudflare's fetch strips these headers. Is there some way I can avoid this? Thanks!

i keep getting redirected to error page when i try to access workers

For the past hour ive been getting this instead of the workers page view
No description