clockworklabs / clockworklabs/SpacetimeDB
`Buffer is not defined` breaks the server and requires a restart
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 25.2k
- Forks
- 1.1k
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 46
Description
I tried using Buffer via TypeScript in a reducer, which leads to this error:
2026-03-22T23:09:47.147341Z INFO crates/core/src/host/v8/error.rs:549: view "fullQuests" runtime error: Uncaught ReferenceError: Buffer is not defined
If that happens, then any new client connection attempt fails with this in the logs:
websocket: Rejecting connection for unknown ip with Identity c20064b9d275e79049c4cd76858403d5537054182d8aa0f59dc70914943ddba0 and ConnectionId 4f23e42b22214747e8378b420cd7f774 due to error from client_connected reducer: Connection rejected by `client_connected` reducer: The instance encountered a fatal error.
After restarting the sever, clients can connect again.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the V8 runtime error reported at crates/core/src/host/v8/error.rs:549 and trace how a TypeScript reducer using Buffer affects the client_connected reducer. Reproduce the failure, then verify that a Buffer-related reducer error does not leave the server unable to accept new client connections without a restart.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust, typescript
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100