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

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

get wall time of cron job?

how can i get the wall time of my cron job

worker limit

hi is the request per day limit on all the workers or every worker it self like 1000req/min across all workers or ...

resetting password

When I click forgot password it never sends me an email it’s been like this for 2 weeks and now my domain has been suspended can anyone help

RPC dispose not available?

Hey folks, I'm calling an RPC worker locally from a Cloudflare Astro project, 11.0.4 on the CF Astro adapter, Wrangler 3.74.0 When I call an RPC method, I get this:
An RPC stub was not disposed properly. You must call dispose() on all stubs in order to let the other side know that you are no longer using them. You cannot rely on the garbage collector for this because it may take arbitrarily long before actually collecting unreachable objects. As a shortcut, calling dispose() on the result of an RPC call disposes all stubs within it....

Cron Exceeded CPU Limit

I have a cron that's getting a Exceeded CPU Limit error around the 30s mark. The code simply does DB fetch requests and should not be using this much CPU time, unsure why it does. However besides that issue the worker CPU time limit should be 15 minutes, not 30 seconds. Why does the cron request not run for longer? This is the error I see in wrangler tail logs:...
No description

[Help needed] CloudFlare Worker Rollback - Can't View deployed code

After rolling back to a pervious version, how can one view the code for the Active deployment? Clicking "Edit" shows the code for the Latest deployment - not the one you rolled back to (ie. the Active one) I've searched for ways on Google, ChatGTP etc with not luck. ...

Worker Typescript test debugging in VS Code

I have the most basic of cloudflare vitest test setups and want to be able to debug my tests in VS Code.
As per this CloudFlare doc on configuring vitest tests for workers in Typescript, https://developers.cloudflare.com/workers/testing/vitest-integration/get-started/write-your-first-test/ I have package.json, typescript / vitest configuration matching what's described in that doc....

Since worker size limit is 1 MB, i reckon a typical web application must have multiple workers

Do you know any open source template which demonstrate how multiple workers sit along with single frontend react app. If it has sample auth setup , that'd be great.

Does sleeping/delaying count as CPU time?

For the sake of billing and timeout limits does "sleeping" or doing something like await new Promise(r => setTimeout(r, 60000)); count as CPU time. Like would a worker that uses this code be billed for 60000 ms of execution? If not is there a limit to how long we can sleep to keep a worker going? I have an API that needs to be polled and I want to know if workers can be used for it....

best structure to adopt for TS+python worker

i currently have a typescript worker with d1 db and i am looking to add some python as it is just more convenient than having to rewrite it in ts (it's complex math) i am unsure about the way to set this up, should i create another unrelated worker? is it possible to "merge" them two?

Email worker error (reconstructing FROM address)

HI all, Im currently seeing an issue that I just cannot get my head around... I have a catch-all address set up to send to Duck Email protection which gives a @duck address. When this comes back filtered of trackers the original email From address is sent back in a "[email protected]" and id like a worker to convert this back to the original address before forwarding on to my main account. I have come up with the following code however I am getting fetch errors and the emails are either not coming through or coming through with the incorrectly formated senders email still. They do however show up correctly on the cloudflare overview page for the domain. ...

Lower number of requests to SvelteKit app on CF pages

I have a SvelteKit app that I'm deploying using CF pages (or workes? still confusing). However requests to build artifacts (/_app/*) still get counted towards the requests usage quota. Is there a way to lower that? The app is pretty simple: * Static pages (homepage, contact us, etc)...

Can't deploy and save my worker

I get this error: API Request Failed: PUT /api/v4/accounts/account-id/workers/services/black-forest-flux-generator/environments/production?include_subdomain_availability=true (403) Is there some restriction on using this model that's hard coded in the cloudflare service and so it gives 403, or what?...

Hi, Where can I find the https credentials and ftp credentials in Cloudflare account?

I am managing a new site, I have neve use cloudflare, so I am not sure how it works. I would like to check these credentials to have them on record. Can you help me?

Cache external requests

Hey folks! I have a SvelteKit app deployed through Pages (so my server endpoints are counted as Workers from a CF perspective). In my page server load function (+page.server.ts) I have this:...
No description

Worker Analytics Engine query on local

Hey, so i am testing this feature locally but how i can query the data since on the https://api.cloudflare.com/client/v4/accounts/:account-id/analytics_engine/sql shows no tables