HKUDS/nanobot · error · CliAppError

update failed

Error message

update failed

What it means

Failure path in CliAppService.update(): the package-manager update command ran but returned a non-zero exit code. The CliAppError carries the truncated stderr/stdout of the failed run (or the literal 'update failed' when the process produced no output) and status 500; the install state is left unchanged.

Solutions

  1. Run the update command manually to surface the real error
  2. Check registry reachability and authentication, then retry
Defensive patterns

Strategy: retry

When it happens

Trigger: Thrown at nanobot/apps/cli/service.py:1241 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of HKUDS/nanobot@42f37dc4c0 (2026-08-26). Data as JSON: /api/errors/1c9a026f1f6ee528. Report an issue: GitHub.

Appendix: source

Thrown at nanobot/apps/cli/service.py:1241

    def update(self, name: str) -> dict[str, Any]:
        app = self.get_app(name, force_refresh=True)
        if str(app["name"]) not in self._load_installed():
            raise CliAppError("CLI app is not installed")
        if self._strategy(app) == "bundled":
            self._record_installed(app)
            return self.payload() | {
                "last_action": {
                    "ok": True,
                    "message": f"Checked {app['display_name']}.",
                    "installed": True,
                    "verification": ["state_recorded"],
                }
            }
        argv = self._argv_for_action(app, "update")
        assert argv is not None
        result = self._run_argv(argv, timeout=self.runtime.install_timeout)
        if result.returncode != 0:
            raise CliAppError(_truncate(result.stderr or result.stdout or "update failed"), status=500)
        self._record_installed(app)
        return self.payload() | {
            "last_action": {
                "ok": True,
                "message": f"Updated CLI for {app['display_name']}.",
                "installed": True,
                "verification": ["package_manager_ok", "state_recorded", "managed_paths_present"],
            }
        }

    def uninstall(self, name: str) -> dict[str, Any]:
        app = self.get_app(name)
        installed = self._load_installed()
        if str(app["name"]) not in installed:
            raise CliAppError("CLI app is not installed")
        raw_installed_entry = installed.get(str(app["name"]))
        installed_entry = _as_object_dict(raw_installed_entry)
        if installed_entry is None:

View on GitHub (pinned to 42f37dc4c0)