{"record":{"id":"2ba8a7e312946295","repo":"oraios/serena","slug":"failed-to-install-pasls-and-no-local-version-avail","errorCode":null,"errorMessage":"Failed to install pasls and no local version available","messagePattern":"Failed to install pasls and no local version available","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"src/solidlsp/language_servers/pascal_server.py","lineNumber":760,"sourceCode":"                else:\n                    need_download = True\n                    checksums = cls._get_checksums()\n            else:\n                log.debug(f\"pasls is up to date: {local_version}\")\n\n        if need_download:\n            if cls._atomic_install(pasls_dir, deps, checksums):\n                # Update metadata after successful installation\n                if latest_version:\n                    cls._save_local_version(pasls_dir, latest_version)\n                else:\n                    # API failed but download succeeded, record placeholder version\n                    cls._save_local_version(pasls_dir, \"unknown\")\n                cls._update_last_check(pasls_dir)\n            else:\n                # Installation failed, use existing version if available\n                if not os.path.exists(pasls_executable_path):\n                    raise RuntimeError(\"Failed to install pasls and no local version available\")\n                log.warning(\"Update failed, using existing version\")\n\n        # Update check time even if no update (avoid frequent checks)\n        if not need_download and cls._should_check_update(pasls_dir):\n            cls._update_last_check(pasls_dir)\n\n        assert os.path.exists(pasls_executable_path), f\"pasls executable not found at {pasls_executable_path}\"\n\n        # Ensure execute permission\n        try:\n            os.chmod(pasls_executable_path, 0o755)\n        except OSError:\n            pass  # May fail on Windows, ignore\n\n        log.info(f\"Using pasls at: {pasls_executable_path}\")\n        return quote_windows_path(pasls_executable_path)\n\n    def _create_base_initialize_params(self) -> dict:","sourceCodeStart":742,"sourceCodeEnd":778,"githubUrl":"https://github.com/oraios/serena/blob/7fcbca7e62555ec2287ddb2f083caee805848ea6/src/solidlsp/language_servers/pascal_server.py#L742-L778","documentation":"Raised by PascalServer's _setup_runtime_dependencies when the automatic download/install of pasls failed (API or network problem) AND no previously installed pasls executable exists locally. The server needs the pasls binary and cannot fall back to a cached version.","triggerScenarios":"Instantiating PascalServer when the update-check attempts a download, the installation fails (network/API error), and pasls_executable_path does not exist on disk (never installed or deleted).","commonSituations":"First run on a machine with no cached pasls while the download endpoint is unreachable; offline/air-gapped environment; corporate proxy blocking the download URL; API returning an error before download completes.","solutions":["Check network access/proxy settings and retry the download (ensure HTTPS to the pasls release endpoint works).","Manually install pasls and place the executable at the expected pasls resources directory (where pasls_executable_path points), then restart.","If a previous pasls exists elsewhere, copy it into the expected directory so the fallback check succeeds.","Disable/avoid the update path by pre-seeding a valid local version file so the library uses the existing version instead of downloading."],"exampleFix":"// before (offline first run)\nserver = PascalServer(repo_root)  # download fails, no local pasls\n// after\n# pre-provision pasls binary at the expected location\nshutil.copy(\"/opt/tools/pasls\", expected_pasls_dir / \"pasls\")\nos.chmod(expected_pasls_dir / \"pasls\", 0o755)\nserver = PascalServer(repo_root)","handlingStrategy":"retry","validationCode":"import os\ndef pasls_available(expected_path):\n    return os.path.exists(expected_path)","typeGuard":null,"tryCatchPattern":"try:\n    server = PascalServer(repo_root)\nexcept RuntimeError as e:\n    if \"Failed to install pasls\" in str(e):\n        check_network_and_proxy()\n        provision_pasls_manually(expected_dir)  # copy/verify a known-good pasls binary\n        server = PascalServer(repo_root)\n    else:\n        raise","preventionTips":["Pre-install pasls into the resources dir so the fallback path succeeds","Allow outbound HTTPS to the pasls release endpoint in CI/proxies","Cache the pasls directory between CI runs","Retry the setup once on transient network failures"],"tags":["pascal","pasls","network","download-failed","missing-dependency"],"backgroundTag":"language-server-download-failed","analyzedSha":"7fcbca7e62555ec2287ddb2f083caee805848ea6","analyzedAt":"2026-08-29T00:04:09.619Z","schemaVersion":2},"datasetVersion":"2026-08-29T02:17:18.158Z"}