godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
91.38k stars 21.26k forks source link

CI export with FBX assets fails with "Cannot open file at: get_dependencies" due to missing FBX2glTF #77626

Open Deozaan opened 1 year ago

Deozaan commented 1 year ago

Godot version

v4.0.3.stable.official.5222a99f5

System information

Debian-based headless Linux (for CI)

Issue description

My CI export jobs are hanging during project import process. I get a few errors:

   at: get_dependencies (core/io/resource_format_binary.cpp:1249)
ERROR: Cannot open file 'res://.godot/imported/X Bot.fbx-c422bcd98ce3030946e5c21fac992c43.scn'.
   at: get_dependencies (core/io/resource_format_binary.cpp:1249)
ERROR: Cannot open file 'res://.godot/imported/Y Bot.fbx-0d76664621660db9cbfad83799fe2bea.scn'.
   at: get_dependencies (core/io/resource_format_binary.cpp:1249)
ERROR: Cannot open file 'res://.godot/imported/characterMedium.gltf-fd1d62874c08d2c67b23b07ecb619d17.scn'.
   at: get_dependencies (core/io/resource_format_binary.cpp:1249)

And then the job just hangs until it is terminated due to taking too long (after 1 hour by default).

Given that the files mentioned in the error message are in the .godot/imported folder, I believe that Godot should be creating them automatically when importing the project, but is failing to do so. As such, this might be related to #77508 but I'm not sure because in that case it eventually fails but for me it just hangs.

These error messages don't seem very helpful to me. It doesn't tell me why it expects those files to be there, or why it can't open them, or what I can do to get things working again.

Steps to reproduce

Run godot -v --headless --export-debug "Windows Desktop" ./exports/game.exe in a CI job.

Minimal reproduction project

N/A

akien-mga commented 1 year ago

I haven't tested, but I assume this might be because you don't have fbx2gltf setup in CI to import the fbx files, so Godot can't import them to do the export. You would need to set it up on CI, and somehow set the path to the fbx2gltf binary in the editor settings for your CI Godot instance.

If my assumption is correct, there are two things to improve:

Deozaan commented 1 year ago

Yes, your assumption turned out to be correct. I added FBX2glTF to my CI Godot image and configured Godot with the following line:

echo 'filesystem/import/fbx/fbx2gltf_path = "/usr/bin/FBX2glTF"' >> ~/.config/godot/editor_settings-4.tres

And now the CI job is passing. Thank you.

And I agree with your summary of what could be improved to help with this in the future. This issue can either be closed as resolved, or this issue can turn into a tracker for those two suggested improvements.

fire commented 7 months ago

In Godot 4.3 - master there is a new FBX importer that should behave better.