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

how to define the existance of secrets in wrangler.jsonc?

i have been wondering how to use worker secrets for over a week now and i thougt i made it work but turns out it was just a fluke can someone please tell me how can i define worker secrets in wrangler.jsonc so that typescript doesn't scream at me and also they actually work?...

Is it possible source map a handled exception stack trace from a tail worker?

Is it possible source map an exception stack trace from a tail worker when the exception is not an unhandled exception? We have use cases where we need to handle exceptions from the perspective of the originating worker (i.e. we have batch requests where parts can fail, but we want to handle them and complete the overall requests). In those cases, we log the exceptions to a tail worker via a diagnostic channel, but we don't get mapped stack traces which makes them difficult to debug. I'd love to be able to explicitly map those stack traces from a tail worker....

Root directory does not restrict builds for pages

Hello! I have a monorepo with several pages sites in it. However, setting the root directory for each deployment is not restricting deployment. As a result, every push builds every site. Is this expected? Documentation suggests that the builds should only fire if the given "root directory" / subdirectory has changes between builds. I am using the GitHub integration if that is relevant information Any explanation would be greatly appreciated!...
No description

browser adds If-Modified-Since header and cache.match func (from Cache API) doesn't run

Hello! Following this basic tutorial: https://developers.cloudflare.com/workers/examples/cache-api/ When i reload a URL in an incognito tab, the browser adds If-Modified-Since header to the request. The cache is automatically hit without running the worker and executing the cache.match(cacheKey); function. Is this behaviour normal?...

Navigation timeout of 30000 ms exceeded

I am using the browser rendering tech which has its limitations, but has stood up pretty well, with the exception of one thing. I am getting the above error. Here is the use case. I have the HTML of an email that I am trying to render as a screenshot. The files can be big but not enormous especially compared to other pagesizes. Images have remote call to get them, but even they are smaller because the standard protocol for emails it to keep filesize small....

Browser rendering api max timeout

Hi there, I need some clarification. With the Browser Rendering API, using keep_alive set to 600000ms extends the idle timeout to 10 minutes, but does the overall session lifetime also remains capped at 10 minutes regardless of activity? Thanks!

Image processing library?

I have a Worker function that uses Browser rendering and Puppeteer to capture a screenshot. I want to convert the image to 8bit grayscale. Usually I would use a library like imagescript, upng-js but it didn't work with workers. What is the best way to achive this?...

"Error: Network connection lost." on SSE subrequest idling for 100 seconds between events

Cloudflare worker when deployed will throw an error: "network connection lost" when reading from a sub request stream with fetch() if therres more than 100 seconds between server sent events. this behavior isn't documented anywhere and is quite frustrating. i was able to reproduce this to happen every time by: 1. create a simple nodejs service that sends SSE chunks back. wait 2 minutes between chunks. 2. run the nodejs service locally and use ngrok to get a url forwarded...

Smart Placement Not Working

We are hosting our database in us-east-1 (aws via Planetscale) and are trying to run our backend on Cloudflare Workers. Even though our worker is configured with smart placement and has received ~13k requests over the past few hours, smart placement still does not seem to be triggering, resulting in horrendously slow response times from the west coast (~3s for 10 serial DB calls within the worker) ```...

An unknown error occurred. Contact your account team or Cloudflare support: https://cfl.re/3WgEyrH

Hello, I connect to GitHub, ok But when I select the worker repository, I have this error :
An unknown error occurred. Contact your account team or Cloudflare support: https://cfl.re/3WgEyrH.
An unknown error occurred. Contact your account team or Cloudflare support: https://cfl.re/3WgEyrH.
...
No description

Is workers AI free plan for commercial use?

I discovered cloudfare workers AI had an EXTREMELY generous free plan and i was wondering whether there was a catch or restrictions or anything but couldnt find any and can anyone tell me if there is and whether i can use it for commercial use?

node.js worker

Hallo i have been trying to deploy a simple node.js worker and i can not get it to work, error after error. I use supabase, express, nodemon and cors. https://github.com/MaxMadeleine/Dream-Movies-Backend/settings...

console.log Errors When Using Worker Static Assets

Hello. I am creating a Worker + Assets application using worker static assets. However, when using static assets, console.log does not output logs correctly. Even more strangely, sometimes the logs are output correctly, and sometimes they are not. I don't understand the difference between the two cases. One thing is certain: when I'm not using static assets, the logs are reliably output, but when I am using static assets, it's a matter of chance. I'm guessing, but could this be related to the deployment process? ...

Image transformations via workers on same origin

I have a cloudflare pages project deployed with a custom domain on sub.domain.tld, since pages functions don't support image transformations I've deployed a standalone worker under the route sub.domain.tld/media*, transformations are working as expected for images from different origins but when requesting a publicly available image from the pages project origin (e.g. sub.domain.tld/image.png), the subrequest with the transformation options fails with error 9421: Too many redirects, what...

3mb exceeded error

I have my functions folder only of 7KB, I am still getting this issue again and again

Multiple workers in different subdomains of same domain

Hi! I have 2 workers, worker1 and worker2 both created with CLI, one is a Hello World with Worker only and one is a Hello World with Worker + Assets. I wanted to set up custom domain for both (eg. worker1.mydomain.com and worker2.mydomain.com ) note that the mydomain.com in my example is also managed through Cloudflare under the same account...

Caching for Workers

Hi, I set up a custom and simple worker to allow access for public files but deny access for user uploaded files. ```typescript export default { async fetch(request, env, ctx): Promise<Response> {...

How to delete worker assets?

Is it possible to delete an previous uploaded assets? The docs only mentions uploading assets....

I am either crazy... or I found a subtle/silent way to break queue producing

Hello. I will do more digging into this as I am able... but wanted to share in case someone can provide direction for how to gather more details: - I have a worker that consumes from Queue A and produces into Queue B - That worker reaches out to supabase using the supabase-js library - After the supabase upsert/select... the env.QUEUE_B.send() method ends the invocation...

Limits for paid workers

I'm sorry beforehand if this question is 'stupid' but I am a bit confused, the worker has 3 days, is it consuming more than the covered by the paid workers?
No description