{"record":{"id":"617732705f315dee","repo":"oraios/serena","slug":"download-failed-could-not-find-cue-executable-at","errorCode":null,"errorMessage":"Download failed? Could not find cue executable at {cue_executable_path}","messagePattern":"Download failed\\? Could not find cue executable at (.+?)","errorType":"exception","errorClass":"FileNotFoundError","httpStatus":null,"severity":"error","filePath":"src/solidlsp/language_servers/cue_language_server.py","lineNumber":176,"sourceCode":"\n    def _create_dependency_provider(self) -> LanguageServerDependencyProvider:\n        return self.DependencyProvider(self._custom_settings, self._ls_resources_dir)\n\n    class DependencyProvider(LanguageServerDependencyProviderSinglePath):\n        \"\"\"Resolves a ``cue`` executable, downloading the pinned release if it isn't cached yet.\"\"\"\n\n        def _get_or_install_core_dependency(self) -> str:\n            cue_version = self._custom_settings.get(\"cue_version\", DEFAULT_CUE_VERSION)\n            deps = CueLanguageServer._runtime_dependencies(cue_version)\n            dependency = deps.get_single_dep_for_current_platform()\n\n            install_dir = os.path.join(self._ls_resources_dir, f\"cue-{cue_version}\")\n            cue_executable_path = deps.binary_path(install_dir)\n            if not os.path.exists(cue_executable_path):\n                log.info(f\"Downloading and extracting cue from {dependency.url} to {install_dir}\")\n                deps.install(install_dir)\n            if not os.path.exists(cue_executable_path):\n                raise FileNotFoundError(f\"Download failed? Could not find cue executable at {cue_executable_path}\")\n            os.chmod(cue_executable_path, 0o755)\n            return cue_executable_path\n\n        def _create_launch_command(self, core_path: str) -> list[str]:\n            # cue's LSP mode is activated via the `lsp` subcommand; it speaks LSP over stdio.\n            return [core_path, \"lsp\"]\n\n    def _create_base_initialize_params(self) -> dict:\n        \"\"\"Returns the init params for ``cue lsp``.\"\"\"\n        result = {\n            \"capabilities\": {\n                \"workspace\": {\n                    \"applyEdit\": True,\n                    \"workspaceEdit\": {\"documentChanges\": True},\n                    \"symbol\": {\"symbolKind\": {\"valueSet\": list(range(1, 27))}},\n                    \"workspaceFolders\": True,\n                    \"configuration\": True,\n                },","sourceCodeStart":158,"sourceCodeEnd":194,"githubUrl":"https://github.com/oraios/serena/blob/7fcbca7e62555ec2287ddb2f083caee805848ea6/src/solidlsp/language_servers/cue_language_server.py#L158-L194","documentation":"This FileNotFoundError is raised when, after attempting to download and extract the cue language server binary, the expected cue executable still does not exist at its predicted path inside the resources directory. It guards against silent download/extraction failures (wrong URL, unsupported archive layout, blocked network).","triggerScenarios":"_get_or_install_core_dependency computes cue_executable_path = deps.binary_path(install_dir); os.path.exists fails both before and after deps.install(install_dir) — i.e. the install step did not place the binary where expected.","commonSituations":"Network outage or proxy blocking the download URL; the archive extracted to an unexpected subdirectory; cue version pinned in deps no longer published upstream; disk full or permissions preventing extraction.","solutions":["Check network connectivity/proxy and re-run so the dependency downloads again.","Inspect the install_dir (resources/cue-<version>) to see what was actually extracted; adjust or clear it and retry.","Verify the pinned cue_version and download URL in the dependency provider still exist upstream.","Install cue manually (e.g. 'go install' or official release) and ensure the binary lands at the expected path, or point the provider at it.","Check disk space and write permissions on the resources directory."],"exampleFix":"# before: stale/partial extraction\ncue-v0.9.2/  (empty)\n// after: clear and reinstall\nrm -rf ~/.serena/language_servers/static/cue-*  # then restart","handlingStrategy":"validation","validationCode":"import os\ninstall_dir = os.path.join(resources_dir, f\"cue-{cue_version}\")\nexpected = os.path.join(install_dir, 'cue')  # adjust per deps.binary_path\nif not os.path.exists(expected):\n    os.makedirs(install_dir, exist_ok=True)\n    # force a clean (re)install or verify network before proceeding","typeGuard":null,"tryCatchPattern":"try:\n    cue_path = provider._get_or_install_core_dependency()\nexcept FileNotFoundError as e:\n    logging.warning('cue download/extract failed: %s — retrying after cache cleanup', e)\n    shutil.rmtree(install_dir, ignore_errors=True)\n    cue_path = provider._get_or_install_core_dependency()","preventionTips":["Ensure stable network/proxy access to the cue release URL.","Pre-install cue manually if the environment has restricted egress.","Monitor free disk space in the resources partition.","After upgrades, clear stale cue-<version> directories so installs are fresh."],"tags":["cue","download","installation","language-server"],"backgroundTag":"dependency-download-failed","analyzedSha":"7fcbca7e62555ec2287ddb2f083caee805848ea6","analyzedAt":"2026-08-29T00:04:09.619Z","schemaVersion":2},"datasetVersion":"2026-08-29T02:17:18.158Z"}