Skip to content

Godot Git Plugin (4.1+) .gdextension not recognized #267

Closed

Description

@CodyChase88

File compatibility using Godot_v4.3-stable_win64 and Godot Git Plugin (4.1+).

When trying to enable the plugin (Project -> Project Settings -> Plugins) I get the following error:

Unable to load addon script from path: 'res://addons/godot-git-plugin/godot-git-plugin.gd'.

the current use of the plugin uses '.gdextension' files instead of '.gd' which is what Godot seems to be expecting.

I've verified the correct expected file structure to ensure I'm not missing any of the required dependencies:

addons/
└── godot-git-plugin/
├── git_plugin.gdextension
├── plugin.cfg
├── LICENSE
├── THIRDPARTY.md
├── win64/ (for Windows) or equivalent for your platform
│ ├── libgit_plugin.windows.editor.x86_64.dll
│ ├── libgit_plugin.windows.editor.x86_64.lib
│ ├── libgit_plugin.windows.editor.x86_64.exp

But cannot get Godot to recognize the plugin without the godot-git-plugin.gd file

Activity

  1. IvanOfThings commented on Jan 12, 2025

    @IvanOfThings

    I have the same problem, same files structure but godot does not recognize the plugin

  2. LexGear commented on Jan 16, 2025

    @LexGear

    I just downloaded this addon and tried to enable it and got the same result on Godot 4.3.stable using version 3.1.1 of the addon. I am on Linux.

  3. cgmartin commented on Jan 16, 2025

    @cgmartin

    Same issue. Including some additional output in case it helps with anyone searching for this:

    Godot Engine v4.3.stable.mono.official (c) 2007-present Juan Linietsky, Ariel Manzur & Godot Contributors.
    --- Debug adapter server started on port 6006 ---
    --- GDScript language server started on port 6005 ---
      Cannot get class 'GitPlugin'.
      Received a nullptr VCS extension instance during construction.
    
  4. SeanRamey commented on Jan 21, 2025

    @SeanRamey

    Same issue here also.

  5. Calinou commented on Jan 21, 2025

    @Calinou
    Member

    Can you try modifying addons/godot-git-plugin/plugin.cfg and replace this line:

    script="godot-git-plugin.gd"

    With this line:

    script="git_plugin.gdextension"

    There are no GDScript files within this repository, so I assume the GDExtension file is the new entry point.

  6. cgmartin commented on Jan 22, 2025

    @cgmartin

    Hi, I modified addons/godo-git-plugin/plugin.cfg with script="git_plugin.gdextension", and see this output:

    Godot Engine v4.3.stable.mono.official (c) 2007-present Juan Linietsky, Ariel Manzur & Godot Contributors.
    --- Debug adapter server started on port 6006 ---
    --- GDScript language server started on port 6005 ---
    Found a repository at C:/Users/myuser/Src/Godot Projects/test-project/.git/.
    Selected repository path: C:/Users/myuser/Src/Godot Projects/test-project/.git/.
    

    But when I select the Version Control panel, it is empty (screenshot below):

    Image
  7. Trodgy commented on Feb 16, 2025

    @Trodgy

    adding onto what was pointed out above (through doing the same thing of changing the script value in plugin.cfg to git_plugin.gdextension), for me instead of it showing version control or anything at all it just throws this into the console any time I try to turn on the plugin and does nothing else.

    Image

    also as far as I can tell this bug has been there at least since v4.3 stable released cuz it has just thrown the same error that the op pointed out since then.
    on version v4.3.stable.official [77dcf97d8]

  8. kipwilliams commented on Feb 18, 2025

    @kipwilliams

    I also see the same problem. And when I try and patch it lik @Trodgy has done, I see the exact same error

  9. greenturtle537 commented on Feb 22, 2025

    @greenturtle537

    I'm half sure this comment chain is going crazy...The .gdextension has always been and always will be.
    The setup works perfectly fine (although I suppose the README could use an update). Here's the documentation for the intended behavior, which works fine on my machine.

    Note: You may have to restart your editor to get the .gdextension working

    https://github.com/godotengine/godot-git-plugin/wiki/Git-plugin-v3

    @Trodgy @kipwilliams Let me know if this worked for you :)

  10. Trodgy commented on Feb 23, 2025

    @Trodgy

    I'm half sure this comment chain is going crazy...The .gdextension has always been and always will be. The setup works perfectly fine (although I suppose the README could use an update). Here's the documentation for the intended behavior, which works fine on my machine.

    Note: You may have to restart your editor to get the .gdextension working

    https://github.com/godotengine/godot-git-plugin/wiki/Git-plugin-v3

    @Trodgy @kipwilliams Let me know if this worked for you :)

    Ah. I've realized what the problem is.
    This entire problem just happens when you try to enable the plugin via the plugins menu. It doesn't actually break at all it just throws the error the op brought up in the console cuz it's looking for a script that just never existed in the first place (and doesn't need to for the plugin to work).

    Honestly I think from this a good addition would be to have a UI that shows up on install that just tells you not to try enabling it via the plugins menu (and better yet to just follow the setup instructions on the page you linked lol) cuz I completely forgot that was how it was meant to be set up from last time I used it lmao.

  11. shoeffner commented on Apr 12, 2025

    @shoeffner

    Indeed, this is "purely cosmetic".

    @cgmartin, to see anything in the Version Control panel, you must selet a commit from the commit list. You can find the commit list in the "Commit" tab, which is (by default) next to the Inspector/Node/History tabs:
    Commit tab

    However, if you want to be able to "fake"-enable the plugin without it throwing any errors, you can add this res://addons/godot-git-plugin/godot-git-plugin.gd:

    @tool extends EditorPlugin
    

    This prevents the error as there is now an (empty) plugin script to load; though it can be confusing if you try to "disable" the plugin that way, as the gdextension will be loaded nonetheless.

  12. Swivelgames commented on Apr 16, 2025

    @Swivelgames

    Tip

    Everything is working, despite it looking like it isn't!

    In the far right of your editor, you'll notice a new Commit (X) panel

    Image

    That being said, there is some oddities with the way the plugin is configured. If script is required for addons, then it probably should come out of the box with an empty .gd script.

    Image

    $ tree addons/godot-git-plugin
    addons/godot-git-plugin
    ├── git_plugin.gdextension
    ├── git_plugin.gdextension.uid
    ├── LICENSE
    ├── linux
    │   └── libgit_plugin.linux.editor.x86_64.so
    ├── macos
    │   └── libgit_plugin.macos.editor.universal.dylib
    ├── plugin.cfg
    ├── THIRDPARTY.md
    └── win64
        ├── libgit_plugin.windows.editor.x86_64.dll
        ├── libgit_plugin.windows.editor.x86_64.exp
        └── libgit_plugin.windows.editor.x86_64.lib
    
    4 directories, 10 files
    

    The plugin.cfg is pointing to a script that doesn't exist:

    Image

    And I get the following errors:

      ERROR: Attempt to open script 'res://addons/godot-git-plugin/godot-git-plugin.gd' resulted in error 'File not found'.
      ERROR: Failed loading resource: res://addons/godot-git-plugin/godot-git-plugin.gd. Make sure resources have been imported by opening the project in the editor at least once.
    

    If I attempt to use the git_plugin.gdextension it, naturally, fails:

      ERROR: No loader found for resource: res://addons/godot-git-plugin/git_plugin.gdextension (expected type: Script)
    
  13. added 7 commits that reference this issue on May 27, 2025
    9da20b6
    93653b4
    5689692
    637785b
    737be4d
    4372188
    2a4c781
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions