{"record":{"id":"9a616e63e2251fb2","repo":"HKUDS/nanobot","slug":"uninstall-failed","errorCode":null,"errorMessage":"uninstall failed","messagePattern":"uninstall failed","errorType":"exception","errorClass":"CliAppError","httpStatus":500,"severity":"error","filePath":"nanobot/apps/cli/service.py","lineNumber":1269,"sourceCode":"\n    def uninstall(self, name: str) -> dict[str, Any]:\n        app = self.get_app(name)\n        installed = self._load_installed()\n        if str(app[\"name\"]) not in installed:\n            raise CliAppError(\"CLI app is not installed\")\n        raw_installed_entry = installed.get(str(app[\"name\"]))\n        installed_entry = _as_object_dict(raw_installed_entry)\n        if installed_entry is None:\n            installed_entry = {}\n        strategy = self._strategy(app)\n        entry_point = str(app.get(\"entry_point\") or \"\").strip()\n        managed_entry_path = str(installed_entry.get(\"entry_point_path\") or \"\").strip()\n        if strategy != \"bundled\":\n            argv = self._argv_for_action(app, \"uninstall\", installed_entry=installed_entry)\n            assert argv is not None\n            result = self._run_argv(argv, timeout=self.runtime.install_timeout)\n            if result.returncode != 0:\n                raise CliAppError(_truncate(result.stderr or result.stdout or \"uninstall failed\"), status=500)\n            still_managed = bool(managed_entry_path and Path(managed_entry_path).exists())\n            still_available = bool(entry_point and shutil.which(entry_point))\n            if still_managed or (not managed_entry_path and still_available):\n                reason = (\n                    f\"the recorded entry point at {managed_entry_path} still exists\"\n                    if still_managed\n                    else f\"{entry_point} is still available on PATH\"\n                )\n                message = (\n                    f\"Uninstall for {app['display_name']} completed, but {reason}, \"\n                    \"so nanobot kept it installed.\"\n                )\n                return self.payload() | {\n                    \"last_action\": {\n                        \"ok\": False,\n                        \"message\": message,\n                        \"removed\": False,\n                        \"still_available\": True,","sourceCodeStart":1251,"sourceCodeEnd":1287,"githubUrl":"https://github.com/HKUDS/nanobot/blob/42f37dc4c0e409eac7818a82d165c5f2757bc075/nanobot/apps/cli/service.py#L1251-L1287","documentation":"Error \"uninstall failed\" thrown in HKUDS/nanobot.","triggerScenarios":"Thrown at nanobot/apps/cli/service.py:1269 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"42f37dc4c0e409eac7818a82d165c5f2757bc075","analyzedAt":"2026-08-26T00:18:52.276Z","schemaVersion":2},"datasetVersion":"2026-08-26T04:18:47.238Z"}