{"record":{"id":"bc00543c41cf82ed","repo":"oraios/serena","slug":"the-language-server-manager-is-not-initialized-in","errorCode":null,"errorMessage":"The language server manager is not initialized, indicating a problem during project initialisation. ... IMPORTANT: Stop, do not attempt workarounds. Inform the user and wait for further instructions before you continue!","messagePattern":"The language server manager is not initialized, indicating a problem during project initialisation\\. \\.\\.\\. IMPORTANT: Stop, do not attempt workarounds\\. Inform the user and wait for further instructions before you continue!","errorType":"exception","errorClass":"Exception","httpStatus":null,"severity":"critical","filePath":"src/serena/project.py","lineNumber":567,"sourceCode":"        if self.language_server_manager is None:\n            if self._language_server_manager_init_error is not None:\n                return f\"error ({self._language_server_manager_init_error})\"\n            else:\n                return \"not initialized\"\n        else:\n            return \"ready\"\n\n    def get_language_server_manager_or_raise(self) -> LanguageServerManager:\n        if self.language_server_manager is None:\n            msg = TextBuilder(\"The language server manager is not initialized, indicating a problem during project initialisation.\")\n            if self._language_server_manager_init_error is not None:\n                msg.with_text(str(self._language_server_manager_init_error))\n            if self._agent is not None:\n                msg.with_text(\"For details, please check the logs. \" + self._agent.get_log_inspection_instructions())\n            msg.with_text(\n                \"IMPORTANT: Stop, do not attempt workarounds. Inform the user and wait for further instructions before you continue!\"\n            )\n            raise Exception(msg.build())\n        return self.language_server_manager\n\n    def add_language_server(self, ls_id: LanguageServerId) -> None:\n        \"\"\"\n        Adds a new language server to the project configuration, starting the corresponding\n        server instance if the LS manager is active.\n        The project configuration is saved to disk after adding the language.\n\n        :param ls_id: the language server to add\n        \"\"\"\n        if ls_id in self.project_config.language_servers:\n            log.info(f\"Language server {ls_id.value} is already present in the project configuration.\")\n            return\n\n        # start the language server (if the LS manager is active)\n        if self.language_server_manager is None:\n            log.info(\"Language server manager is not active; skipping language server startup for the new language.\")\n        else:","sourceCodeStart":549,"sourceCodeEnd":585,"githubUrl":"https://github.com/oraios/serena/blob/7fcbca7e62555ec2287ddb2f083caee805848ea6/src/serena/project.py#L549-L585","documentation":"Raised by Project.get_language_server_manager_or_raise (src/serena/project.py:567) when the language server manager failed to initialize during project start-up. It is a deliberate hard stop with an agent-facing message instructing the AI to halt and inform the user rather than attempt workarounds.","triggerScenarios":"Language server download/startup failure (missing runtime like node/jvm for the language, network failure while downloading the LS binary), unsupported language config, or any exception stored in _language_server_manager_init_error during __init__.","commonSituations":"No Java installed for Eclipse JLS; no node/npm for TypeScript LS; offline/air-gapped environments blocking LS download; broken language configuration in .serena/project.yml.","solutions":["Read the Serena logs for the stored _language_server_manager_init_error root cause","Install the prerequisites for the relevant language server (e.g. JDK 17+ for Java, Node for TS) or fix the network/proxy so the LS binary can download","Stop and ask the user how to proceed — do not retry with workarounds, per the error's own instruction"],"exampleFix":"// before\nls_manager = project.get_language_server_manager_or_raise()  # crashes on broken env\n// after\ntry:\n    ls_manager = project.get_language_server_manager_or_raise()\nexcept Exception as e:\n    print(f'Language server init failed: {e}. Ask the user for instructions and stop.')\n    raise","handlingStrategy":"try-catch","validationCode":"if project._language_server_manager_init_error is not None:\n    logging.error('LS init failed: %s', project._language_server_manager_init_error)","typeGuard":null,"tryCatchPattern":"try:\n    lsm = project.get_language_server_manager_or_raise()\nexcept Exception as e:\n    print(f'{e}')  # includes instruction to stop and inform the user\n    raise","preventionTips":["Pre-install language runtime prerequisites (JDK, Node) before using Serena","Ensure network/proxy access for language-server downloads","Check startup logs immediately when a project fails to initialize","Never work around this error — it is a designed hard stop"],"tags":["python","language-server","initialization"],"backgroundTag":"language-server-init-failure","analyzedSha":"7fcbca7e62555ec2287ddb2f083caee805848ea6","analyzedAt":"2026-08-29T00:04:09.619Z","schemaVersion":2},"datasetVersion":"2026-08-29T02:17:18.158Z"}