godotengine / godot-git-plugin

Git implementation of the VCS interface in Godot
MIT License
701 stars 67 forks source link

Unable to load addon script from path: 'res://addons/godot-git-plugin/git_api.gdns'. #94

Closed zvonimirfras closed 2 years ago

zvonimirfras commented 2 years ago

On linux (x11) with the latest zip from AssetLib and the 1.2.2 from github releases. (tried both independently and quit the project in between)

The message in title is when I go to project settings plugins tab and click Enable checkmark next to the Godot Git Plugin. (that's the only plugin I have in the project)

Full message:

Warning!

Unable to load addon script from path: 'res://addons/godot-git-plugin/git_api.gdns'. This might be due to a code error in that script.
Disabling the addon at 'res://addons/godot-git-plugin/plugin.cfg' to prevent further errors.
Calinou commented 2 years ago

Please run the Godot editor from a terminal and check the output in the terminal. This is likely a duplicate of https://github.com/godotengine/godot-git-plugin/issues/82.

kkurczewski commented 2 years ago

Hello, I think it is likely same issue as in #82.

I tried with fresh installation of Godot 3.4.2.stable and plugin in version 1.2.2:

/usr/lib/x86_64-linux-gnu/libasound.so.2: undefined symbol: snd_dlpath
ERROR: Can't open dynamic library: /home/krzysiek/Godot/Sandbox/addons/godot-git-plugin/x11/release/libgitapi.so. Error: /home/krzysiek/Godot/Sandbox/addons/godot-git-plugin/x11/release/libgitapi.so: undefined symbol: pcre_free
   at: open_dynamic_library (drivers/unix/os_unix.cpp:403)
ERROR: Can't open dynamic library: /home/krzysiek/Godot/Sandbox/addons/godot-git-plugin/x11/release/libgitapi.so. Error: /home/krzysiek/Godot/Sandbox/addons/godot-git-plugin/x11/release/libgitapi.so: undefined symbol: pcre_free
   at: open_dynamic_library (drivers/unix/os_unix.cpp:403)
ERROR: No valid library handle, can't get symbol from GDNative object
   at: get_symbol (modules/gdnative/gdnative.cpp:510)
ERROR: No nativescript_init in "res://addons/godot-git-plugin/x11/release/libgitapi.so" found
   at: init_library (modules/gdnative/nativescript/nativescript.cpp:1510)
$ sudo apt show libpcre3
Package: libpcre3
Version: 2:8.39-12build1
$ ldd addons/godot-git-plugin/x11/release/libgitapi.so 
    linux-vdso.so.1 (0x00007ffe8f17a000)
    libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f9f42525000)
    libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f9f423d6000)
    libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f9f423bb000)
    libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f9f421c9000)
    /lib64/ld-linux-x86-64.so.2 (0x00007f9f42be5000)

I did naive patch by copying libgitapi.so from 1.2.1-x11 version which is significantly larger but then error changes to:

Unable to load addon script from path: 'res://addons/godot-git-plugin/git_api.gdns' Base type is not EditorPlugin.

No errors in console besides that.

Installing plain version 2.1.1-x11 is not resolved in plugin section, console output:

ERROR: Can't open dynamic library: /home/krzysiek/Godot/Sandbox/bin/x11/release/libgitapi.so. Error: /usr/local/bin/../lib/libgitapi.so: cannot open shared object file: No such file or directory
   at: open_dynamic_library (drivers/unix/os_unix.cpp:403)
ERROR:  does not have a library for the current platform.
   at: init_library (modules/gdnative/nativescript/nativescript.cpp:1486)
ERROR:  does not have a library for the current platform.
   at: init_library (modules/gdnative/nativescript/nativescript.cpp:1486)
ERROR:  does not have a library for the current platform.
   at: init_library (modules/gdnative/nativescript/nativescript.cpp:1486)
ERROR:  does not have a library for the current platform.
   at: init_library (modules/gdnative/nativescript/nativescript.cpp:1486)
twaritwaikar commented 2 years ago

Fixed in #103. A new 1.x release will contain this fix. If it still causes an issue, please open this bug again.

Thanks!

twaritwaikar commented 2 years ago

v1.2.3 has been released, which addresses this issue.

kkurczewski commented 2 years ago

Hello, just checked newest version 1.2.3 on my version Godot Engine v3.4.2.stable.official.45eaa2daf.

No errors in console about missing library, plugin is on list but I can't enable it, trying to do so ends with error box:

Unable to load addon script from path: 'res://addons/godot-git-plugin/git_api.gdns' Base type is not EditorPlugin.

If it helps debugging I can add that in GDNative tab I see there is entry git_api.gdnlib which is in status enabled.

twaritwaikar commented 2 years ago

@kkurczewski Enabling this plugin should be done through Project > Version Control > Set Up Version Control. Could you check if that works for your project?

kkurczewski commented 2 years ago

Ahh... okay, it works like a charm. :+1:

My mistake was that I was looking at "Installation" instruction but I skipped "Usage section", other plugin I installed required this checkbox in plugins to be enabled which confused me.

Thanks :smile:

M2WZ commented 1 year ago

Hi, I seem to be running into the same issue: I'm running Godot v3.5.1.stable.official on Fedora Linux 36. I installed the files from Github, v2.1.0, just like the wiki explains. image Both Project -> Version Control -> Set Up Version Control and Project -> Project Settings -> Plugins -> Enabling Godot Git Plugin give the errors described earlier: No VCS plugins are available.

Unable to load addon script from path: 'res://addons/godot-git-plugin/git_api.gdns'. This might be due to a code error in that script. Disabling the addon at 'res://addons/godot-git-plugin/plugin.cfg' to prevent further errors.

I've restarted Godot multiple times, reinstalled this plugin, and I made sure git is installed on my pc.

Does anyone know what could be wrong? Please let me know if you need more info.

Thanks!

twaritwaikar commented 1 year ago

@M2WZ From your screenshot, it doesn't look like the plugin is on a different path than expected. So this should work technically. As a possible workaround, you mentioned that you placed the files manually, so could you try installing the plugin from the Asset library instead?

Also, the only way to enable this plugin right now is to use the Project > Version Control menu

M2WZ commented 1 year ago

Installing from the AssetLib worked flawlessly, thanks!

I downloaded v2.1.0 from Github (compatible with 3.5, according to the release info), which didn't work. Then I saw the Asset Library provided v1.2.3, so I tried downloading that one from Github releases. That worked fine, even though it says it is only compatible with 3.2.x-3.4.x, while I'm running 3.5.1. So it seems the release info on Github is wrong, at least for Linux.

Could you maybe change the release notes/wiki to make it clear v2.1.0 is not compatible with 3.5 on Linux and people should use v1.2.3?

Thanks for your help!

twaritwaikar commented 1 year ago

Hmm, this doesn't sound right. The mappings between the documented compatible Godot versions and the plugin versions should be 100% accurate.

If it isn't then something else went wrong either when setting the plugin up on the user side, or while packing up the plugin because this seems to be the first time this has been reported while we have had a few thousand Linux users on 2.x.

M2WZ commented 1 year ago

Well that's embarrassing... I'm sorry, I have no clue where I went wrong, but the versions are indeed right. I made a few dummy projects to test. Each time I loaded v1.2.3, it showed the Set up...-screen and I could Initialize it, but it didn't show any changes. Loading v2.1.0 worked fine, but it seem to do so last time, no clue why. I probably messed up with copying the files over, sorry for bothering you.

RelicSoulz commented 2 months ago

can someone tell me what im doing wrong im new to this I installed everything needed to run this asset but keep getting this error ive tried older and newer version and still the same error. Screenshot 2024-07-01 121117