oraios/serena · error
Language server base launch command with arguments unsupport
Error message
Language server base launch command with arguments unsupported
What it means
Language server dependency providers can substitute a user-configured base launch command for the default one, but only when the recorded command's first element equals the core dependency path. If the stored command has the core path elsewhere (e.g. arguments were appended to build cmd[0]) or cmd[0] differs, the provider cannot safely map the arguments and raises ValueError.
Source
Thrown at src/solidlsp/dependency_provider.py:177
return [core_path]
def _create_launch_command_from_base_command(self, base_command: list[str]) -> list[str]:
core_path = base_command[0]
cmd = self._create_launch_command(core_path)
if len(base_command) == 1:
# This is the regular case, where the base command consists only of the core
# dependency's path, and the launch command is constructed from it.
return cmd
else:
# In this case, the user has overridden the base command via LS-specific settings
# with a command that has arguments and therefore does not map cleanly to
# the single path assumption. However, in special cases where the full command
# was constructed by appending arguments to the core dependency's path,
# we simply assume that the provided base command can be substituted.
if cmd[0] == core_path:
return base_command + cmd[1:]
else:
raise ValueError("Language server base launch command with arguments unsupported")
class LanguageServerDependencyProviderUvx(LanguageServerDependencyProviderBaseCommand):
"""
Dependency provider for language servers distributed as a PyPI package, run on demand via ``uvx`` / ``uv x``.
The pinned package version can be overridden by the user via the LS-specific setting given by
``version_setting_key``. Alternatively, the LS-specific setting "ls_path" can be set to the path of an
already-installed language server executable, in which case it is launched directly, bypassing uv entirely.
"""
DEFAULT_UVX_PYTHON_VERSION = "3.13"
def __init__(
self,
custom_settings: "SolidLSPSettings.CustomLSSettings",
ls_resources_dir: str,
*,View on GitHub (pinned to 7fcbca7e62)
Solutions
- Clear the persisted custom base command / reset language server settings so the default command is regenerated.
- Update the stored command so its first element is exactly the core dependency path, with extra flags as trailing elements.
- Remove wrapper-script style commands; configure arguments via the provider's settings instead.
Example fix
// before (stored command embeds args in the executable) /opt/tools/node wrapper.sh --langserver.js // after (core path first, args after) /opt/tools/node --langserver.js
Defensive patterns
Strategy: validation
Validate before calling
def validate_base_command(base_command: list[str], core_path: str) -> bool:
return bool(base_command) and base_command[0] == core_path Type guard
def is_substitutable_command(cmd: list[str], core_path: str) -> bool:
return len(cmd) > 0 and isinstance(cmd[0], str) and cmd[0] == core_path Try / catch
try:
launch_cmd = provider.create_launch_command(base_command)
except ValueError as e:
if 'base launch command with arguments unsupported' in str(e):
launch_cmd = None # fall back to provider default
else:
raise Prevention
- Keep the core dependency executable as argv[0]; pass extra flags as subsequent elements.
- Clear cached language-server command settings after upgrading or moving dependencies.
- Avoid wrapper scripts in custom base commands; use the provider's argument settings instead.
When it happens
Trigger: A previously persisted language-server launch command whose first element is not exactly the resolved core dependency path, while base_command has extra arguments — i.e. cmd[0] != core_path during _create_launch_command_from_base_command.
Common situations: Users configuring a wrapper script or flags in the language server command; a dependency version/location change (e.g. after upgrade or cache clear) makes the stored path no longer match cmd[0].
Related errors
- Invalid language server: '{orig_language_str}'.\nValid value
- No language servers available in the manager
- No language server factory available to create language serv
- Groovy Language Server JAR not found. To use Groovy language
- java_home='{explicit_home}' is invalid: '{candidate}' does n
AI-assisted analysis of oraios/serena@7fcbca7e62 (2026-08-29).
Data as JSON: /api/errors/346d1e1bb2f52243.
Report an issue: GitHub.