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

Error on running tests

Hey guys, I am getting this error when running test with vitest. I have set the new_sqlite_classes in migrations but still get this error. I would like to know where exactly to set enableSql = true ? -> To enable it, set enableSql = true in your workerd config for the class. If using wrangler, under [[migrations]] in wrangler.toml, change new_classes to new_sqlite_classes. Note that this change cannot be made after the class is already deployed to production. Thanks in advance...

đź‘‹ I started seeing some illegal

đź‘‹ I started seeing some illegal invocation errors from my logging tail worker. i am currently using the datadog client to forward my tail worker logs to my datadog. i have updated wrangler and the datadog client but the issue still persists. has anyone encountered a similar issue before? Thank you!...

Average worker cost per day 7.86m requests, median CPU time 3293.6ms

That is quite an expensive worker sir, it's not going to be cheap. You also have a very high Median CPU time, which would be your primary cost. I'm assuming you run some type of compute-heavy WASM stuff on there? I recommend investing time into getting this metric down as low as possible. I did some quick ChatGPT math: Requests:10 million included per month + $0.30 per additional million CPU Time: 30 million CPU milliseconds included per month + $0.02 per additional million CPU milliseconds ...

Hey guys, I'm very desperate with a

Hey guys, I'm very desperate with a worker problem that we're fighting with for many weeks now and that the CF support team told me to look on discord from devs for help. Our platform is making a lot of requests to quickbooks API through a cloudflare worker, and we're getting a LOT of 403 errors when trying to fetch quickbooks from the CF worker. We've escalated this pretty high up with quickbooks, but they've debugged this and insist that our request are not hitting their APIs. I have no idea where the 403 may come from. We use WAF for incoming requests, but this should not touch outgoing requests. We ONLY see this happening on production. On local development we never get these errors, even when doing the same workload locally....

Hey all, wondering if anyone could help

Hey all, wondering if anyone could help me figure out some workerd/miniflare/wrangler oddities I'm seeing. It's been going on for a while but I think I'm just starting to realize what's going on: Sometimes on my machine, websocket requests get "delayed" before ever hitting my handler code (doesn't seem related to durable objects, where it eventually ends up, but they don't even hit my regular fetch handler). There seems to be a queue of WS requests that cause a traffic jam -- eventually if I leave workerd/miniflare running for long enough it seems to process all of them and return to normal, but it can be 10-15 minutes before that happens....

I have run into this just now. My

I have run into this just now. My project ~11k lines of code, which is not small but should be supported. Please don't ignore this issue, it's a showstopper!

hey guys! implementing a POC with

hey guys! implementing a POC with workerd by consuming a WASM file. I'm missing how to tell my .mjs entrypoint to basically proxy the request to the WASM binary (proxy request from one module to the other). Why? you may ask. Because this WASM binary is a Go webserver so it knows how to handle them. Can someone point me out in the right direction? I'll leave the files contents in a thread...

At this stage - not looking for anything

At this stage - not looking for anything particularly exotic - a couple of hello worlds plus a bit of branched logic using KV store would suffice for now... just to understand how the capn proto config maps to workerd. Also, I'm unclear how workerd routes incoming requests to specific requests. The cap 'n proto example configs in the gh repo are all about binding to an ip:port whereas inbound requests to workerd are pretty much only going to be distinguishable based on their URI or URI path. I d...

Is there something special you need to

Is there something special you need to do to get local Chrome DevTools profiling working properly? I'm trying the following (with wrangler 3.22.3): * wrangler dev -e test --port 8787 * push 'd' to open chrome devtools, which opens `https://devtools.devprod.cloudflare.dev/js_app?theme=systemPreferred&ws=127.0.0.1%3A9229%2Fws&domain=(REDACTED)&debugger=true * Confirm source files appear under "Sources" tab...
No description

Hi everyone, hope your holidays are

Hi everyone, hope your holidays are going well! I'm building a worker that uses O2O to Shopify and I'm curious how I can debug this locally. I use fetch(request) which forwards the request on to the origin (Shopify) but locally it it won't know where the origin is. If I overwrite the url to fetch from Shopify it will hit my worker in production. How are others working around this w/ O2O?...

Working on it as we speak 🙂 (https://

Working on it as we speak 🙂 (https://github.com/cloudflare/workers-sdk/tree/bcoll/vitest-pool-workers/packages/vitest-pool-workers) not quite ready for release yet but getting there. 🙂 Hoping to do an initial pre-release in the next few weeks, or early next year.

The 2nd one doesn't seem to affect

The 2nd one doesn't seem to affect anything, but the first one seems correlated to these logs for failed requests happening in production
No description

https example

would it be possible to get an example of an https server (ie, with valid tlsOptions specified) in workerd?