oraios/serena · error
Unsupported platform: {system}
Error message
Unsupported platform: {system} What it means
_get_executable_path maps the OS name returned by platform.system() to the AL extension's bin subdirectory (win32/linux/darwin). Any other value — e.g. FreeBSD, CYGWIN, AIX — hits the else branch and raises RuntimeError, because the AL extension only ships binaries for those three platforms.
Source
Thrown at src/solidlsp/language_servers/al_language_server.py:310
"""
Build platform-specific executable path.
Args:
extension_path: Path to AL extension directory
system: Operating system name
Returns:
Full path to executable
"""
if system == "Windows":
return os.path.join(extension_path, "bin", "win32", "Microsoft.Dynamics.Nav.EditorServices.Host.exe")
elif system == "Linux":
return os.path.join(extension_path, "bin", "linux", "Microsoft.Dynamics.Nav.EditorServices.Host")
elif system == "Darwin":
return os.path.join(extension_path, "bin", "darwin", "Microsoft.Dynamics.Nav.EditorServices.Host")
else:
raise RuntimeError(f"Unsupported platform: {system}")
@classmethod
def _prepare_executable(cls, executable_path: str, system: str) -> str:
"""
Prepare the executable by setting permissions and handling path quoting.
Args:
executable_path: Path to the executable
system: Operating system name
logger: Logger instance
Returns:
Properly formatted command string
"""
# Make sure executable has proper permissions on Unix-like systems
if system in ["Linux", "Darwin"]:
st = os.stat(executable_path)View on GitHub (pinned to 7fcbca7e62)
Solutions
- Run the language server on a supported OS (Windows, Linux, or macOS), e.g. inside a Linux container.
- If on Cygwin/MSYS, run under native Windows Python so platform.system() returns 'Windows'.
- Check the platform branch logic in al_language_server.py and confirm the exact accepted system strings before workarounds.
Example fix
// before (FreeBSD host) ./serena --language al // after (supported) docker run -v $PWD:/work -it python:3.12 # then run serena inside Linux
Defensive patterns
Strategy: validation
Validate before calling
import platform
SUPPORTED = {'Windows', 'Linux', 'Darwin'}
def assert_supported_platform() -> None:
system = platform.system()
if system not in SUPPORTED:
raise EnvironmentError(
f"AL language server supports only {sorted(SUPPORTED)}; got {system}. "
"Run inside a Linux container instead."
) Type guard
def is_supported_platform(system: str) -> bool:
return system in ('Windows', 'Linux', 'Darwin') Try / catch
try:
server = ALLanguageServer(...)
except RuntimeError as e:
if str(e).startswith('Unsupported platform'):
raise RuntimeError(
f"{e} — AL server requires Windows/Linux/macOS. Use a supported host or container."
) from e
raise Prevention
- Check platform.system() in environment setup and fail fast with a clear message before starting language servers.
- On FreeBSD/Cygwin/other Unix, run the tool inside a Linux or macOS container/VM.
- Use native Windows Python (not Cygwin/MSYS) when working on Windows.
When it happens
Trigger: Instantiating the AL language server on an OS whose platform.system() value is not exactly 'Windows', 'Linux', or 'Darwin' (checked upstream in _setup_runtime_dependencies).
Common situations: Running on FreeBSD/OpenBSD servers; Windows under Cygwin or MSYS where system() may report 'CYGWIN_NT-...' if that value is passed through; unsupported musl-based setups relying on unusual OS strings.
Related errors
- Unsupported platform '{platform_id}' for upstream JDTLS mode
- No symbols found in target file {target_file}
- FindSymbolTool returned no results
- Unhandled document change kind: {change}; Please report to S
- Invalid language server: '{orig_language_str}'.\nValid value
AI-assisted analysis of oraios/serena@7fcbca7e62 (2026-08-29).
Data as JSON: /api/errors/da6020db4ad00eb7.
Report an issue: GitHub.