oraios/serena · error · RuntimeError
Failed to download Taplo from {download_url}. Try installing
Error message
Failed to download Taplo from {download_url}. Try installing manually: cargo install taplo-cli --locked What it means
_download_taplo wraps the whole verified-download-and-extract step in a try/except; if any part fails (network error, 404, corrupt archive, checksum mismatch, extraction failure, missing chmod), it re-raises as RuntimeError with the download URL and the manual-install hint, chaining the original exception. This converts low-level download failures into a single actionable message.
Source
Thrown at src/solidlsp/language_servers/taplo_server.py:206
archive_type = "zip" if archive_filename.endswith(".zip") else "gz"
target_path = install_dir if archive_type == "zip" else executable_path
FileUtils.download_and_extract_archive_verified(
download_url,
target_path,
archive_type,
expected_sha256=expected_hash,
allowed_hosts=TAPLO_ALLOWED_HOSTS,
)
# Make executable on Unix systems
if os.name != "nt":
os.chmod(executable_path, os.stat(executable_path).st_mode | stat.S_IXUSR | stat.S_IXGRP | stat.S_IXOTH)
log.info(f"Taplo installed successfully at: {executable_path}")
except Exception as e:
log.error(f"Failed to download Taplo: {e}")
raise RuntimeError(
f"Failed to download Taplo from {download_url}. Try installing manually: cargo install taplo-cli --locked"
) from e
def _create_base_initialize_params(self) -> dict:
"""
Returns the initialize params for the Taplo Language Server.
"""
initialize_params = {
"locale": "en",
"capabilities": {
"textDocument": {
"synchronization": {"didSave": True, "dynamicRegistration": True},
"completion": {"dynamicRegistration": True, "completionItem": {"snippetSupport": True}},
"definition": {"dynamicRegistration": True},
"references": {"dynamicRegistration": True},
"documentSymbol": {
"dynamicRegistration": True,
"hierarchicalDocumentSymbolSupport": True,View on GitHub (pinned to 7fcbca7e62)
Solutions
- Read the chained exception (raise ... from e) to see the root cause — check network/proxy access to the download_url printed in the message.
- Install Taplo manually: `cargo install taplo-cli --locked`, or download the binary from GitHub releases and add it to PATH.
- Retry after transient network issues — the install dir is re-created/re-attempted on next server start.
- Pin to an existing Taplo version whose release assets still exist, if the failure was a 404 on the pinned archive.
Example fix
// before: failing behind a corporate proxy
ls = SolidLanguageServer.create("taplo") # RuntimeError: Failed to download Taplo from https://...
// after: pre-install so no download is attempted
export PATH="$HOME/.cargo/bin:$PATH" # after `cargo install taplo-cli --locked`
ls = SolidLanguageServer.create("taplo") Defensive patterns
Strategy: try-catch
Validate before calling
import shutil, subprocess
if shutil.which("taplo") is None:
url_ok = subprocess.run(["curl", "-sfIL", "https://github.com/tamasfe/taplo/releases"], capture_output=True).returncode == 0
if not url_ok:
subprocess.run(["cargo", "install", "taplo-cli", "--locked"], check=True) # pre-install when downloads are blocked Try / catch
try:
server = SolidLanguageServer.create("taplo")
except RuntimeError as e:
if "Failed to download Taplo" in str(e):
subprocess.run(["cargo", "install", "taplo-cli", "--locked"], check=True)
server = SolidLanguageServer.create("taplo")
else:
raise Prevention
- Pre-install taplo on machines behind restrictive proxies/firewalls.
- Configure proxy env vars (HTTPS_PROXY) if the release host requires them.
- Verify the pinned Taplo version's release assets still exist before upgrading.
When it happens
Trigger: Auto-install of Taplo runs (binary not on PATH) and FileUtils.download_and_extract_archive_verified raises: unreachable URL, HTTP error, checksum mismatch, unsupported archive format, or extraction into install_dir failing.
Common situations: Corporate proxies/firewalls blocking GitHub release downloads; offline CI runners; transient network failures; Taplo releasing a new version that removes the pinned archive URL (404); insufficient disk space or write permissions in the install dir.
Related errors
- Taplo executable not found at {taplo_executable}. Installati
- Failed to install .NET {version} runtime using install scrip
- Download failed? Could not find marksman executable at {mark
- Failed to locate or download MATLAB Language Server. Please
- Nextflow Language Server JAR not found at {jar_path}
AI-assisted analysis of oraios/serena@7fcbca7e62 (2026-08-29).
Data as JSON: /api/errors/4f85290408840c8c.
Report an issue: GitHub.