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

mailchannels and static forms

I am using mailchannels plugin as detailed in this documentation https://developers.cloudflare.com/pages/functions/plugins/mailchannels/ Right now, it works but all the information from my contact form is in the body of the email and the subject of the email is set to default as "New contact form submission" (see pic) since I am using the attribute data-static-form-name="contact" per documentation I want to set the reply to email set to the senders email address. Was reading through mailchannels api from here and it seems like there is a reply to in the personalizations https://api.mailchannels.net/tx/v1/documentation...
No description

/__scheduled won’t connect

I can't figure out how to run a cron job on wrangler. I have scheduled default export, and wrangler running with --test-scheduled. It will not connect to localhost:8787/__scheduled. Copilot proposes that I run it in ts-node, but Im using to fetch access tokens from paypal and store it in kv.

Queue binding to a deployed queue from my machine?

We would like to interact with queue bindings from scripts on our machine. How would we go about achieving this? We have a worker binding to the queue working but that is limited to use in a deployed worker or wrangler locally.

workers.dev spam

My workers are receiving a lot of spam lately on the workers.dev routes. Should they be disabled or is there a better way to handle it?

Problems with wrangler when developing worker in Rust

I have a worker that's written in Rust and I'm trying to run it locally with npx wrangler dev. During compilation of my code I get this error ``` /home/alexander/.npm/_npx/32026684e21afda6/node_modules/wrangler/wrangler-dist/cli.js:29573 throw a; ^...

Tail Worker Error Handling

Hi all, If tail worker fails while sending logs to remote endpoint, what happens? Is it retried? Or just log error and skips those events?...

workers.api.error.entitlement (Code: 10014)

cloud flare worker error is server down? workers.api.error.entitlement [code: 10014]
If you think this is a bug, please open an issue at:...

Error when trying to do a wrangler publish with environment

This was working 10 hours earlier with no code change, and suddenly today I am not able to publish my app. ✘ [ERROR] A request to the Cloudflare API (/accounts/xxxxxxxxxxxxxxxx/workers/scripts/api-router-dev) failed. workers.api.error.internal_server [code: 10002]...

Durable Object websocket keeps failing to connect

Not sure whats happening but today the websocket is not connecting at all. Getting this error in the browser: WebSocket connection to 'wss://dev.api.mage.stream/wsinit/channelid/<REDACTED-ID>/connect' failed:...

Reading a 5 MB file from Worker

I am new to cloudflare workers . I am trying to read a 2 MB csv file from R2 and return some columns from that file . For each request I dont want to read the entire file. I want them to read it once per worker so that it can reuse the same read contents . Is it possible to achieve that ? I am able to access R2 using env variable which I dont want to do it for every request? How can I do that?

Prepared Statements don't seem to be working

I did post about this in #d1-database , but not sure if this is a better place for it - https://discord.com/channels/595317990191398933/992060581832032316/1227027355898220646 ```js router.post('/:brand/:slug', async (r,e,c) => { const brand = r.brand;...

D1 false type-safety using TypeScript

As explained here: https://developers.cloudflare.com/d1/build-with-d1/d1-client-api/#typescript-support ``` D1 client API is fully-typed via the @cloudflare/workers-types package, and also supports generic types as part of its TypeScript API. A generic type allows you to provide an optional type parameter so that a function understands the type of the data it is handling. When using the query statement methods stmt.all(), stmt.raw() and stmt.first(), you can provide a type representing each database row. D1’s API will return the result object with the correct type....

Worker calling it self

Hey what is the best way for a worker to call it self as of now? I'm doing this to get over the 1000k sub-requests limit per request.

I am getting error while running the curl command word worker ai speech to text

when i am trying to run this command "curl.exe https://api.cloudflare.com/client/v4/accounts/accountid/ai/run/@cf/openai/whisper -X POST -H "Authorization: Bearer apitoken" --data-binary "@fma.mp3"" i am getting this error "{"errors":[{"message":"InferenceUpstreamError: InferenceUpstreamError: ERROR 3001: Unknown internal error","code":1000}],"success":false,"result":{},"messages":[]}" i have replaced the account id and api token here.

Mailchannels Issues

Hello. I have tried everything I can and still cannot get mail channels to work. I am not exactly sure what to do anymore at this point. I followed the mail channels plugin from this documentation https://developers.cloudflare.com/pages/functions/plugins/mailchannels/ What I've done: Set up DNS records Set up my DKIM Keys...
No description

Vitest type error in Github Actions and eslint

error: Cannot find package "cloudflare:test" from "
error: Cannot find package "cloudflare:test" from "
For some reason in both Github Actions and eslint it's failing to load the types, with the above error for both....

Workers Websocket Send Message on External Event

Hello! I'm looking for an elegant solution (if possible) to run a websocket and simultaneously allow external events to be sent to (all) websockets e.g. when a POST request is sent to the worker. Situation: I want to run a websocket (easy part) and have it be able to send messages when a separate request or event happens outside of that websocket session (hard part). I thought about using a queue and having the websocket listen for messages on the queue, or maybe having a global state or event emitter or literally anything but I can't think of a very good solution to this problem. Any suggestions?...

Any recommendation for a good boilerplate for Workers project?

I understand this is quite subjective, but there is a world between the cloudflare-create samples and something actually useable. I'm interested in a starter app similar to the task one, but with JWT Auth and Database integration?...