Skip to content

Comments

Include assets/chrome-extension in gateway package#60

Open
truongsinh wants to merge 1 commit intoopenclaw:mainfrom
truongsinh:fix/include-chrome-extension-assets
Open

Include assets/chrome-extension in gateway package#60
truongsinh wants to merge 1 commit intoopenclaw:mainfrom
truongsinh:fix/include-chrome-extension-assets

Conversation

@truongsinh
Copy link

Summary

  • Copy the assets/ directory to the gateway output alongside extensions/ during install
  • Add package-contents check for assets/chrome-extension/manifest.json

Problem

openclaw browser extension install fails with:

Error: Bundled Chrome extension is missing. Reinstall OpenClaw and try again.

The runtime code (resolveBundledExtensionRootDir in browser-cli-extension.ts) walks up from dist/ looking for assets/chrome-extension/manifest.json. The assets/ directory exists in the source tree but gateway-install.sh doesn't copy it to $out/lib/openclaw/.

Workaround

Users can work around this with an overlay:

(final: prev: let
  openclaw-gateway-patched = prev.openclaw-gateway.overrideAttrs (old: {
    installPhase = ''
      ${old.installPhase}
      if [ -d "$src/assets" ]; then
        cp -r "$src/assets" "$out/lib/openclaw/"
      fi
    '';
  });
in {
  openclaw-gateway = openclaw-gateway-patched;
  openclaw = prev.openclaw.override { openclaw-gateway = openclaw-gateway-patched; };
})

Test plan

  • nix build .#openclaw-gateway succeeds
  • nix flake check passes (including package-contents check)
  • openclaw browser extension install works with the built package

The install script copies dist, node_modules, extensions, and docs
to the output but omits the assets directory. This causes
`openclaw browser extension install` to fail with:

  Error: Bundled Chrome extension is missing. Reinstall OpenClaw and try again.

The runtime code (resolveBundledExtensionRootDir) walks up from dist/
looking for assets/chrome-extension/manifest.json, which doesn't exist
in the Nix package output.

Copy the assets directory alongside extensions during install and add
a package-contents check for the chrome extension manifest.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant