{"record":{"id":"f2ef61001f0ab739","repo":"oraios/serena","slug":"found-no-serena-service-in-a-jetbrains-ide-instanc","errorCode":null,"errorMessage":"Found no Serena service in a JetBrains IDE instance for the project at {project_root}. STOP. Do not attempt any other tools or workarounds. Ask the user to open this folder as a project in a JetBrains IDE with the Serena plugin installed and running!","messagePattern":"Found no Serena service in a JetBrains IDE instance for the project at (.+?)\\. STOP\\. Do not attempt any other tools or workarounds\\. Ask the user to open this folder as a project in a JetBrains IDE with the Serena plugin installed and running!","errorType":"exception","errorClass":"ServerNotFoundError","httpStatus":null,"severity":"critical","filePath":"src/serena/jetbrains/jetbrains_plugin_client.py","lineNumber":129,"sourceCode":"        :param log_warning: whether to log a warning if no matching plugin instance is found\n        :return: the instance\n        \"\"\"\n        plugin_paths_found = []\n        for future in self._submit_scan():\n            client = future.result()\n            if client.matches(project_root):\n                return client\n            elif client.project_root is not None:\n                plugin_paths_found.append(client.project_root)\n\n        if log_warning:\n            log.warning(\n                \"Searched for Serena JetBrains plugin service for project at %s but found no matching service. \"\n                \"Found plugin instances for the following project paths: %s\",\n                project_root,\n                plugin_paths_found,\n            )\n        raise ServerNotFoundError(\n            f\"Found no Serena service in a JetBrains IDE instance for the project at {project_root}. \"\n            \"STOP. Do not attempt any other tools or workarounds. Ask the user to open this folder as a project in a JetBrains IDE \"\n            \"with the Serena plugin installed and running!\"\n        )\n\n    def match_clients(self, registered_projects: list[RegisteredProject]) -> list[MatchedClient]:\n        \"\"\"\n        Scans for plugin instances and matches them against the given registered projects.\n\n        :param registered_projects: the list of registered projects to match plugin instances against\n        :return: the list of matched clients with their corresponding registered project\n        \"\"\"\n        matched_clients = []\n        for future in self._submit_scan():\n            client = future.result()\n            if client.project_root is not None:\n                for rp in registered_projects:\n                    if client.matches(Path(rp.project_root)):","sourceCodeStart":111,"sourceCodeEnd":147,"githubUrl":"https://github.com/oraios/serena/blob/7fcbca7e62555ec2287ddb2f083caee805848ea6/src/serena/jetbrains/jetbrains_plugin_client.py#L111-L147","documentation":"JetBrainsPluginClient.find_client queries running JetBrains IDE instances for the Serena plugin service registered for the given project root. When no IDE/plugin instance matches the project path, it raises ServerNotFoundError with explicit instructions to stop and ask the user to open the project in a JetBrains IDE with the Serena plugin running.","triggerScenarios":"Calling from_project/find_client when no JetBrains IDE is running; IDE is running but the Serena plugin is not installed/disabled; project open in the IDE under a different path (symlink, case mismatch, different mount point) than project_root passed to Serena.","commonSituations":"Using serena's JetBrains mode from a terminal while the IDE is closed; plugin not updated/enabled after IDE restart; opening the project via a symlinked or differently-cased directory path; multiple IDE instances where only other projects are open.","solutions":["Open the project folder in a JetBrains IDE with the Serena plugin installed and enabled (as the message instructs)","Verify the project root path exactly matches what the IDE has open (avoid symlinks/case differences)","Check the plugin is installed and enabled: Settings > Plugins > Serena, and restart the IDE","Confirm the plugin's service is reachable and the plugin version is compatible with your serena client"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":"# before invoking JetBrains mode, sanity-check the environment:\nimport os\nassert os.path.isdir(project_root), \"project root must exist\"\n# and confirm the IDE is running with the project open (user check) and the Serena plugin enabled","typeGuard":null,"tryCatchPattern":"try:\n    client = JetBrainsPluginClient.from_project(registered_project)\nexcept ServerNotFoundError:\n    # per the message: stop and ask the user to open the project in a JetBrains IDE\n    ask_user_to_open_project_in_ide(project_root)\n    client = retry_later()","preventionTips":["Open the project in a JetBrains IDE with the Serena plugin installed before starting serena in JetBrains mode","Use the exact same (real, non-symlinked) path in the IDE and on the serena command line","Keep the plugin enabled and updated; restart the IDE after plugin installs","Avoid deep-linking via differently-cased or mounted paths"],"tags":["jetbrains","ide","connection","setup"],"backgroundTag":"serena-service-not-found","analyzedSha":"7fcbca7e62555ec2287ddb2f083caee805848ea6","analyzedAt":"2026-08-29T00:04:09.619Z","schemaVersion":2},"datasetVersion":"2026-08-29T02:17:18.158Z"}