Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Godot .NET projects cannot be built using CI #92267

Closed
DSOE1024 opened this issue May 22, 2024 · 8 comments
Closed

Godot .NET projects cannot be built using CI #92267

DSOE1024 opened this issue May 22, 2024 · 8 comments

Comments

@DSOE1024
Copy link

Tested versions

4.2.2-stable
4.2.1-stable

System information

Ubuntu Debian

Issue description

godot --headless --verbose --export-release "Windows Desktop" ../build/windows/EXPORT_NAME.exe

The following error is displayed

ERROR: Parent node is busy setting up children, add_child() failed. Consider using add_child.call_deferred(child) instead.
at: add_child (scene/main/node.cpp:1415)
ERROR: Condition "!is_inside_tree()" is true.
at: popup_centered (scene/main/window.cpp:1658)

And it's gonna get stuck here

root@1626d711c6af:/Kaisha# ../Godot_v4.2.2-stable_mono_linux_x86_64/Godot_v4.2.2-stable_mono_linux.x86_64 --headless --verbose --export-release "Windows Desktop" ../build/windows/EXPORT_NAME.exe
Godot Engine v4.2.2.stable.mono.official.15073afe3 - https://godotengine.org
TextServer: Added interface "Dummy"
TextServer: Added interface "ICU / HarfBuzz / Graphite (Built-in)"
Using "default" pen tablet driver...
JoypadLinux: udev enabled and loaded successfully.

TextServer: Primary interface set to: "ICU / HarfBuzz / Graphite (Built-in)".
.NET: Initializing module...
Found hostfxr: /usr/lib/dotnet/host/fxr/8.0.5/libhostfxr.so
.NET: hostfxr initialized
.NET: GodotPlugins initialized
.NET: Failed to load project assembly
CORE API HASH: 622119089
EDITOR API HASH: 497707466
WARNING: Custom cursor shape not supported by this display server.
     at: cursor_set_custom_image (servers/display_server.cpp:505)
EditorSettings: Load OK!
WARNING: Blend file import is enabled in the project settings, but no Blender path is configured in the editor settings. Blend files will not be imported.
     at: _editor_init (modules/gltf/register_types.cpp:63)
Found .NET Sdk version '8.0.105': /usr/lib/dotnet/sdk/8.0.105
Loaded system CA certificates
EditorSettings: Save OK!

The project I tested using gdscript built smoothly, but C# projects can't be built, Is this an engine problem?
abarichello/godot-ci#140

Steps to reproduce

godot --headless --verbose --export-release "Windows Desktop" ../build/windows/EXPORT_NAME.exe

Minimal reproduction project (MRP)

None

@DSOE1024
Copy link
Author

I have tested the following images for ubuntu, debian, and Godot CI projects(https://github.com/abarichello/godot-ci ). The dotnet version uses 7

@raulsntos
Copy link
Member

I've been unable to reproduce this, could you provide an MRP? Also, can you reproduce when exporting using your computer instead of CI?

The dotnet version uses 7

.NET 7 is out of support. Consider using .NET 8. But this is likely unrelated to your issue.

@DSOE1024
Copy link
Author

I've been unable to reproduce this, could you provide an MRP? Also, can you reproduce when exporting using your computer instead of CI?

The dotnet version uses 7

.NET 7 is out of support. Consider using .NET 8. But this is likely unrelated to your issue.

Yes, it is possible to export without CI (windows and ubuntu)

@Aethedigm
Copy link

Aethedigm commented Jun 21, 2024

Identical issue - 4.2.2 C#, I am using .NET 8, however. Only an issue attempting to export from CLI, which is a bit of an issue for trying to configure automated builds/pipelines

TextServer: Added interface "Dummy"
TextServer: Added interface "ICU / HarfBuzz / Graphite (Built-in)"
Using "default" pen tablet driver...

TextServer: Primary interface set to: "ICU / HarfBuzz / Graphite (Built-in)".
.NET: Initializing module...
Found hostfxr: C:\Program Files\dotnet\host/fxr/8.0.6/hostfxr.dll
.NET: hostfxr initialized
.NET: GodotPlugins initialized
.NET: Failed to load project assembly
CORE API HASH: 622119089
EDITOR API HASH: 497707466
WARNING: Custom cursor shape not supported by this display server.
     at: cursor_set_custom_image (servers/display_server.cpp:505)
ERROR: Class 'EditorSettings' can only be instantiated by editor.
   at: instantiate (core/object/class_db.cpp:364)
ERROR: Could not load editor settings from path: C:/Users/krakm/AppData/Roaming/Godot/editor_settings-4.tres
   at: create (editor/editor_settings.cpp:936)
WARNING: Blend file import is enabled in the project settings, but no Blender path is configured in the editor settings. Blend files will not be imported.
     at: _editor_init (modules/gltf/register_types.cpp:63)
System.InvalidOperationException: The Godot editor API assembly is not loaded.
   at GodotPlugins.Main.LoadToolsAssembly(Char* nAssemblyPath, IntPtr unmanagedCallbacks, Int32 unmanagedCallbacksSize) in /root/godot/modules/mono/glue/GodotSharp/GodotPlugins/Main.cs:line 174
ERROR: FATAL: Condition "editor_plugin_obj == nullptr" is true.
   at: _editor_init_callback (modules/mono/csharp_script.cpp:1202)

Edit: Also worth noting, my Blend file import is NOT enabled. This warning only occurs through CLI exports.

Edit 2: Doing due diligence, this is NOT an issue in 4.3 beta 2

@igamigo
Copy link

igamigo commented Aug 31, 2024

This does still happen on 4.3. Tried this on MacOS and Linux and it happens on both places. It does not need to be headless either, nor a release build.

godot  --export-debug "Windows Desktop" test.exe

Godot Engine v4.3.stable.mono.official.77dcf97d8 - https://godotengine.org
Vulkan 1.2.283 - Forward+ - Using Device #0: Apple - Apple M3 Pro


ERROR: Class 'EditorSettings' can only be instantiated by editor.
   at: _instantiate_internal (core/object/class_db.cpp:521)
ERROR: Could not load editor settings from path: /Users/igamigo/Library/Application Support/Godot/editor_settings-4.3.tres
   at: create (editor/editor_settings.cpp:1074)
System.InvalidOperationException: The Godot editor API assembly is not loaded.
   at GodotPlugins.Main.LoadToolsAssembly(Char* nAssemblyPath, IntPtr unmanagedCallbacks, Int32 unmanagedCallbacksSize) in /root/godot/modules/mono/glue/GodotSharp/GodotPlugins/Main.cs:line 174
ERROR: FATAL: Condition "editor_plugin_obj == nullptr" is true.

@popcron
Copy link

popcron commented Oct 4, 2024

@DSOE1024 why was this closed as completed, was this resolved? this is still happening with 4.3 release images with the first error being ".NET: Failed to load project assembly" unlike with local builds

@raulsntos
Copy link
Member

@igamigo You are getting an exception that says: The Godot editor API assembly is not loaded. Make sure that the GodotSharpEditor.dll is in the expected location. The Godot editor executable that you are using for exporting should have a GodotSharp directory next to it, if you move the editor executable don't forget to move this directory too.

@popcron There are a lot of reasons why the project assembly could fail to load, can you provide more context? Even better if you can provide an MRP.

@popcron
Copy link

popcron commented Oct 4, 2024

i cant make an mrp right now but through my frustration switching from using abarichello's workflow to chickensoft, it worked. in the workflow i also did dotnet restore and build before asking godot to export builds, as well as generating the bindings in between, so it might be somewhere in this step unless abarichello's does something more custom. i dont know if the issue is missing bindings or a missing dotnet build but if this is the case, it would be lovely if the error output could be further specified to better pinpoint.

though my message was for @DSOE1024, id like to know what they did, perhaps they also switched their sequence of commands as chickensoft's required it to but they didnt put any info apart from simply closing

thanks for the response @raulsntos

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants