Skip to content

Browser plugin still imports stale plugin-runtime-deps/openclaw-2026.4.26 path on 2026.5.3-1 #77308

Closed as not planned

Description

@Neomail2

Draft GitHub issue — OpenClaw Browser runtime deps stale import persists on 2026.5.3-1

Repository: openclaw/openclaw

Title

Browser plugin still imports stale plugin-runtime-deps/openclaw-2026.4.26... path on 2026.5.3-1 after update; doctor --fix and registry refresh do not repair

Body

Summary

The Browser plugin is enabled and reported as loaded on OpenClaw 2026.5.3-1, but openclaw browser status fails because Gateway still imports a stale generated runtime path from 2026.4.26:

GatewayClientRequestError: INVALID_REQUEST: Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/Users/jarvis/.openclaw/plugin-runtime-deps/openclaw-2026.4.26-da6bdffc3d96/dist/extensions/browser/register.runtime.js' imported from /Users/jarvis/.openclaw/plugin-runtime-deps/openclaw-2026.4.26-da6bdffc3d96/dist/plugin-registration-BYsUqVhV.js

This looks related to #75045, but it still reproduced here on 2026.5.3-1.

Environment

OpenClaw: 2026.5.3-1 (2eae30e)
Node: v25.8.1
OS: macOS / Darwin 25.3.0 arm64
Gateway: LaunchAgent, loopback 127.0.0.1:18789
Browser plugin: bundled, loaded, version 2026.5.3
Browser detected: Google Chrome

Verified good state

openclaw plugins inspect browser
@openclaw/browser-plugin
id: browser
Status: loaded
Source: /opt/homebrew/lib/node_modules/openclaw/dist/extensions/browser/index.js
Origin: bundled
Version: 2026.5.3
Commands: browser

Plugin registry also pointed to the current bundled browser plugin:

source: /opt/homebrew/lib/node_modules/openclaw/dist/extensions/browser/index.js
rootDir: /opt/homebrew/lib/node_modules/openclaw/dist/extensions/browser
origin: bundled
enabled: true
packageVersion: 2026.5.3

What failed to repair it

The following did not fix the stale import:

openclaw plugins registry --refresh --json
openclaw gateway restart
openclaw doctor --fix --non-interactive --yes
openclaw gateway restart
rm -rf ~/.openclaw/tmp/jiti
openclaw gateway restart

~/.openclaw/plugin-runtime-deps did not exist before the workaround, but Gateway still tried to import from that old path.

Workaround that restored Browser

A local compatibility shim fixed the issue:

BASE="$HOME/.openclaw/plugin-runtime-deps/openclaw-2026.4.26-da6bdffc3d96"
CUR="/opt/homebrew/lib/node_modules/openclaw/dist"
mkdir -p "$BASE/dist"
find "$CUR" -mindepth 1 -maxdepth 1 | while read -r item; do
  name=$(basename "$item")
  [ -e "$BASE/dist/$name" ] || ln -s "$item" "$BASE/dist/$name"
done
ln -sfn "$CUR/plugin-registration-GAMTDPDK.js" "$BASE/dist/plugin-registration-BYsUqVhV.js"
openclaw gateway restart

After restart:

openclaw browser status
profile: openclaw
enabled: true
running: false
transport: cdp
cdpPort: 18800
cdpUrl: http://127.0.0.1:18800
detectedBrowser: chrome
detectedPath: /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

Smoke test:

openclaw browser start
🦞 browser [openclaw] running: true

openclaw browser status
running: true
browser: chrome

Expected behavior

After an OpenClaw update, Gateway/browser runtime imports should use the current bundled plugin/runtime path, or doctor --fix / registry refresh should remove/rebuild the stale generated import reference.

Actual behavior

Gateway continued to import an old generated runtime path from 2026.4.26, despite current plugin registry and plugin inspection showing Browser loaded from 2026.5.3.

Notes

The workaround is intentionally local and reversible. It does not modify the installed OpenClaw package; it only creates the missing compatibility path that Gateway was still trying to import.

Activity

  1. clawsweeper commented on May 4, 2026

    @clawsweeper
    Contributor

    Codex review: keeping this open for maintainer follow-up; there is still a little grit to resolve.

    Summary
    Keep open: the report is detailed and current main has related doctor/update cleanup, but I did not find proof that the exact Browser stale generated plugin-registration-* import path reported on 2026.5.3-1 is fixed on current main.

    Reproducibility: no. not against current main. The issue gives a strong packaged macOS reproduction on 2026.5.3-1, but this read-only Linux checkout could only verify adjacent source paths and did not establish a failing current-main reproduction.

    Next step
    This is a valid, narrow runtime/update repair candidate, but it should first pin down the stale Browser import path with a targeted regression because current main already has adjacent cleanup safeguards.

    Review details

    Best possible solution:

    Add a targeted upgrade/doctor regression and the smallest generic repair so Browser requests always load the current bundled runtime after stable correction updates, then ship that fix in the next release.

    Do we have a high-confidence way to reproduce the issue?

    No, not against current main. The issue gives a strong packaged macOS reproduction on 2026.5.3-1, but this read-only Linux checkout could only verify adjacent source paths and did not establish a failing current-main reproduction.

    Is this the best way to solve the issue?

    Unclear. The existing update restart and doctor cleanup direction is maintainable, but the report shows a stale Browser generated import can survive those repairs, so the best next fix is a focused regression plus a narrow generic cleanup or restart repair.

    Acceptance criteria:

    • pnpm test src/commands/doctor/shared/plugin-dependency-cleanup.test.ts src/commands/doctor/shared/missing-configured-plugin-install.test.ts src/gateway/server-methods/update.test.ts
    • pnpm test test/scripts/postinstall-bundled-plugins.test.ts
    • pnpm test src/plugins/plugin-module-loader-cache.test.ts extensions/browser/index.test.ts
    • If packaged-update behavior changes, run the relevant upgrade-survivor/package acceptance lane in Testbox rather than a broad local gate.

    What I checked:

    • Reporter reproduction: The issue reports openclaw browser status failing on 2026.5.3-1 with ERR_MODULE_NOT_FOUND for a 2026.4.26 plugin-runtime-deps path while plugins inspect browser and the registry both point at the current bundled Browser plugin; registry refresh, doctor --fix, and Gateway restarts did not repair it, but a local compatibility shim restored Browser status/start.
    • Browser Gateway path: Browser requests are served through the bundled Browser plugin's browser.request Gateway method and lazy-load ./register.runtime.js, so a stale generated import path can break the user-visible openclaw browser surface even when metadata says the plugin is loaded. (extensions/browser/plugin-registration.ts:109, a90be474f441)
    • Existing legacy runtime cleanup: Current doctor cleanup collects old plugin-runtime-deps, bundled-plugin-runtime-deps, explicit stage roots, systemd STATE_DIRECTORY runtime roots, extension debris, and stale symlinks, then removes them under --fix. (src/commands/doctor/shared/plugin-dependency-cleanup.ts:86, a90be474f441)
    • Existing update restart mitigation: Package-manager update.run success now schedules an immediate update.run restart with deferral and cooldown skipped, which targets the class where an old Gateway process lazy-loads chunks removed by the package swap. (src/gateway/server-methods/update.ts:150, a90be474f441)
    • Coverage exists but not exact: Tests cover immediate package-update restarts and stale bundled install-record removal, but I did not find a focused regression for Browser loading a stale versioned generated plugin-registration-* module after a correction update. (src/gateway/server-methods/update.test.ts:310, a90be474f441)
    • Unreleased related work: The changelog has unreleased related fixes for macOS update bootstraps and plugin-runtime symlink cleanup, and git tag --contains for the relevant current-main cleanup commits returned no shipped tag in this checkout. (CHANGELOG.md:246, a90be474f441)

    Likely related people:

    • Vincent Koc: Recent current-main commits touch the plugin update, install-record, correction-version, and doctor cleanup areas most closely related to stale bundled plugin runtime state. (role: recent maintainer; confidence: high; commits: 6b7f9eafed4b, e0430e2e154a, 89a15fddaf84; files: src/commands/doctor/shared/missing-configured-plugin-install.ts, src/commands/doctor/shared/missing-configured-plugin-install.test.ts, CHANGELOG.md)
    • Peter Steinberger: Recent history includes bundled plugin shadow cleanup and the shallow-base commit that contains the current update restart and legacy runtime-deps cleanup code paths in this checkout. (role: recent maintainer; confidence: medium; commits: b7ce9439e7f3, b37fba7c07a7; files: src/gateway/server-methods/update.ts, src/infra/restart.ts, src/commands/doctor/shared/plugin-dependency-cleanup.ts)

    Remaining risk / open question:

    • The stale path could come from a still-running macOS LaunchAgent, stale managed install metadata, or a dangling runtime-deps symlink; current main has adjacent mitigations but no exact Browser correction-update regression for the reported state.
    • The reporter says registry refresh and doctor --fix already failed on 2026.5.3-1, so closing from adjacent cleanup code would be premature without live packaged-update proof or a targeted regression.

    Codex review notes: model gpt-5.5, reasoning high; reviewed against a90be474f441.

  2. Neomail2 commented on May 4, 2026

    @Neomail2
    Author

    Follow-up after further local diagnosis: I believe this issue was a false positive from my environment rather than a confirmed Browser/runtime-deps bug.

    What changed:

    • The local ai.openclaw.node service was still running an older node-host (2026.4.26) while the Gateway had already been updated to 2026.5.3-1.
    • After restarting the node service, I disabled the local compatibility shim by renaming:
      /Users/jarvis/.openclaw/plugin-runtime-deps/openclaw-2026.4.26-da6bdffc3d96
      to:
      /Users/jarvis/.openclaw/plugin-runtime-deps/openclaw-2026.4.26-da6bdffc3d96.disabled-20260504-1448
    • Browser then worked without the shim:
      • openclaw browser status OK
      • openclaw browser start OK
      • final status: running: true, browser: chrome

    Revised conclusion: this was most likely stale local node-host/runtime state after update, not an upstream Browser defect. Closing unless I can reproduce it again with Gateway and node both freshly aligned to the current version.

  3. locked as resolved and limited conversation to collaborators on May 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions