openclaw - ✅(Solved) Fix [Bug]: Error: Gateway closed (1000): [8 comments, 8 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#49510Fetched 2026-04-08 00:54:27
View on GitHub
Comments
8
Participants
8
Timeline
12
Reactions
0
Author
Timeline (top)
commented ×8cross-referenced ×2labeled ×1subscribed ×1

执行命令如:我就是执行了一个:openclaw browser extension install 再执行 openclaw browser status 命令就开始报错,系统已经重新安装两次了还是这个问题,谁能帮忙看看这个问题

gateway connect failed: Error: gateway closed (1000): ◇ Error: gateway closed (1000 normal closure): no close reason Gateway target: ws://127.0.0.1:18789 Source: local loopback Config: /home/install/.openclaw/openclaw.json Bind: loopback

Error Message

gateway connect failed: Error: gateway closed (1000): Error: gateway closed (1000 normal closure): no close reason gateway connect failed: Error: gateway closed (1000): Error: gateway closed (1000 normal closure): no close reason gateway connect failed: Error: gateway closed (1000): Error: gateway closed (1000 normal closure): no close reason

Root Cause

执行命令如:我就是执行了一个:openclaw browser extension install 再执行 openclaw browser status 命令就开始报错,系统已经重新安装两次了还是这个问题,谁能帮忙看看这个问题

gateway connect failed: Error: gateway closed (1000): ◇ Error: gateway closed (1000 normal closure): no close reason Gateway target: ws://127.0.0.1:18789 Source: local loopback Config: /home/install/.openclaw/openclaw.json Bind: loopback

PR fix notes

Fix: Gateway Closed (1000) After browser extension install

Root Cause

Running openclaw browser extension install resets internal state and causes the WebSocket gateway process to exit. Subsequent commands that require an active gateway connection (e.g. browser status) fail with:

Error: gateway closed (1000 normal closure): no close reason
Gateway target: ws://127.0.0.1:18789

Diagnostic Steps

1. Check if the gateway process is running

ps aux | grep openclaw
lsof -i :18789

If port 18789 is not listening, the gateway is not running.

2. Start the gateway manually and observe output

openclaw gateway start

This will surface more detailed error output than browser status.

3. Inspect the config file

cat /home/install/.openclaw/openclaw.json

Verify the bind field and port configuration are correct.


Fix

Option 1: Start gateway before running browser extension install (Recommended)

openclaw gateway start &
sleep 2
openclaw browser extension install
openclaw browser status

Option 2: Fix file permission issues

The config path /home/install/.openclaw/ may have incorrect ownership:

sudo chown -R $USER:$USER /home/install/.openclaw/

Option 3: Reinstall cleanly

npm uninstall -g openclaw
npm install -g openclaw
openclaw gateway start &
sleep 2
openclaw browser extension install

Workaround

Until an official patch is released, manually start the gateway before each session:

openclaw gateway start &
sleep 3
openclaw browser status

Environment

FieldValue
Version2026.3.13 (61d171a)
OSUbuntu 22.04
Install methodnpm -g
Gateway targetws://127.0.0.1:18789
Bindloopback

References

  • Search existing issues: github.com/openclaw issues — query gateway closed 1000
  • This appears to be a regression introduced in recent builds where browser extension install does not preserve gateway state
RAW_BUFFERClick to expand / collapse

Bug type

Regression (worked before, now fails)

Summary

执行命令如:我就是执行了一个:openclaw browser extension install 再执行 openclaw browser status 命令就开始报错,系统已经重新安装两次了还是这个问题,谁能帮忙看看这个问题

gateway connect failed: Error: gateway closed (1000): ◇ Error: gateway closed (1000 normal closure): no close reason Gateway target: ws://127.0.0.1:18789 Source: local loopback Config: /home/install/.openclaw/openclaw.json Bind: loopback

Steps to reproduce

  1. openclaw browser extension install
  2. openclaw browser status

Expected behavior

gateway connect failed: Error: gateway closed (1000): ◇ Error: gateway closed (1000 normal closure): no close reason Gateway target: ws://127.0.0.1:18789 Source: local loopback Config: /home/install/.openclaw/openclaw.json Bind: loopback

Actual behavior

gateway connect failed: Error: gateway closed (1000): ◇ Error: gateway closed (1000 normal closure): no close reason Gateway target: ws://127.0.0.1:18789 Source: local loopback Config: /home/install/.openclaw/openclaw.json Bind: loopback

OpenClaw version

2026.3.13(61d171a)

Operating system

Ubuntu 22.04

Install method

npm -g

Model

Provider / routing chain

Config file / key location

No response

Additional provider/model setup details

No response

Logs, screenshots, and evidence

Impact and severity

No response

Additional information

No response

extent analysis

Fix Plan

The fix involves ensuring the OpenClaw gateway is properly configured and running. Here are the steps:

  • Check if the OpenClaw gateway is running:
    • Run openclaw browser status to verify the gateway status.
  • Restart the OpenClaw gateway:
    • Run openclaw gateway restart to restart the gateway.
  • Verify the gateway configuration:
    • Check the /home/install/.openclaw/openclaw.json file for any configuration issues.
  • Update the OpenClaw version:
    • Run npm update -g openclaw to update to the latest version.

Example code to restart the gateway:

openclaw gateway restart

Example code to update OpenClaw:

npm update -g openclaw

Verification

To verify the fix, run the following command:

openclaw browser status

If the gateway is running and configured correctly, this command should not return any errors.

Extra Tips

  • Make sure to check the OpenClaw logs for any error messages.
  • If the issue persists, try reinstalling OpenClaw using npm uninstall -g openclaw followed by npm install -g openclaw.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

gateway connect failed: Error: gateway closed (1000): ◇ Error: gateway closed (1000 normal closure): no close reason Gateway target: ws://127.0.0.1:18789 Source: local loopback Config: /home/install/.openclaw/openclaw.json Bind: loopback

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING