Skip to content

Android node: app shows 'Connected' but gateway reports node disconnected after gateway restart #30137

@edwincrug

Description

@edwincrug

Bug Description

After a gateway restart, the Android OpenClaw app (v2026.2.25-dev) continues to show "Connected" (green indicator) and the Chat tab works correctly (messages are visible and can be sent). However, the node service does not reconnect — nodes status reports connected: false, and all node commands (location.get, camera.snap, etc.) fail with "node not connected".

Environment

  • Device: Samsung Galaxy Z Fold6 (SM-F956U1)
  • App version: 2026.2.25-dev
  • Gateway: OpenClaw 2026.2.25, macOS 15.7.5 (arm64)
  • Connection: Tailscale Funnel (WSS, port 443)

Steps to Reproduce

  1. Android node is connected and working (both chat and node commands)
  2. Restart the gateway (openclaw gateway restart)
  3. Observe the Android app — it still shows "Connected" (green)
  4. Chat tab works fine (messages flow)
  5. Run openclaw nodes status — node shows connected: false
  6. Run openclaw nodes location get --node <id> — fails with "node not connected"

Expected Behavior

After gateway restart, the Android app should automatically reconnect both the chat WebSocket and the node service WebSocket. If auto-reconnect fails, the app should at minimum show "Disconnected" so the user knows to manually reconnect.

Actual Behavior

  • Chat connection reconnects successfully (or was never dropped)
  • Node service connection does NOT reconnect
  • App UI shows "Connected" — misleading, as node commands do not work
  • Only fix: manually tap "Disconnect Gateway" → wait 3 seconds → reconnect

Analysis

The app appears to have two separate connections to the gateway:

  1. Chat WebSocket — for messaging (reconnects fine)
  2. Node service — for node.invoke commands like location.get, camera.snap, etc. (does NOT reconnect)

The NodeForegroundService.kt has auto-reconnect logic and the NodeRuntime.kt has retry/backoff, but it seems the reconnect is not triggered when the gateway restarts. The app detects the chat connection is alive and reports "Connected" without checking the node service status.

Additional Context

  • paired.json shows lastUsedAtMs updating (pairing is fine)
  • Gateway logs show no node.invoke entries after restart until manual reconnect
  • The node was connected for hours before the restart with no issues
  • This is critical for use cases like geofence monitoring that rely on periodic location.get

Metadata

Metadata

Assignees

No one assigned

    Labels

    staleMarked as stale due to inactivity

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions