oraios/serena · error · RuntimeError
LanguageServer.jl installation timed out. Please install man
Error message
LanguageServer.jl installation timed out. Please install manually: julia -e 'using Pkg; Pkg.add("LanguageServer")' What it means
Raised when the LanguageServer.jl installation subprocess exceeds the 300-second timeout, caught from `subprocess.TimeoutExpired` and re-raised with manual-install instructions. Serena deliberately fails fast instead of hanging language-server startup on a stuck download or Pkg resolve.
Source
Thrown at src/solidlsp/language_servers/julia_server.py:112
JuliaLanguageServer._install_language_server(julia_path)
return julia_path
@staticmethod
def _install_language_server(julia_path: str) -> None:
"""Install LanguageServer.jl package."""
log.info("LanguageServer.jl not found. Installing... (this may take a minute)")
install_cmd = [julia_path, "-e", 'using Pkg; Pkg.add("LanguageServer")']
try:
result = subprocess_run(install_cmd, check=False, capture_output=True, text=True, timeout=300) # 5 minutes for installation
if result.returncode == 0:
log.info("LanguageServer.jl installed successfully!")
else:
raise RuntimeError(f"Failed to install LanguageServer.jl: {result.stderr}")
except subprocess.TimeoutExpired:
raise RuntimeError(
"LanguageServer.jl installation timed out. Please install manually: julia -e 'using Pkg; Pkg.add(\"LanguageServer\")'"
)
@override
def is_ignored_dirname(self, dirname: str) -> bool:
"""Define language-specific directories to ignore for Julia projects."""
return super().is_ignored_dirname(dirname) or dirname in [".julia", "build", "dist"]
@override
def _supports_pull_diagnostics(self) -> bool:
# LanguageServer.jl raises an unhandled error on textDocument/diagnostic which crashes
# the server process. Force the published-diagnostics path instead.
return False
@override
def _get_published_diagnostics_wait_timeout(self, pull_diagnostics_failed: bool) -> float:
# LanguageServer.jl needs significant warm-up after init before it emits the firstView on GitHub (pinned to 7fcbca7e62)
Solutions
- Install manually ahead of time: `julia -e 'using Pkg; Pkg.add("LanguageServer")'` so Serena's step becomes a no-op fast pass
- Pre-warm the Julia depot before starting Serena (run Pkg.update/add once interactively)
- Check network throughput/proxy; retry on a faster connection
- Re-run setup — Pkg caches partial progress, so the second attempt is usually much faster
- If hangs persist, inspect `julia` CPU/network state for a stuck process
Example fix
// before: fails on cold depot in CI
RuntimeError: LanguageServer.jl installation timed out.
// after: pre-cache dependencies in a CI step with a longer window
- run: julia -e 'using Pkg; Pkg.add("LanguageServer")'
timeout-minutes: 30
# then start Serena; the install step completes instantly
Defensive patterns
Strategy: retry
Validate before calling
import subprocess, time
start = time.time()
subprocess.run(["julia","-e","using Pkg; Pkg.add('LanguageServer')"], check=True) # if this takes minutes interactively, expect Serena's 300s timeout Try / catch
try:
server = SolidLSP(JuliaConfig())
except RuntimeError as e:
if "timed out" in str(e) and "LanguageServer.jl" in str(e):
time.sleep(2); retry_setup(max_attempts=3) # Pkg caches progress; retries usually succeed
else:
raise
Prevention
- Pre-warm the Julia depot (Pkg.add) in a CI step with a generous timeout
- Avoid first-install on flaky/slow networks; run Pkg.update beforehand
- Don't start the language server and immediately kill it mid-install; let retries complete
- Monitor network throughput; ~5 min budget is what Serena allows
When it happens
Trigger: `_install_language_server` calls `subprocess_run(install_cmd, ..., timeout=300)`; if the `julia` Pkg process takes longer than 5 minutes (slow network, huge dependency resolution, registry update), `subprocess.TimeoutExpired` is caught and this RuntimeError is raised.
Common situations: First install over a slow/unstable connection; registry server slowness; large transitive dependency resolution on cold depot; hung network mount; low-resource CI runners.
Understand the failure class
- Timeouts: ETIMEDOUT, deadlines, and hung requests — what actually expires when a request times out.
Related errors
- Failed to install LanguageServer.jl: {result.stderr}
- Failed to install .NET {version} runtime using install scrip
- Request to {url} timed out: {e}
- Memory maintenance template not found at {template_path}
- Tool timeout must be at least 10 seconds, but is {tool_timeo
AI-assisted analysis of oraios/serena@7fcbca7e62 (2026-08-29).
Data as JSON: /api/errors/61a190f3f0eebd10.
Report an issue: GitHub.