{"record":{"id":"ecd3c7dac44d5f6a","repo":"oraios/serena","slug":"taplo-executable-not-found-at-taplo-executable","errorCode":null,"errorMessage":"Taplo executable not found at {taplo_executable}. Installation may have failed. Try installing manually: cargo install taplo-cli --locked","messagePattern":"Taplo executable not found at (.+?)\\. Installation may have failed\\. Try installing manually: cargo install taplo-cli --locked","errorType":"exception","errorClass":"FileNotFoundError","httpStatus":null,"severity":"error","filePath":"src/solidlsp/language_servers/taplo_server.py","lineNumber":166,"sourceCode":"\n            # Setup local installation directory; legacy unversioned dir reserved for INITIAL only\n            taplo_version = self._custom_settings.get(\"taplo_version\", DEFAULT_TAPLO_VERSION)\n            ls_dirname = \"taplo\" if taplo_version == INITIAL_TAPLO_VERSION else f\"taplo-{taplo_version}\"\n            taplo_dir = os.path.join(self._ls_resources_dir, ls_dirname)\n            os.makedirs(taplo_dir, exist_ok=True)\n            _, executable_name = _get_taplo_download_url(taplo_version)\n            taplo_executable = os.path.join(taplo_dir, executable_name)\n\n            if os.path.exists(taplo_executable) and os.access(taplo_executable, os.X_OK):\n                log.info(f\"Using cached Taplo at: {taplo_executable}\")\n                return taplo_executable\n\n            # Download and install Taplo\n            log.info(f\"Taplo not found. Downloading version {taplo_version}...\")\n            self._download_taplo(taplo_dir, taplo_executable, taplo_version)\n\n            if not os.path.exists(taplo_executable):\n                raise FileNotFoundError(\n                    f\"Taplo executable not found at {taplo_executable}. \"\n                    \"Installation may have failed. Try installing manually: cargo install taplo-cli --locked\"\n                )\n\n            return taplo_executable\n\n        def _create_launch_command(self, core_path: str) -> list[str]:\n            return [core_path, \"lsp\", \"stdio\"]\n\n        @classmethod\n        def _download_taplo(cls, install_dir: str, executable_path: str, version: str = DEFAULT_TAPLO_VERSION) -> None:\n            \"\"\"Download and extract Taplo binary using the shared verified download helper.\"\"\"\n            download_url, _ = _get_taplo_download_url(version)\n            archive_filename = os.path.basename(download_url)\n            # only verify the SHA when the resolved version is one of our pinned ones (INITIAL or current DEFAULT)\n            expected_hash = _taplo_sha(version, archive_filename)\n            if expected_hash is None and version in (INITIAL_TAPLO_VERSION, DEFAULT_TAPLO_VERSION):\n                raise RuntimeError(f\"No SHA256 checksum configured for Taplo archive: {archive_filename}\")","sourceCodeStart":148,"sourceCodeEnd":184,"githubUrl":"https://github.com/oraios/serena/blob/7fcbca7e62555ec2287ddb2f083caee805848ea6/src/solidlsp/language_servers/taplo_server.py#L148-L184","documentation":"After the Taplo language server auto-installer downloads and extracts the Taplo archive, it verifies that the expected executable path actually exists. If the file is still missing post-install, it raises FileNotFoundError because the language server cannot be started without the binary. It is a defensive post-condition check against failed or silently-corrupted downloads/extraction.","triggerScenarios":"Creating or starting the Taplo language server (via _get_or_install_core_dependency) when the binary `taplo` is not already on PATH, the download step runs, and os.path.exists(taplo_executable) is still False after _download_taplo returns (e.g. archive extracted to an unexpected subdirectory or extraction silently skipped).","commonSituations":"Offline or proxied networks where the download half-succeeds; non-glibc Linux (musl/Alpine) where the pinned archive layout differs; filesystem permission problems in the install dir; Taplo changing archive contents between versions so the binary lands at a nested path like taplo-<ver>/taplo.","solutions":["Install Taplo manually: `cargo install taplo-cli --locked`, or download the binary from Taplo GitHub releases and put it on PATH, so auto-install never runs.","Delete the partial Taplo install directory (under the SolidLSP runtime deps dir) and retry to force a clean re-download.","Check the install directory for a nested binary layout; symlink or move the `taplo` binary to the expected executable path.","Verify network/proxy access to the Taplo release download URL and adequate disk space/permissions in the install dir."],"exampleFix":"// before: relying on auto-install on a machine with restricted egress\nls = SolidLanguageServer.create(\"taplo\")  // FileNotFoundError after failed download\n// after: install taplo yourself so auto-install is skipped\ncargo install taplo-cli --locked  # or download release binary into ~/.local/bin\nls = SolidLanguageServer.create(\"taplo\")","handlingStrategy":"fallback","validationCode":"import shutil\nif shutil.which(\"taplo\") is None:\n    # pre-install so auto-install path is never exercised\n    subprocess.run([\"cargo\", \"install\", \"taplo-cli\", \"--locked\"], check=True)\nassert shutil.which(\"taplo\") is not None","typeGuard":"def taplo_available() -> bool:\n    return shutil.which(\"taplo\") is not None and os.path.isfile(shutil.which(\"taplo\"))","tryCatchPattern":"try:\n    server = SolidLanguageServer.create(\"taplo\")\nexcept FileNotFoundError:\n    subprocess.run([\"cargo\", \"install\", \"taplo-cli\", \"--locked\"], check=True)\n    server = SolidLanguageServer.create(\"taplo\")","preventionTips":["Pre-install taplo (cargo install taplo-cli --locked) in your image/environment before starting the server.","Ensure outbound network access to Taplo release URLs when relying on auto-install.","Confirm the install directory is writable and has free disk space."],"tags":["taplo","toml","installation","missing-executable","auto-install"],"backgroundTag":"language-server-binary-missing","analyzedSha":"7fcbca7e62555ec2287ddb2f083caee805848ea6","analyzedAt":"2026-08-29T00:04:09.619Z","schemaVersion":2},"datasetVersion":"2026-08-29T02:17:18.158Z"}