typescript-go icon indicating copy to clipboard operation
typescript-go copied to clipboard

[lsp][bug] LSP sometimes won't successfully restart

Open mjames-c opened this issue 6 months ago • 2 comments

manually running >TypeScript Native Preview: Restart Language Server can sometimes cause the LSP to fail to shutdown. I'm presented with the following error dialog in VS Code when this occurs.

Image

fwiw tsgo --lsp zombie processes can also be left behind:

Image

native extension preview details:

Identifier: typescriptteam.native-preview
Version: 0.20250601.1
Last Updated: 2025-06-02, 09:40:58
Size: 15.93MB

mjames-c avatar Jun 02 '25 00:06 mjames-c

Is there any chance you could get an LSP message log from the output window, or at least the end of it (sanitized) when this happens?

jakebailey avatar Jun 02 '25 02:06 jakebailey

mmm, not sure how helpful they'll be but here are some sanitised logs... the watched dirs are kinda odd to me as it's watching stuff outside of VS Code workspace root but don't think it's related to the problem.

LSP server

Info 15   [13:33:58.394] getConfigFileNameForFile:: File: <omitted> ProjectRootPath: :: Result: <omitted>/web/tsconfig.json
[Error - 1:33:59 PM] Server process exited with signal SIGKILL.

LSP client

Info 15   [13:33:58.394] getConfigFileNameForFile:: File: <omitted> ProjectRootPath: :: Result: <omitted>/web/tsconfig.json
[Error - 1:33:59 PM] Server process exited with signal SIGKILL.

[Trace - 1:33:54 PM] Sending request 'shutdown - (10)'.
[Trace - 1:33:57 PM] Received request 'client/registerCapability - (ts2)'.
Params: {
    "registrations": [
        {
            "id": "watcher-1",
            "method": "workspace/didChangeWatchedFiles",
            "registerOptions": {
                "watchers": [
                    {
                        "globPattern": "$HOME/@opentelemetry/api/*.{js,jsx,mjs,cjs,ts,tsx,mts,cts,json}",
                        "kind": 1
                    },
                    {
                        "globPattern": "$HOME/stylelint/*.{js,jsx,mjs,cjs,ts,tsx,mts,cts,json}",
                        "kind": 1
                    },
                    {
                        "globPattern": "$WORKSPACE_DIR/identity/**/*.{js,jsx,mjs,cjs,ts,tsx,mts,cts,json}",
                        "kind": 1
                    },
                    {
                        "globPattern": "$WORKSPACE_DIR/node_modules/**/*.{js,jsx,mjs,cjs,ts,tsx,mts,cts,json}",
                        "kind": 1
                    },
                    {
                        "globPattern": "$WORKSPACE_DIR/production/**/*.{js,jsx,mjs,cjs,ts,tsx,mts,cts,json}",
                        "kind": 1
                    },
                    {
                        "globPattern": "$WORKSPACE_DIR/tools/**/*.{js,jsx,mjs,cjs,ts,tsx,mts,cts,json}",
                        "kind": 1
                    },
                    {
                        "globPattern": "WORKSPACE_DIR/web/**/*.{js,jsx,mjs,cjs,ts,tsx,mts,cts,json}",
                        "kind": 1
                    },
                    {
                        "globPattern": "$HOME/<omitted>/node_modules/**/*.{js,jsx,mjs,cjs,ts,tsx,mts,cts,json}",
                        "kind": 1
                    }
                ]
            }
        }
    ]
}

mjames-c avatar Jun 02 '25 03:06 mjames-c