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

Okay this is a dumb one, I think I fixed

Okay this is a dumb one, I think I fixed it. On top of the normal message and close WS handlers, I also had a error one set up, which was supposed to remove the current connection from the list of connections, but wasn't necessarily closing the connection, such as if the client experienced an error, but not one that caused the socket to close. Somewhere, this was causing the socket to stay open or something. You can see a comparison in the screenshots
No description

Anyone else having issues with

Anyone else having issues with websockets not hibernating? Some code that was working fine a few weeks ago is now no longer hibernating the connections

Some methods on my stub are being

Some methods on my stub are being returned as never. Anyone had this before?

hi folks,

hi folks, i'm leveraging DO for a websocket w/ hubernation support, but keen to understand how i can pass on context to my "webSocketMessage". i want to simply pass on the user id of the user into the webSocketMessage handler. when it gets hibernated, it seems to get lost. i'll drop my fairly basic code in a thread....

Cloudflare adapter is unable to export D...

FYI - this is just a heads up regarding Astro and Durable Objects It appears that the current astro/cloudflare adapter is unable to build a worker which exports classes for durable objects This means that even if you use workers assets with Astro, you still can't combine your durable object code with other Astro SSR code in one worker. I have filed https://github.com/withastro/adapters/issues/494 Repro in https://github.com/jldec/astro-do/pull/1...

not that I know of, but you can fetch

not that I know of, but you can fetch https://cloudflare.com/cdn-cgi/trace from the DO to work out where it is and return early if in HKG

Hmm is there some documentation

Hmm is there some documentation detailing this? If we can't make reliable assumptions about memory availability with > 1 DO namespace instance that seems problematic....

Websocket Server with Durable Object Client Connection

Hi, I try build a websocket server with durable object hibernation api, on the server side I think its considered done, but on the client side, how we connect to the durable object using service binding ? I'm using cloudflare pages and want to connect to the websocket server using service binding anyone have code snippet to get address...

Hello 👋 , are there any guides/examples

Hello 👋 , are there any guides/examples on how one might do an transfer migration? We have 5 DOs and we want to split 3 DOs to a separate worker that has a very simple worker bundle leading to faster startup times. I don't see much info on the docs here https://developers.cloudflare.com/durable-objects/reference/durable-objects-migrations/

Hi.

Hi. I'm seeing a strange behavior of wasm in DurableObjects, especially when alarms are used. I saw this exception in logs before we were using alarms (when response was synchronous), but now it started happenning very often. The library used is automerge. After a DO gets into a "broken state", an exception is raised for any library method call in the code produced by wasm-bindgen:...
No description

We have a PR up to Serialize Attachement

We have a PR up to Serialize Attachement back to docs. It will be merged soon

Hey there. Is there any possibility we

Hey there. Is there any possibility we could get a method for hibernatable websockets to set/update the tags on an already established connection? I'm using tags as a rudimentary way to publish messages to subscribers of given topics, and it'd be nice to be able to change a subscriber's topics without needing it to reconnect. I could probably use a serialized attachment for that, but then I'd need to iterate over all connections whenever publishing a message which seems problematic in its own way....

my alarm is still set from 3 days ago, I

my alarm is still set from 3 days ago, I don't see any errors in the logs

access Durable Object Id from within the DO

huh so this works great when I create the durable object. But breaks within the do For example this works...

drizzle with DO SQLite

sort of, i use drizzle kit to manage migrations and a custom query proxy which applies the same types used in drizzle kit to queried results (i.e. int to js date, etc.)

Hi everyone, I'm new to durable objects

Hi everyone, I'm new to durable objects and don't understand much from the front page of their docs. (This seems to be a trend with CF; the docs could definitely be more non-expert-friendly. Reading "without requiring you to build serialization and coordination primitives on your own." on the very first page is quite daunting). I would like to understand what this product is and whether it matches my need. I need something that can power websocket-like behaviour to buld a realtime chat. Previously I've used pusher.com for this. Is that the sort of thing DO is? Or how does it compare to Queues, which, to a layman like me, also sounds sort of like what's needed? Any layman help appreciated! 🙂...

Hello.

Hello.
Locally - I would like to have a module (A) with just a Durable Object (no Worker). Another module (B) has a Worker (could also be a Durable Object). Can the Worker module (B) make an RPC call into DO module (A)? If i try this i get an error...
DataCloneError: Could not serialize object of type "JsRpcPromise"....

Hey 👋 I have a DO based off of this

Hey 👋 I have a DO based off of this https://github.com/cloudflare/workers-chat-demo and its working great.. but client connected sockets timeout (close with code 1006) if no messages are sent after exactly 3 minutes.. is this expected? I have tried calling state.setWebSocketAutoResponse in the DO constructor (not sure how to use this method) but that didn't seem to do much. Do I need to have connected clients send a ping messages to the DO at a regular interval to keep the connection open? If so, does this wake the socket from hibernation (and thus incur a charge)?...

I think I've found a bug in the SQLite

I think I've found a bug in the SQLite backend - calling deleteAll() in an alarm handler results in an internal error, unless I call deleteAlarm() first
Next