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

Your Worker exceeded the size limit of 1 MiB. Refer to

When I deploying get this error ā€”ā€” Failed to publish your Function. Got error: Your Worker exceeded the size limit of 1 MiB. Which plan should i buy?...

mail channels suddenly not working?

Today I started getting 401 errors whenever my app tries to send an email using the mail channels api on pages

Help with email workers

Hello, where i can find docs about email workers? Or examples I want to get: Email from and to Email Subject and Text e.t.c...

Workers & Pages Section Error with Infinite Loading Circle

Hi everyone, Iā€™m encountering an issue with the Workers & Pages section in the Cloudflare dashboard. Whenever I try to access it, I get an error message at the bottom of the page (screenshot attached), and when I click on a worker, the loading circle just spins indefinitely without loading the worker. Has anyone else run into this problem, or could someone guide me on how to resolve it? Iā€™ve tried refreshing the page and clearing the cache, but no luck so far....
No description

Not getting R2 file contents body from inside Worker

I can download a file from the console, so I can confirm the contents are there. From the shown worker code I do get back a file object, it just doesn't have a body. Any ideas? Thank you for any pointers... const content = await c.env.DEVME.get(fileName); if(!content) { return c.json({error: "File not found"});...

Headers with dots in the key are removed when I make a fetch request from a worker

I'm trying to call an API that requires me to put 4 specific headers in the request with a dot in in the name I correctly add the headers When I run it locally everything works. Then I deploy and it gives an error. ...

Cron trigger fails with no logs emitted

I have a cron trigger that runs every 5 minutes. It works fine running locally with wrangler, but once deployed, it always fails immediately (~2ms). I have no insights into why it's failing either because no logs are shown. I have realtime logs and logpush set up but they remain empty. I have another cron trigger that succeeds but likewise shows no logs. How can I see the logs from a cron trigger?...
No description

Tail Workers and Additional Event Data

Is it possible to add additional data to events passed to a Tail Worker? For instance, I have multiple workers stitched together with a unique UUID. For instance, a scheduled worker kicks off and generates a UUID and sends messages to a queue consumer with the UUID as part of the message body. That queue also generates console.log messages. So, I've got two workers that are dealing with a single UUID and I'd like to use that data in my Tail Worker. Is there a way to add the UUID to something that will have it bubble up into the TailItems object? Otherwise, I need to add the UUID into the console.log messages and parse them out. It would be nice if extra metadata could be added to the TailItems's event node. Is this possible in any way?...

Request from worker to worker fails

Hello, I have two workers. One of them is scheduled cron job which is suppose check health of another worker (api) every 6 hours. When I hit my api from the web app or postman it replies and everything is fine but in that scheduled cron worker requests to api are failing Iā€™m getting 404ā€™s. Iā€™m using public url (ending *.worker.dev) to hit api from scheduled worker. What am I doing wrong ?...

Is RFC 8441 (Websockets over HTTP2) supported by Cloudflare Workers?

I'm considering using Cloudflare Workers for an app which requires low latency websocket connections to work well (a simple TCP proxy). Are Websockets over HTTP2 supported? If it works, it would reduce my app's latency by a few hundred ms. It's not a deal breaker if this doesn't work, but I'd at least like to know this beforehand.

pg example not working

I followed the example from the Cloudflare documentation for connecting to Postgres using node-postgres / pq at the link: https://developers.cloudflare.com/hyperdrive/configuration/connect-to-postgres/#node-postgresā€“pg. However, I encountered the error ā€œthis.stream.once is not a function.ā€ According to this compatibility matrix (https://workers-nodejs-compat-matrix.pages.dev/), nodejs_compat_v2 should support the .once method on streams. Is there a related issue or a step I might have overlooked? My code is based on the documentation, and you can view it here: https://github.com/waigel/example-pg-cloudflare. Any suggestions or help would be appreciated!...

Wrongly Reported as Phishing

Hello, I need assistance with my app project. I developed a cloudfare worker function yesterday and today it has been reported as "phishing" by anonymous (I received an email about it). I responded to Cloudflare's abusereply support but haven't received a response from them yet....

Check total size of worker?

How can i check the total deployed size of a worker?

Best practice for local development with multiple workers using RPC bindings?

Hello. I'm having a hard time trying to test multiple Workers locally that collaborate using RPC bindings (and Queues, Durable Objects, etc...)? Can i use wrangler, or do i need to use miniflare? Or am i forced to deploy remotely? Is there any doc or good examples that detail how to accomplish this? Thank you....

Fake phishing abuse reports

Hello, I need assistance with my website. Anonymous individuals are submitting abuse reports on one of my siteā€™s pages, causing Cloudflare to display a warning to users visiting that page. This is damaging our site's reputation with new users, as it suggests that the site has been reported for phishing, even though no evidence is provided in the reports and the site does not do that. Cloudflare's abusereply support is very slow to respond, so I'm looking for a solution to prevent this from happening again....

How to use React frameworks with Cloudflare workers?

I need my worker to handle some server side rendering therefore I would like to use a framework like Next.js. However I could not manage to find some documentation on how to use it with Cloudflare worker, only with Cloudflare pages.

Setting DO script_name only in dev?

Hey folks, in order to work with Durable Objects with getPlatformProxy, you must use a separate worker and script_name. That's all fine, but is there a way to ensure the script_name is only set in dev, since that seems to have an effect in prod too? ``` [durable_objects] bindings = [...

Can an external http client make an RPC call to a Worker?

I would like to externally make RPC calls to Workers (mostly for testing) using something like Postman or curl. I'm hoping some general gateway like this exists... ``` curl -X POST https://worker-url.com \ -H "Content-Type: application/json" ...

ERROR Could not resolve "cloudflare:workers"

Refactoring our working WebSockets to use Durable Objects with RPC methods. Using the Durable Object sample to start with no errors or warnings. But on build: āœ˜ [ERROR] Could not resolve "cloudflare:workers" ...
No description