Skip to content

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

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

fix(NQE): WebSocketApi.js send() no-ops on CLOSING/CLOSED#9418
eordano wants to merge 1 commit into
devfrom
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.


Supersedes #9404: moved from the fork into the org repo so CI workflows receive repository secrets (fork PRs do not).

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 requested review from a team as code owners July 17, 2026 13:35
@github-actions
github-actions Bot requested a review from anicalbano July 17, 2026 13:35
@decentraland-bot decentraland-bot added the ext-contribution Identifies a contribution which was not initiated by a Unity Developer label Jul 17, 2026
@github-actions

github-actions Bot commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

badge

Build skipped — no changes detected under Explorer/.

@github-actions

Copy link
Copy Markdown
Contributor

Slack notification sent to #explorer-ext-contributions for external review.
To re-send, delete this comment and re-add the ext-contribution label.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ext-contribution Identifies a contribution which was not initiated by a Unity Developer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants