MikeSchulze / gdUnit4

A Godot Unit Test Framework. Support for GDScript and C# unit testing
MIT License
490 stars 28 forks source link

GD-499: Errors in the console after enabling addon #499

Closed Gennon closed 3 weeks ago

Gennon commented 3 weeks ago

The used GdUnit4 version

4.3.1 (Latest Release)

The used Godot version

v4.2.2.stable.mono.official

Operating System

Windows 11

Describe the bug

I get several errors in the console when enabling the addon. This can be reproduced using a new project.

image

Godot Engine v4.2.2.stable.mono.official (c) 2007-present Juan Linietsky, Ariel Manzur & Godot Contributors.
--- Debug adapter server started ---
--- GDScript language server started on port 6005 ---
[LSP] Connection Taken
  editor/editor_settings.cpp:221 - EditorSettings::_get - Property not found: text_editor/theme/highlighting/gdscript/annotation_color
  res://addons/gdUnit4/src/ui/templates/TestSuiteTemplate.gd:57 - Trying to assign value of type 'Nil' to a variable of type 'Color'.
  editor/editor_settings.cpp:221 - EditorSettings::_get - Property not found: text_editor/theme/highlighting/gdscript/annotation_color
  res://addons/gdUnit4/src/ui/templates/TestSuiteTemplate.gd:57 - Trying to assign value of type 'Nil' to a variable of type 'Color'.
  res://addons/gdUnit4/src/mono/GdUnit4CSharpApiLoader.gd:9 - Invalid call. Nonexistent function 'new' in base 'CSharpScript'.
  res://addons/gdUnit4/src/mono/GdUnit4CSharpApiLoader.gd:25 - Invalid call. Nonexistent function 'Version' in base 'Nil'.
Loading GdUnit4 Plugin success
GdUnit4Net version '' loaded.
GdUnit4: Test server successfully started checked port: 31002

Steps to Reproduce

Reproduce:

  1. Open the Godot 4.2.2 mono application
  2. Create a new project.
  3. Download and install version 4.3.1 of GdUnit4
  4. Enable the plugin
  5. Observe the error in the console.

Minimal reproduction project

No response

MikeSchulze commented 3 weeks ago

This is a known issue and is related to a Godot problem of loading plugins, the Godot cache is not fully build. You need to restart the Godot editor and the errors are gone.

Gennon commented 3 weeks ago

It could be that this is Godot related, however I always get these errors every time I start the editor.

MikeSchulze commented 3 weeks ago

You get it every time you start, please close Godot and then delete the .godot folder, then restart Godot twice. Please give me feedback if this helped.

Gennon commented 3 weeks ago

Ok, deleted the .godot folder and the those errors dissappeared for two projects I have tested with. However I get these now:

Godot Engine v4.2.2.stable.mono.official (c) 2007-present Juan Linietsky, Ariel Manzur & Godot Contributors.
--- Debug adapter server started ---
--- GDScript language server started on port 6005 ---
  res://addons/gdUnit4/src/mono/GdUnit4CSharpApiLoader.gd:9 - Invalid call. Nonexistent function 'new' in base 'CSharpScript'.
  res://addons/gdUnit4/src/mono/GdUnit4CSharpApiLoader.gd:25 - Invalid call. Nonexistent function 'Version' in base 'Nil'.
Loading GdUnit4 Plugin success
GdUnit4Net version '' loaded.
GdUnit4: Test server successfully started checked port: 31002
Running test discovery ..
0 test suites discovered.

It is a bit weird that the errors are identical in two different projects if this is a random Godot issue.