Skip to content

[NemoClaw][Linux][Agent&Skills][Slack] Single channel init auth failure crashes entire OpenClaw gateway via unhandled promise rejection #2340

@hulynn

Description

@hulynn

Description

[Description]
When the Slack channel provider receives any error from @slack/web-api during gateway init (observed: invalid_auth), the returned promise is not caught, triggering an unhandled
promise rejection that terminates the entire OpenClaw gateway process under Node v22. All NemoClaw commands that depend on the gateway (connect, chat, channel status) become
unusable. This bug is about the gateway's lack of error isolation — the user's Slack token value itself is correct.

This is a regression bug.
[Environment]
Device: DGX Spark (reproduced); code path is platform-agnostic
OS: Ubuntu 24.04 (sandbox container base); host is Spark DGXOS
Architecture: arm64
Node.js: v22.x (shipped inside OpenClaw image)
npm: bundled
Docker: containerd/k3s (Spark)
OpenShell CLI: v0.0.32
NemoClaw: v0.0.23
OpenClaw: v2026.4.2

[Steps to Reproduce]
Any scenario where the Slack provider's auth probe fails at gateway init will trigger the crash. The observed path in the field was:

  1. User completes nemoclaw onboard for a sandbox with Slack channel enabled; Slack bot & app tokens are stored in ~/.nemoclaw/credentials.json (verifiable with nemoclaw credentials list — tokens present and valid).

  2. sandbox/.openclaw/openclaw.json contains:

    "channels": {
    "slack": {
    "enabled": true,
    "accounts": {
    "default": {
    "enabled": true,
    "botToken": "openshell:resolve:env:SLACK_BOT_TOKEN",
    "appToken": "openshell:resolve:env:SLACK_APP_TOKEN"
    }
    }
    }
    }

  3. Inspect the sandbox pod env — Slack tokens are NOT present in the agent container (e.g., kubectl exec <pod> -c agent -- env | grep -i slack returns empty; kubectl get pod <pod> -o json | jq '.spec.containers[].env' shows no SLACK_* entries). This is a separate injection-path bug (see "Related" below) — for this filing it serves as the deterministic
    condition that makes Slack Web API return invalid_auth.

  4. Run nemoclaw connect <sandbox> — OpenClaw gateway starts, Slack provider calls @slack/web-api, API responds with invalid_auth (because the resolved bot token is empty inside the pod).

  5. Observe: gateway process exits within ~500 ms. curl http://localhost:18789 → connection refused. tail /tmp/gateway.log shows the unhandled rejection stack and no lines after it.

  6. Every subsequent nemoclaw connect <sandbox> spawns a fresh gateway that crashes the same way — crash loop with no in-sandbox recovery.

Note: the same crash would occur for any cause of Slack-side auth failure (revoked app, network MITM stripping auth, Slack transient 401, etc.). The bug is that the gateway does not tolerate ANY Slack auth rejection — not that the user's token is wrong.

[Expected Behavior]
A single channel provider's init failure must be isolated. The gateway should log a warning like [slack][default] provider failed to start: invalid_auth — channel disabled for this session, other channels should continue to start, and inference / chat / TUI transport should remain available on port 18789. The gateway process MUST NOT exit because one channel failed to authenticate. The channel status endpoint (or openclaw channels status) should report the Slack channel as degraded: auth-failed or equivalent, not silently disappear along with the whole gateway.

[Actual Behavior]
Gateway crashes on the first Slack provider init call. The underlying @slack/web-api error (invalid_auth in the observed case) is returned via a rejected promise that is not handled by the gateway bootstrap; Node v22 treats it as an unhandled rejection and exits the process. Port 18789 unbinds. Subsequent gateway launches repeat the same crash. Chat / inference are fully blocked, and there is no recovery path from inside the sandbox (openclaw config unset channels.slack.enabled hits EACCES ).

~/joyce$ nemoclaw olla

  OpenClaw gateway is not running inside the sandbox (sandbox likely restarted).
  Recovering...
  Gateway process started but is not responding.
  Check /tmp/gateway.log inside the sandbox for details.

  ✓ Connecting to sandbox 'olla'
  Inside the sandbox, run `openclaw tui` to start chatting with the agent.
  Type `/exit` to leave the chat, then `exit` to return to the host shell.

sandbox@olla:~$ cat /tmp/gateway.log
(node:3367) [UNDICI-EHPA] Warning: EnvHttpProxyAgent is experimental, expect them to change at any time.
(Use `node --trace-warnings ...` to show where the warning was created)
(node:3376) [UNDICI-EHPA] Warning: EnvHttpProxyAgent is experimental, expect them to change at any time.
(Use `node --trace-warnings ...` to show where the warning was created)
2026-04-23T10:03:12.913+00:00 [canvas] host mounted at http://127.0.0.1:18789/__openclaw__/canvas/ (root /sandbox/.openclaw/canvas)
2026-04-23T10:03:12.954+00:00 [tasks/registry] Failed to restore task registry
2026-04-23T10:03:12.962+00:00 [heartbeat] started
2026-04-23T10:03:12.964+00:00 [health-monitor] started (interval: 300s, startup-grace: 60s, channel-connect-grace: 120s)
2026-04-23T10:03:12.973+00:00 [gateway] agent model: inference/nemotron-3-nano:30b
2026-04-23T10:03:12.974+00:00 [gateway] listening on ws://127.0.0.1:18789, ws://[::1]:18789 (PID 3376)
2026-04-23T10:03:12.975+00:00 [gateway] log file: /tmp/openclaw-998/openclaw-2026-04-23.log
2026-04-23T10:03:12.976+00:00 [gateway] security warning: dangerous config flags enabled: gateway.controlUi.allowInsecureAuth=true, gateway.controlUi.dangerouslyDisableDeviceAuth=true. Run `openclaw security audit`.
2026-04-23T10:03:13.146+00:00 [model-pricing] pricing bootstrap failed: TypeError: fetch failed
2026-04-23T10:03:13.161+00:00 [hooks] loaded 4 internal hook handlers
2026-04-23T10:03:15.217+00:00 [slack] [default] starting provider
2026-04-23T10:03:15.230+00:00 [browser/server] Browser control listening on http://127.0.0.1:18791/ (auth=token)
2026-04-23T10:03:15.410+00:00 [openclaw] Unhandled promise rejection: Error: An API error occurred: invalid_auth
    at platformErrorFromResult (/usr/local/lib/node_modules/openclaw/node_modules/@slack/web-api/src/errors.ts:119:5)
    at WebClient.apiCall (/usr/local/lib/node_modules/openclaw/node_modules/@slack/web-api/src/WebClient.ts:405:36)
    at processTicksAndRejections (node:internal/process/task_queues:103:5)

Bug Details

Field Value
Priority Unprioritized
Action Dev - Open - To fix
Disposition Open issue
Module Machine Learning - NemoClaw
Keyword NemoClaw, NemoClaw_Agent&Skills, NEMOCLAW_GH_SYNC_APPROVAL, NemoClaw-SWQA-RelBlckr-Recommended, NemoClaw-SWQA-Test-Blocker

[NVB#6107338]

Metadata

Metadata

Assignees

Labels

NV QABugs found by the NVIDIA QA TeamUATIssues flagged for User Acceptance Testing.integration: slackSlack integration or channel behaviorplatform: dgx-sparkAffects DGX Spark hardware or workflowsplatform: ubuntuAffects Ubuntu Linux environments

Type

No fields configured for Bug.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions