Skip to content

fix(NQE): WebSocketApi.js send() no-ops on CLOSING/CLOSED#9404

Closed
eordano wants to merge 1 commit into
decentraland:devfrom
eordano:chore/clean-ws-send-closed-noop
Closed

fix(NQE): WebSocketApi.js send() no-ops on CLOSING/CLOSED#9404
eordano wants to merge 1 commit into
decentraland:devfrom
eordano:chore/clean-ws-send-closed-noop

Conversation

@eordano

@eordano eordano commented Jul 17, 2026

Copy link
Copy Markdown
Member

UNITY-EXPLORER-NQE (904 evts/15 users): ClearScript ScriptEngineException "WebSocket state is 3, cannot send data" bubbling out of SceneFacade.UpdateLoopAsync. The scene-facing JS WebSocket shim threw on any non-OPEN state; a scene calling send() after close (state 3 = CLOSED) threw once per tick and each was reported to Sentry. Per the WHATWG spec, send() on CLOSING/CLOSED silently discards; only CONNECTING is an error. Make CLOSING/CLOSED a no-op. NOTE: StreamingAssets JS ships with the build — takes effect next client build, not hot-patchable. Unverified.

UNITY-EXPLORER-NQE (904 evts/15 users): ClearScript ScriptEngineException
"WebSocket state is 3, cannot send data" bubbling out of SceneFacade.UpdateLoopAsync.
The scene-facing JS WebSocket shim threw on any non-OPEN state; a scene calling
send() after close (state 3 = CLOSED) threw once per tick and each was reported to
Sentry. Per the WHATWG spec, send() on CLOSING/CLOSED silently discards; only
CONNECTING is an error. Make CLOSING/CLOSED a no-op. NOTE: StreamingAssets JS ships
with the build — takes effect next client build, not hot-patchable. Unverified.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>



Production evidence (decentraland Sentry, archive snapshot 2026-07-17):
- UNITY-EXPLORER-NQE: 652 events / 14 users, last seen 2026-07-16
@eordano

eordano commented Jul 17, 2026

Copy link
Copy Markdown
Member Author

Superseded by #9418 — branch moved into the org repo so CI workflows get repository secrets.

@eordano eordano closed this Jul 17, 2026
@eordano
eordano deleted the chore/clean-ws-send-closed-noop branch July 17, 2026 13:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant