oraios/serena · error
AL Language Server executable not found at: {executable_path
Error message
AL Language Server executable not found at: {executable_path} What it means
After locating the AL extension directory, _setup_runtime_dependencies builds the expected path to Microsoft.Dynamics.Nav.EditorServices.Host for the current platform. RuntimeError is raised when that binary does not exist inside the extension — meaning the extension folder was found but is incomplete, of an unexpected version/layout, or the wrong platform variant.
Source
Thrown at src/solidlsp/language_servers/al_language_server.py:215
# Find existing extension or download if needed
extension_path = cls._find_al_extension(solidlsp_settings)
if extension_path is None:
log.info("AL extension not found on disk, attempting to download...")
extension_path = cls._download_and_install_al_extension(solidlsp_settings)
if extension_path is None:
raise RuntimeError(
"Failed to locate or download AL Language Server. Please either:\n"
"1. Set AL_EXTENSION_PATH environment variable to the AL extension directory\n"
"2. Install the AL extension in VS Code (ms-dynamics-smb.al)\n"
"3. Ensure internet connection for automatic download"
)
# Build executable path based on platform
executable_path = cls._get_executable_path(extension_path, system)
if not os.path.exists(executable_path):
raise RuntimeError(f"AL Language Server executable not found at: {executable_path}")
# Prepare and return the executable command
return cls._prepare_executable(executable_path, system)
@classmethod
def _find_al_extension(cls, solidlsp_settings: SolidLSPSettings) -> str | None:
"""
Find AL extension in various locations.
Search order:
1. Environment variable (AL_EXTENSION_PATH)
2. Default download location (~/.serena/ls_resources/al-extension)
3. VS Code installed extensions
Returns:
Path to AL extension directory or None if not found
"""View on GitHub (pinned to 7fcbca7e62)
Solutions
- Reinstall the AL extension (or re-download it) to get a complete bin/ directory, then retry.
- Verify the expected binary exists: <extension>/bin/{win32|linux|darwin}/Microsoft.Dynamics.Nav.EditorServices.Host(.exe).
- Point AL_EXTENSION_PATH at a complete, platform-matching extension directory.
Example fix
// before export AL_EXTENSION_PATH="/opt/al-src" # source checkout, no bin/ // after export AL_EXTENSION_PATH="$HOME/.vscode/extensions/ms-dynamics-smb.al-1.x.x"
Defensive patterns
Strategy: validation
Validate before calling
import os, sys
def al_binary_present(extension_path: str) -> bool:
system = {'Windows': 'win32', 'Linux': 'linux', 'Darwin': 'darwin'}[sys.platform if sys.platform != 'win32' else 'Windows']
name = 'Microsoft.Dynamics.Nav.EditorServices.Host' + ('.exe' if system == 'win32' else '')
return os.path.isfile(os.path.join(extension_path, 'bin', system, name)) Type guard
def is_complete_extension(extension_path: str) -> bool:
return os.path.isdir(os.path.join(extension_path, 'bin', 'linux')) or \
os.path.isdir(os.path.join(extension_path, 'bin', 'darwin')) or \
os.path.isdir(os.path.join(extension_path, 'bin', 'win32')) Try / catch
try:
server = ALLanguageServer(...)
except RuntimeError as e:
if 'executable not found at' in str(e):
reinstall_al_extension() # code --install-extension after uninstall
server = ALLanguageServer(...)
else:
raise Prevention
- After installing or updating the AL extension, verify the bin/<platform> directory contains the host binary.
- Never point AL_EXTENSION_PATH at source checkouts or partially copied folders.
- Match the extension platform to the host OS (don't reuse Windows extension snapshots on Linux).
When it happens
Trigger: AL extension directory resolved successfully but _get_executable_path result fails os.path.exists — e.g. a partial/failed extension install, an extension update that changed bin/ layout, or AL_EXTENSION_PATH pointing at the wrong directory.
Common situations: Manually downloaded/copyied extension folders missing the bin/<platform> subdirectory; Linux servers given a Windows-only extension snapshot; interrupted extension installation.
Related errors
- Download failed? Could not find ada_language_server executab
- Failed to locate or download AL Language Server. Please eith
- Download failed? Could not find cue executable at {cue_execu
- The 'deno' executable was not found on PATH. Install Deno (h
- elm-language-server executable not found at {elm_ls_executab
AI-assisted analysis of oraios/serena@7fcbca7e62 (2026-08-29).
Data as JSON: /api/errors/76a015dc86c59705.
Report an issue: GitHub.