Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
O
openclaw-android-node
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lisa
openclaw-android-node
Commits
6fe34089
Commit
6fe34089
authored
Mar 11, 2026
by
Lisa (AI Assistant)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix: Always send connect first, then pairing request after rejection
parent
ed8270c3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
12 deletions
+10
-12
NodeClient.kt
...n/java/com/nexlab/openclaw/node/data/remote/NodeClient.kt
+10
-12
No files found.
app/src/main/java/com/nexlab/openclaw/node/data/remote/NodeClient.kt
View file @
6fe34089
...
...
@@ -227,15 +227,12 @@ class NodeClient() {
hasReceivedChallenge
=
true
Log
.
d
(
TAG
,
"Received challenge: nonce=$challengeNonce, ts=$challengeTimestamp"
)
// Check if we need to send pairing request instead of connect
if
(
pendingPairingAfterConnect
)
{
pendingPairingAfterConnect
=
false
Log
.
d
(
TAG
,
"Sending pairing request after reconnect"
)
sendPairingRequest
(
nodeId
,
token
,
capabilities
)
}
else
{
// Now send connect request with proper v3 signature
sendConnectRequestWithChallenge
(
nodeId
,
token
,
capabilities
)
}
// BUG FIX: Always send connect first - the gateway requires "connect" as the first request
// If connect is rejected with "device-required", we handle that in the response handler
// This was causing "invalid handshake: first request must be connect" error
pendingPairingAfterConnect
=
false
Log
.
d
(
TAG
,
"Always sending connect request first (protocol requirement)"
)
sendConnectRequestWithChallenge
(
nodeId
,
token
,
capabilities
)
}
else
if
(
event
==
"node.pair.resolved"
)
{
// Pairing was approved, now reconnect with token
val
approved
=
json
.
optJSONObject
(
"payload"
)
?.
optBoolean
(
"approved"
,
false
)
...
...
@@ -263,9 +260,10 @@ class NodeClient() {
if
((
error
?.
contains
(
"device-required"
)
==
true
||
error
?.
contains
(
"device signature"
)
==
true
||
error
?.
contains
(
"invalid"
)
==
true
)
&&
isPairingMode
)
{
// Set flag to send pairing request after reconnect
pendingPairingAfterConnect
=
true
Log
.
d
(
TAG
,
"Will send pairing request on reconnect after connection rejection"
)
// Device not paired - send pairing request on THIS connection
Log
.
d
(
TAG
,
"Device not paired, sending pairing request"
)
sendPairingRequest
(
nodeId
,
token
,
capabilities
)
// Don't close - wait for pairing response
}
else
{
_connectionStatus
.
trySend
(
ConnectionStatus
(
false
,
nodeId
))
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment