godot-vscode-plugin icon indicating copy to clipboard operation
godot-vscode-plugin copied to clipboard

Couldn't connect to the lang.server at random port

Open ParadoxV5 opened this issue 1 year ago • 5 comments

Godot version

v4.3.stable.steam [77dcf97d8]

VS Code version

Version: 1.93.0 (system setup)

Godot Tools VS Code extension version

v2.1.0

System information

Windows 11

Issue description

The extension fails with a random port number ~~unless it’s reloaded after opening the VSCode Settings window~~ (placebo) until half a minute after Godot Engine starts.

Couldn't connect to the GDScript language server at 127.0.0.1:random number. Is the Godot editor or language server running?

Yes, random port number, differing each failed retry, as if reading from an uninitialized uint16.

Steps to reproduce

I opened my project VSCode (from Godot or manually) after opening it in Godot Editor.

settings.json

{
"godotTools.editorPath.godot4": "C:/Program Files (x86)/Steam/steamapps/common/Godot Engine/godot.windows.opt.tools.64.exe",
"godotTools.inlayHints.gdscript": true,
"godotTools.lsp.autoReconnect.attempts": 2,
"godotTools.lsp.headless": true,
"godotTools.lsp.serverPort": 6005,
"godotTools.scenePreview.previewRelatedScenes": "anyFolder"
}

ParadoxV5 avatar Sep 09 '24 17:09 ParadoxV5