fix(browser): complete extension relay handshake on connect.challenge#22571
Closed
pandego wants to merge 3 commits intoopenclaw:mainfrom
Closed
fix(browser): complete extension relay handshake on connect.challenge#22571pandego wants to merge 3 commits intoopenclaw:mainfrom
pandego wants to merge 3 commits intoopenclaw:mainfrom
Conversation
Contributor
Author
|
Follow-up fix pushed for CI stability:
Local validation run:
|
mdjahid11978-design
approved these changes
Feb 21, 2026
7df8591 to
af52d6b
Compare
5e6e302 to
404a2e5
Compare
Contributor
|
Landed on What landed from this PR (adapted for current relay architecture):
Note: I intentionally did not land the unrelated SHA mapping:
Thanks for the fix direction, @pandego. |
wanjizheng
pushed a commit
to wanjizheng/openclaw
that referenced
this pull request
Feb 27, 2026
…ndling Bind relay WS message handling before onopen and add non-blocking connect.challenge response support without forcing handshake waits on current relay protocol. Landed from contributor @pandego (PR openclaw#22571). Co-authored-by: pandego <7780875+pandego@users.noreply.github.com>
wanjizheng
pushed a commit
to wanjizheng/openclaw
that referenced
this pull request
Feb 27, 2026
…ndling Bind relay WS message handling before onopen and add non-blocking connect.challenge response support without forcing handshake waits on current relay protocol. Landed from contributor @pandego (PR openclaw#22571). Co-authored-by: pandego <7780875+pandego@users.noreply.github.com> (cherry picked from commit 03e1b2a)
wanjizheng
pushed a commit
to wanjizheng/openclaw
that referenced
this pull request
Feb 27, 2026
…ndling Bind relay WS message handling before onopen and add non-blocking connect.challenge response support without forcing handshake waits on current relay protocol. Landed from contributor @pandego (PR openclaw#22571). Co-authored-by: pandego <7780875+pandego@users.noreply.github.com> (cherry picked from commit 03e1b2a)
wanjizheng
pushed a commit
to wanjizheng/openclaw
that referenced
this pull request
Feb 27, 2026
…ndling Bind relay WS message handling before onopen and add non-blocking connect.challenge response support without forcing handshake waits on current relay protocol. Landed from contributor @pandego (PR openclaw#22571). Co-authored-by: pandego <7780875+pandego@users.noreply.github.com> (cherry picked from commit 03e1b2a)
wanjizheng
pushed a commit
to wanjizheng/openclaw
that referenced
this pull request
Feb 27, 2026
…ndling Bind relay WS message handling before onopen and add non-blocking connect.challenge response support without forcing handshake waits on current relay protocol. Landed from contributor @pandego (PR openclaw#22571). Co-authored-by: pandego <7780875+pandego@users.noreply.github.com> (cherry picked from commit 03e1b2a)
wanjizheng
pushed a commit
to wanjizheng/openclaw
that referenced
this pull request
Feb 27, 2026
…ndling Bind relay WS message handling before onopen and add non-blocking connect.challenge response support without forcing handshake waits on current relay protocol. Landed from contributor @pandego (PR openclaw#22571). Co-authored-by: pandego <7780875+pandego@users.noreply.github.com> (cherry picked from commit 03e1b2a)
execute008
pushed a commit
to execute008/openclaw
that referenced
this pull request
Feb 27, 2026
…ndling Bind relay WS message handling before onopen and add non-blocking connect.challenge response support without forcing handshake waits on current relay protocol. Landed from contributor @pandego (PR openclaw#22571). Co-authored-by: pandego <7780875+pandego@users.noreply.github.com>
r4jiv007
pushed a commit
to r4jiv007/openclaw
that referenced
this pull request
Feb 28, 2026
…ndling Bind relay WS message handling before onopen and add non-blocking connect.challenge response support without forcing handshake waits on current relay protocol. Landed from contributor @pandego (PR openclaw#22571). Co-authored-by: pandego <7780875+pandego@users.noreply.github.com>
mylukin
pushed a commit
to mylukin/openclaw
that referenced
this pull request
Feb 28, 2026
…ndling Bind relay WS message handling before onopen and add non-blocking connect.challenge response support without forcing handshake waits on current relay protocol. Landed from contributor @pandego (PR openclaw#22571). Co-authored-by: pandego <7780875+pandego@users.noreply.github.com>
wanjizheng
pushed a commit
to wanjizheng/openclaw
that referenced
this pull request
Feb 28, 2026
…ndling Bind relay WS message handling before onopen and add non-blocking connect.challenge response support without forcing handshake waits on current relay protocol. Landed from contributor @pandego (PR openclaw#22571). Co-authored-by: pandego <7780875+pandego@users.noreply.github.com> (cherry picked from commit 03e1b2a)
wanjizheng
pushed a commit
to wanjizheng/openclaw
that referenced
this pull request
Feb 28, 2026
…ndling Bind relay WS message handling before onopen and add non-blocking connect.challenge response support without forcing handshake waits on current relay protocol. Landed from contributor @pandego (PR openclaw#22571). Co-authored-by: pandego <7780875+pandego@users.noreply.github.com> (cherry picked from commit 03e1b2a)
wanjizheng
pushed a commit
to wanjizheng/openclaw
that referenced
this pull request
Feb 28, 2026
…ndling Bind relay WS message handling before onopen and add non-blocking connect.challenge response support without forcing handshake waits on current relay protocol. Landed from contributor @pandego (PR openclaw#22571). Co-authored-by: pandego <7780875+pandego@users.noreply.github.com> (cherry picked from commit 03e1b2a)
wanjizheng
pushed a commit
to wanjizheng/openclaw
that referenced
this pull request
Feb 28, 2026
…ndling Bind relay WS message handling before onopen and add non-blocking connect.challenge response support without forcing handshake waits on current relay protocol. Landed from contributor @pandego (PR openclaw#22571). Co-authored-by: pandego <7780875+pandego@users.noreply.github.com> (cherry picked from commit 03e1b2a)
vincentkoc
pushed a commit
to Sid-Qin/openclaw
that referenced
this pull request
Feb 28, 2026
…ndling Bind relay WS message handling before onopen and add non-blocking connect.challenge response support without forcing handshake waits on current relay protocol. Landed from contributor @pandego (PR openclaw#22571). Co-authored-by: pandego <7780875+pandego@users.noreply.github.com>
vincentkoc
pushed a commit
to rylena/rylen-openclaw
that referenced
this pull request
Feb 28, 2026
…ndling Bind relay WS message handling before onopen and add non-blocking connect.challenge response support without forcing handshake waits on current relay protocol. Landed from contributor @pandego (PR openclaw#22571). Co-authored-by: pandego <7780875+pandego@users.noreply.github.com>
6 tasks
hughdidit
pushed a commit
to hughdidit/DAISy-Agency
that referenced
this pull request
Mar 1, 2026
…ndling Bind relay WS message handling before onopen and add non-blocking connect.challenge response support without forcing handshake waits on current relay protocol. Landed from contributor @pandego (PR openclaw#22571). Co-authored-by: pandego <7780875+pandego@users.noreply.github.com> (cherry picked from commit 65d5a91) # Conflicts: # CHANGELOG.md # assets/chrome-extension/background.js
steipete
added a commit
to Sid-Qin/openclaw
that referenced
this pull request
Mar 2, 2026
…ndling Bind relay WS message handling before onopen and add non-blocking connect.challenge response support without forcing handshake waits on current relay protocol. Landed from contributor @pandego (PR openclaw#22571). Co-authored-by: pandego <7780875+pandego@users.noreply.github.com>
robertchang-ga
pushed a commit
to robertchang-ga/openclaw
that referenced
this pull request
Mar 2, 2026
…ndling Bind relay WS message handling before onopen and add non-blocking connect.challenge response support without forcing handshake waits on current relay protocol. Landed from contributor @pandego (PR openclaw#22571). Co-authored-by: pandego <7780875+pandego@users.noreply.github.com>
hughdidit
pushed a commit
to hughdidit/DAISy-Agency
that referenced
this pull request
Mar 3, 2026
…ndling Bind relay WS message handling before onopen and add non-blocking connect.challenge response support without forcing handshake waits on current relay protocol. Landed from contributor @pandego (PR openclaw#22571). Co-authored-by: pandego <7780875+pandego@users.noreply.github.com> (cherry picked from commit 65d5a91) # Conflicts: # CHANGELOG.md # assets/chrome-extension/background.js
dorgonman
pushed a commit
to kanohorizonia/openclaw
that referenced
this pull request
Mar 3, 2026
…ndling Bind relay WS message handling before onopen and add non-blocking connect.challenge response support without forcing handshake waits on current relay protocol. Landed from contributor @pandego (PR openclaw#22571). Co-authored-by: pandego <7780875+pandego@users.noreply.github.com>
zooqueen
pushed a commit
to hanzoai/bot
that referenced
this pull request
Mar 6, 2026
…ndling Bind relay WS message handling before onopen and add non-blocking connect.challenge response support without forcing handshake waits on current relay protocol. Landed from contributor @pandego (PR openclaw#22571). Co-authored-by: pandego <7780875+pandego@users.noreply.github.com>
thebenjaminlee
pushed a commit
to escape-velocity-ventures/openclaw
that referenced
this pull request
Mar 7, 2026
…ndling Bind relay WS message handling before onopen and add non-blocking connect.challenge response support without forcing handshake waits on current relay protocol. Landed from contributor @pandego (PR openclaw#22571). Co-authored-by: pandego <7780875+pandego@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes Chrome extension relay sessions getting stuck at badge
…by implementing the required gateway handshake flow in the bundled extension background worker.Closes #22553
Root cause
Gateway now emits a pre-connect
connect.challengeevent. The extension websocket client did not handle that event and never sent aconnectrequest, so the relay session never became authenticated/ready.What changed
type=event,event=connect.challengeinassets/chrome-extension/background.jsconnectrequest from the extension with token auth and client metadataconnectresponse before considering relay setup completeValidation
node --check assets/chrome-extension/background.jsAI assistance
AI-assisted; change reviewed and validated locally.
Greptile Summary
Implemented the required gateway handshake flow to fix Chrome extension relay sessions getting stuck at the connecting badge (
…). The extension now properly handles theconnect.challengeevent sent by the gateway server and responds with aconnectrequest containing authentication credentials and client metadata. The message handler is bound early (before WebSocket open) to prevent race conditions where the challenge could be missed, and the connection waits for successful handshake completion before proceeding with relay operations.relayGatewayToken,relayConnectRequestId,relayConnectResolve/Reject,relayConnectTimer,relayChallengeSeen)waitForGatewayConnect()to create a promise-based handshake with 8-second timeoutensureGatewayHandshakeStarted()to send theconnectrequest with proper protocol parametersconnect.challengeevent and successful/failedconnectresponses inonRelayMessageclearRelayConnectState()ws.onmessagebefore the WebSocket opens to prevent missing the initial challenge eventConfidence Score: 5/5
Last reviewed commit: 6d012ed