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
NHnikhil | helius.dev4/22/2024

Hey guys, seeing this error when adding

Hey guys, seeing this error when adding a new durable object for the first time: Cannot apply new-class migration to class AtlasWebsocket that is already depended on by existing Durable Objects [code: 10074] I am adding this for the first time and I don't see it in use at all in console. This is what I have in the migration ...
Cchronark4/18/2024

since 2 days ago I'm getting a ton of

since 2 days ago I'm getting a ton of internal error and Network connection lost. errors when calling my durable objects. they don't have particularly high load and it happens to many different instances, not just one there's no useful error to help me fix it unfortunately...
GSGagan Suie4/10/2024

WS debugging chat

Thats it for the error message but this is the web socket error event object: `Event {isTrusted: true, type: 'error', target: WebSocket, currentTarget: WebSocket, eventPhase: 2, …} isTrusted : ...
VVincent4/9/2024

Amazing, @Frederik — thanks for

Amazing, @Frederik — thanks for confirming it's an issue on your end, and we're looking forward to a fix! 🙏
Bbun4/7/2024

FlareUtils Types Bug

/// <reference types="@cloudflare/workers-types" /> and ^ this works...
Ddakom4/1/2024

@bun - okay, things are working, though

@bun - okay, things are working, though I haven't properly tested all the expires stuff and whatnot... and again, I do plan to move all this into a full proof-of-concept repo with working demo etc. Anyway, some stuff in 🧵 ....
CCat2/14/2024

Hey all - I'm having quite a lot of

Hey all - I'm having quite a lot of trouble with WebSockets and Durable Objects in production. I believe I've narrowed the cause down to a KV put (not transactional storage). With it disabled, it seems to work decent enough, but with it enabled, it causes the websocket message processing to hang. It also seems to be getting worse over time. This is not the case when running locally.
Mmilan2/6/2024

In this case you could also use

In this case you could also use serializedAttachment on that particular WebSocket, assuming you haven't used up all the space with other stuff
Ssty1/18/2024

closing old websocket server instances without errors

im trying to implement a ping pong logic combined with an ip rate limiter i created a Map() like so ```js // Retrieve or initialize ipInfo for this IP...
Mmilan1/10/2024

Getting tags associated with a Hibernatable WebSocket

Also, random question but if we support this.state.getTags(webSocket) for hibernatable websockets, would y'all want it to throw an error if you give it a non-hibernatable websocket? Or would you just want it to give you an empty array?
UUnsmart12/21/2023

DO in rust, using (asyn) storage

Dont know anyone who uses rust for DOs that would be able to help but on javascript you run this.state.blockConcurrencyWhile(async () => { ... })
Bbkyerv11/18/2023

I'm working with Cloudflare Workers and

I'm working with Cloudflare Workers and Durable Objects (DO) and have a question about handling request forwarding. Specifically, I'm trying to understand the best way to forward request configurations such as the HTTP method, headers, and other details to a DO worker. Is there a specific API or method in Cloudflare Workers for directly forwarding these request configurations to a DO? Or do I need to manually extract these details from the incoming request, create a new request object with these values, and then pass this object to the DO?...
OOttomated11/1/2023

Sure -

Sure - The Durable Object handles websocket clients for a multiplayer game using a deterministic physics engine. The physics are executed on both the clients and the server. Serializing the physics world costs up to a few KB per player. To join games, I have a lobbies table in D1 with a game_state column: 'waiting' | 'playing' | 'finished'. I need to set the game to the finished state when it's abandoned, so if the player rejoins the websocket later, it won't re-initialize the DO. ...
HBHarshil Bodara10/27/2023

@omar#4289 same as, I am getting the

@omar same as, I am getting the same issue, I have explained my issue
No description
Ssathoro10/3/2023

hmm never had this happen personally

hmm never had this happen personally
PSPaul Shriner10/2/2023

OK I have read through the last three

OK, I have read through the last three months of discord and searched, and am still coming up empty. I am using itty-router-openapi to serve paths. I have only been getting KV pairs and that seems to work just fine in my worker. I would like to get a Durable Object called User: ```durable_objects.bindings = [...
DDanTheGoodman9/22/2023

I cannot figure out this typing error

I cannot figure out this typing error
No description
DDanTheGoodman9/22/2023

IIRC there is no way to launch a promise

IIRC there is no way to launch a promise in a durable object (from a request) in such a way that does not block a response? For example I am trying to ship logs from a custom logger async to loki, but i don't want that to block responding to a request
DDanTheGoodman9/14/2023

Hey I think someone is attacking our DOs

Hey I think someone is attacking our DOs:
MMatt5/20/2023

```

``` const MINUTES = 60 * 1000 export class NanoID { constructor(state, env) {...
Next