Closed f8122dac91 closed 1 year ago
In V-Sekai, we found that we were able to workaround this issue and produce successful exports by running mkdir -p .godot/editor .godot/imported
before attempting the headless export.
I would propose we automatically make these two directories very early when starting the editor, perhaps in Main::start
output log from bad build with no .godot folder.
reimport: begin: (Re)Importing Assets steps: 321
reimport: step 0: vr_manager_strings.csv
ERROR: Cannot create file 'res://.godot/editor/filesystem_update4'. Check user write permissions.
at: (editor/editor_file_system.cpp:1484)
SCRIPT ERROR: Compile Error: Identifier not found: EntityManager
at: GDScript::reload (res://addons/actor/player_controller.gd:292)
SCRIPT ERROR: Parse Error: Identifier "GameManager" not declared in the current scope.
at: GDScript::reload (res://net_demo/core/physics_object_multiplayer_synchronizer.gd:47)
ERROR: Cannot open MD5 file 'res://.godot/imported/vr_manager_strings.csv-aa4d36bad71565d78cabb2615439ceb3.md5'.
at: (editor/editor_file_system.cpp:2144)
reimport: step 1: menu_strings.csv
ERROR: Cannot create file 'res://.godot/editor/filesystem_update4'. Check user write permissions.
at: (editor/editor_file_system.cpp:1484)
ERROR: Cannot create file 'res://.godot/editor/filesystem_update4'. Check user write permissions.
at: (editor/editor_file_system.cpp:1484)
ERROR: Cannot open MD5 file 'res://.godot/imported/menu_strings.csv-40dd836640f634db9f72d88a2339a46a.md5'.
at: (editor/editor_file_system.cpp:2144)
reimport: step 2: roboto_mono_bold.ttf
ERROR: Cannot create file 'res://.godot/imported/roboto_mono_bold.ttf-4dc3641157d1c3625a7b2443555e60b1.fontdata'.
at: (core/io/resource_format_binary.cpp:2121)
ERROR: Cannot save font to file "res://.godot/imported/roboto_mono_bold.ttf-4dc3641157d1c3625a7b2443555e60b1.res".
at: (editor/import/resource_importer_dynamic_font.cpp:229)
ERROR: Error importing 'res://addons/emote_theme/fonts/roboto_mono_bold.ttf'.
at: (editor/editor_file_system.cpp:2023)
Output log from a good build if I created .godot/imported and .godot/editor:
ERROR: Cannot open file 'res://.godot/imported/xbot.vrm-bdee71d873ffea966b27e308ff38241f.scn'.
at: (core/io/resource_format_binary.cpp:1292)
reimport: begin: (Re)Importing Assets steps: 321
reimport: step 0: vr_manager_strings.csv
SCRIPT ERROR: Compile Error: Identifier not found: EntityManager
at: GDScript::reload (res://addons/actor/player_controller.gd:292)
SCRIPT ERROR: Parse Error: Identifier "GameManager" not declared in the current scope.
at: GDScript::reload (res://net_demo/core/physics_object_multiplayer_synchronizer.gd:47)
reimport: step 1: menu_strings.csv
reimport: step 2: roboto_mono_bold.ttf
reimport: step 3: roboto_mono_bold_italic.ttf
reimport: step 4: roboto_mono_italic.ttf
reimport: step 5: roboto_mono_regular.ttf
reimport: step 6: splash.png
(The GDScript errors are normal in my project and not related to this issue. Just left them in the log so I could compare.)
Godot version
4.0.beta16
System information
Linux.x86_64
Issue description
Running the following command to export a freshly pulled git repository:
fails to export proper artifacts and reports errors due to
res://.godot/imported
andres://.godot/editor
being unavailable. I suspect that the execution of--export
somehow assumes these directories exists, while the template.gitignore
excludes.godot/
.Example errors:
Since the provided
.gitignore
template for a new project contains.godot/
, most of the git repositories does not commit this directory, so running export command against a freshly pulled repositories will most likely to fail.These locations do get created on the first time GUI editor loads the project. However, for the environment that cannot load the GUI editor, e.g. containers for CI pipeline (which is what I was trying to do), export functionality from commandline won't work properly.
Workaround I Found for Now
I tried again after manually creating these two directory
.godot/{imported,editor}
, and the export succeeded.Steps to reproduce
.godot/
directory.<Godot_v4.0-beta16_linux.x86_64_BINARY_PATH> --headless --export-debug Linux/X11 ./project.godot <SOME_EXPORT_PATH>
Minimal reproduction project
minimal-project.zip