cloudflare / cloudflare/workers-sdk

🐛 Bug Report — WebSocket Client Connection Hangs

Open
#11,006 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
4.5k
Forks
1.5k
Avg merge
3d 8h
Merged PRs (30d)
187

Description

### What versions & operating system are you using?

wrangler@^4.42.2

### Please provide a link to a minimal reproduction

https://github.com/preschian/test-workers-assethub-kusama

### Describe the Bug

# WebSocket Client Connection Hangs in Cloudflare Workers

## Summary

WebSocket client connections hang indefinitely in Cloudflare Workers when connecting to certain endpoints (Kusama Asset Hub), while others work fine (Polkadot Asset Hub), despite using identical code and both endpoints being publicly accessible.

**Important**: This code has been working fine for years, but suddenly started hanging around October 6th, 2025. No changes were made to our code - this appears to be a Workers runtime regression.

## Reproduction

```bash
git clone https://github.com/preschian/test-workers-assethub-kusama
cd test-workers-assethub-kusama
bun install
bun run dev
```

Then test:
- `curl http://localhost:8787/polkadot` ✅ Works fine
- `curl http://localhost:8787/kusama` ❌ Hangs indefinitely

## Expected vs Actual

- **Expected**: Connection succeeds or throws clear error
- **Actual**: Hangs indefinitely with no error, no timeout, no response

## Question

Why does one WebSocket endpoint work while structurally identical ones hang? Both Polkadot and Kusama use the same technology (Substrate framework).

---

**Repository**: https://github.com/preschian/test-workers-assethub-kusama

### Please provide any relevant error logs

_No response_

Contributor guide

Open the contributing guide

Research direction

Clone preschian/test-workers-assethub-kusama, run bun install and bun run dev, then compare curl requests to /polkadot and /kusama. Trace the WebSocket client path used by both endpoints and determine why the Kusama connection hangs; done means it connects successfully or returns a clear error without hanging.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
backend, cloud
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.