GDQuest / gdscript-docs-maker

Create documentation and class references from your Godot GDScript code
MIT License
261 stars 26 forks source link

Dockerfile: The file /game/reference.json was not found #96

Closed Turtyo closed 6 months ago

Turtyo commented 6 months ago

I'm submitting a...

Bug report

This is a potential bug on the docker image (pulled from the official docker image

What is the current behavior? When running:

sudo docker run --rm -v /home/turtyo/[a path]/doc_comment_test:/game -v /home/turtyo/[a path]/doc_comment_test/doc:/output gdquest/gdscript-docs-maker:latest /game -o /output

I am getting:

Checking parameters
Copying collectors to project directory
Generating reference json data...
Done.
There was an error generating the reference from Godot. The file /game/reference.json was not found.

What is the expected behavior?

The /game/reference.json should exist, or it does but not in the correct place, it should be where the script expect it to find

Tell us the steps to reproduce the bug, and if possible share a minimal demo of the problem.

The project I'm doing this one (basically a copy of the Godot's example on documenting code, nothing fancy)

project.zip

Other

Other information

Here is the godot.log file i'm getting after running the docker instance:

Godot Engine v3.3.2.stable.official - https://godotengine.org

**ERROR**: Failed to retrieve non-existent singleton 'GDScriptLanguageProtocol'.
   At: core/engine.cpp:198:get_singleton_object() - Condition "!E" is true. Returned: __null
**SCRIPT ERROR**: Attempt to call function 'get_workspace' in base 'null instance' on a null instance.
   At: res://Collector.gd:84:get_reference() - Attempt to call function 'get_workspace' in base 'null instance' on a null instance.
**SCRIPT ERROR**: Invalid type in function 'print_pretty_json' in base 'SceneTree (Collector.gd)'. Cannot convert argument 1 from Nil to Dictionary.
   At: res://ReferenceCollectorCLI.gd:19:_init() - Invalid type in function 'print_pretty_json' in base 'SceneTree (Collector.gd)'. Cannot convert argument 1 from Nil to Dictionary.
**ERROR**: Condition "_first != __null" is true.
   At: ./core/self_list.h:112:~List() - Condition "_first != __null" is true.
**ERROR**: Condition "_first != __null" is true.
   At: ./core/self_list.h:112:~List() - Condition "_first != __null" is true.
**WARNING**: ObjectDB instances leaked at exit (run with --verbose for details).
   At: core/object.cpp:2132:cleanup() - ObjectDB instances leaked at exit (run with --verbose for details).
**ERROR**: Resources still in use at exit (run with --verbose for details).
   At: core/resource.cpp:450:clear() - Resources still in use at exit (run with --verbose for details).

I'm noticing the container runs the 3.3.2 Godot version, but my project is in version 4.2. There might a compatibility issue there, but I did not find the container that runs the 4.2 version (if it exists, please link it to me so i can test if that works or not)

Edit: this might be the exact same problem as #95

NathanLovato commented 6 months ago

This project is for Godot 3. You won't be able to run it with Godot 4. I'll update the readme to specify that it doesn't work with Godot 4.

Turtyo commented 6 months ago

I see, it was a bit confusing since Godot 4 was mentioned multiple times in the previous README Thank you for updating @NathanLovato Maybe you should take a look at #51 since they seem to be trying to make it work on Godot 4 versions too