godotengine / godot-vscode-plugin

Godot development tools for VSCode
MIT License
1.47k stars 148 forks source link

Godot executable is invalid on macOS #598

Closed sanchan closed 2 months ago

sanchan commented 4 months ago

Godot version

v4.2.1.stable.official [b09f793f5]

VS Code version

1.86.2 (Universal)

Godot Tools VS Code extension version

2.0.0

System information

macOS 14.3.1

Issue description

I keep getting this error:

image

when my setting for the editor path is:

image

I suspect it could be related to the Filesystem type. I'm using APFS without case-sensitive (default on macOS)

Steps to reproduce

"godotTools.editorPath.godot4": "/Applications/Godot.app/Contents/MacOS/Godot",
stfufane commented 4 months ago

I can confirm I have the same issue on Mac OS Sonoma with the latest VS Code and version of the plugin. Somehow it doesn't prevent it to work, it just shows this error.

DaelonSuzuka commented 4 months ago

@sanchan

Your screenshot says (Also modified in workspace). Is there a path specified in ./.vscode/settings.json that's conflicting with the one specified in your user settings?

@stfufane

The error message should probably say some extension features will not work correctly. Only things that require launching a godot process, like using the debugger or opening the Editor, will require the editorPath to be set correctly.

debris commented 4 months ago

Your screenshot says (Also modified in workspace). Is there a path specified in ./.vscode/settings.json that's conflicting with the one specified in your user settings?

This solved the issue for me. Better error message would be definitely helpful. Especially when ./.vscode/settings.json is automatically created and user is oblivious to it's existance

stfufane commented 4 months ago

You're completely right, didn't notice it either 😬 That fixed it for me too, thanks for the tip !

DaelonSuzuka commented 4 months ago

Especially when ./.vscode/settings.json is automatically created and user is oblivious to it's existance

...What's automatically creating it? This extension shouldn't have done that. Can you share the entire ./.vscode/settings.json? (and maybe check when it was created?)

Better error message would be definitely helpful.

How do you think it could be improved? It's telling you exactly what path it tried. When you looked at your settings, you didn't notice that it was a different path than your user setting, and you didn't notice the (Also modified in workspace).

User settings being overridden by workspace settings is a fundamental feature of VSCode, and I both can't and wouldn't write the extension to do something like check where a particular setting is defined and react differently based on that.

joelpryde commented 4 months ago

I am getting this issue even with the local workspace settings cleared. I am pointing it at Godot_mono.app btw:

CleanShot 2024-02-26 at 11 49 54@2x CleanShot 2024-02-26 at 11 50 49@2x
DaelonSuzuka commented 4 months ago

I'm not a Mac guy, but I think /Applications/Godot_mono.app is a folder.

stfufane commented 4 months ago

I'm not a Mac guy, but I think /Applications/Godot_mono.app is a folder.

You're totally right ! The complete path should be /Applications/Godot_mono.app/Contents/MacOS/Godot

joelpryde commented 4 months ago

You are completely correct! My bad, I read "Application" instead of "executable" somehow. All working now. :)

Calinou commented 4 months ago

The extension could likely automatically attempt Contents/MacOS/Godot within the specified path when on macOS if the path doesn't exist.

brian-xu commented 4 months ago

After moving the application to my $HOME directory as suggested in the above mention, both issues appear to have completely disappeared.

charafau commented 1 month ago

After moving the application to my $HOME directory as suggested in the above mention, both issues appear to have completely disappeared.

as strange as it seems, it was also solution for me

christo8989 commented 1 month ago

This is what worked for me. /Applications/Godot.app/Contents/MacOS/Godot