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

YAT (C#) throwing errors after installation. #246

Closed
Serotonindude opened this issue Mar 5, 2024 · 4 comments
Closed

YAT (C#) throwing errors after installation. #246

Serotonindude opened this issue Mar 5, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@Serotonindude
Copy link

Describe the bug

After downloading and installing of YAT (C#) Version: 1.25.0-beta I get immediately:

 Missing required editor-specific import metadata for a texture (please reimport it using the 'Import' tab): 'res://.godot/imported/orphan_green.svg-9ce01031b489dea619e91196cb66dce9.editor.meta'
  Missing required editor-specific import metadata for a texture (please reimport it using the 'Import' tab): 'res://.godot/imported/orphan_red1.svg-8ddad0e8a9c8884f19621c8f733ce341.editor.meta'
  Missing required editor-specific import metadata for a texture (please reimport it using the 'Import' tab): 'res://.godot/imported/orphan_red2.svg-3ab7610a37b37b2e46ca7faaba5a2c40.editor.meta'
  Missing required editor-specific import metadata for a texture (please reimport it using the 'Import' tab): 'res://.godot/imported/orphan_red3.svg-2f1ae0a474446c730d13e401878da7f2.editor.meta'
  Missing required editor-specific import metadata for a texture (please reimport it using the 'Import' tab): 'res://.godot/imported/orphan_red4.svg-b6aa919f74c7c5f9e6a5a87210e2194e.editor.meta'
  Missing required editor-specific import metadata for a texture (please reimport it using the 'Import' tab): 'res://.godot/imported/orphan_red5.svg-94eac4c39a2d4020f502eab72982b3f2.editor.meta'
  Missing required editor-specific import metadata for a texture (please reimport it using the 'Import' tab): 'res://.godot/imported/orphan_red6.svg-fb927f6dc4442199133d2e25e9d9d21a.editor.meta'
  Missing required editor-specific import metadata for a texture (please reimport it using the 'Import' tab): 'res://.godot/imported/orphan_red7.svg-4b4ab8aec1bc8343d5df6b64a24f7c22.editor.meta'
  Missing required editor-specific import metadata for a texture (please reimport it using the 'Import' tab): 'res://.godot/imported/TestCaseError1.svg-43d13ea25f9f8c66fecf5a0ab4a752ad.editor.meta'
  Missing required editor-specific import metadata for a texture (please reimport it using the 'Import' tab): 'res://.godot/imported/TestCaseError2.svg-27dc52b88f226d741b1f9c1294295841.editor.meta'
  Missing required editor-specific import metadata for a texture (please reimport it using the 'Import' tab): 'res://.godot/imported/TestCaseFailed1.svg-32464e8f6fa7f74ad74a7534dfaba019.editor.meta'
  Missing required editor-specific import metadata for a texture (please reimport it using the 'Import' tab): 'res://.godot/imported/TestCaseFailed2.svg-aa38e10f09edf43b31b1c0a4caf549c5.editor.meta'
  Missing required editor-specific import metadata for a texture (please reimport it using the 'Import' tab): 'res://.godot/imported/TestCaseFailed.svg-151182f42f6b32bd8c6dc168e9469b54.editor.meta'
  Missing required editor-specific import metadata for a texture (please reimport it using the 'Import' tab): 'res://.godot/imported/TestCaseSuccess1.svg-3eadebb620a3275b67f53d505bc0f96b.editor.meta'
  Missing required editor-specific import metadata for a texture (please reimport it using the 'Import' tab): 'res://.godot/imported/TestCaseSuccess2.svg-7767c6ebe7bd14d031b8c87b24e08595.editor.meta'
  Missing required editor-specific import metadata for a texture (please reimport it using the 'Import' tab): 'res://.godot/imported/Progress1.svg-baca226eb5c6ca50a0b5f3af77fe615c.editor.meta'
  Missing required editor-specific import metadata for a texture (please reimport it using the 'Import' tab): 'res://.godot/imported/Progress2.svg-6a0cbcb42a8df535c533cf79599952d6.editor.meta'
  Missing required editor-specific import metadata for a texture (please reimport it using the 'Import' tab): 'res://.godot/imported/Progress3.svg-0b465f11e95f98f7b157a0bf0ded40c1.editor.meta'
  Missing required editor-specific import metadata for a texture (please reimport it using the 'Import' tab): 'res://.godot/imported/Progress4.svg-09def7d3fee66ec2764c9bbd72c3a961.editor.meta'
  Missing required editor-specific import metadata for a texture (please reimport it using the 'Import' tab): 'res://.godot/imported/Progress5.svg-9874b4bd1c734fd859a28d95960c17c5.editor.meta'
  Missing required editor-specific import metadata for a texture (please reimport it using the 'Import' tab): 'res://.godot/imported/Progress6.svg-0a3b2b954e3a285cee1f29222aac701b.editor.meta'
  Missing required editor-specific import metadata for a texture (please reimport it using the 'Import' tab): 'res://.godot/imported/Progress7.svg-e824844cb9cfdf076f9196cf47098a7d.editor.meta'
  Missing required editor-specific import metadata for a texture (please reimport it using the 'Import' tab): 'res://.godot/imported/Progress8.svg-b37d84176a257f378f0f5dff81bfc322.editor.meta'
  Missing required editor-specific import metadata for a texture (please reimport it using the 'Import' tab): 'res://.godot/imported/clock.svg-b16f5d68e1dedc017f1ce1df1e590248.editor.meta'
  Missing required editor-specific import metadata for a texture (please reimport it using the 'Import' tab): 'res://.godot/imported/errors.svg-53aa38a5c5d3309095cd34f36952f16b.editor.meta'
  Missing required editor-specific import metadata for a texture (please reimport it using the 'Import' tab): 'res://.godot/imported/failures.svg-8659a946adf9b0616e867a8bf0855d3d.editor.meta'
  Missing required editor-specific import metadata for a texture (please reimport it using the 'Import' tab): 'res://.godot/imported/PlayDebug.svg-d3618ec14e2e4cb6b467c3249916f8dd.editor.meta'
  Missing required editor-specific import metadata for a texture (please reimport it using the 'Import' tab): 'res://.godot/imported/PlayOverall.svg-d07157735d6bab5d74465733e8213328.editor.meta'
  Missing required editor-specific import metadata for a texture (please reimport it using the 'Import' tab): 'res://.godot/imported/TestCase.svg-f6ee172ad0e725d3612bec1b6f3c8078.editor.meta'
  Missing required editor-specific import metadata for a texture (please reimport it using the 'Import' tab): 'res://.godot/imported/TestCaseError.svg-373307086979f3f0e012eb3660cc91ec.editor.meta'
  Missing required editor-specific import metadata for a texture (please reimport it using the 'Import' tab): 'res://.godot/imported/TestCaseFailed.svg-df47525fd14d5e4149690cacd8eb08db.editor.meta'
  Missing required editor-specific import metadata for a texture (please reimport it using the 'Import' tab): 'res://.godot/imported/TestCaseSuccess.svg-aaf852c6aeda68c93a410c7480502895.editor.meta'
  Missing required editor-specific import metadata for a texture (please reimport it using the 'Import' tab): 'res://.godot/imported/TestSuite.svg-f3ba31540dedae19e6c1b7b050a1b5d7.editor.meta'

On activating the gdunit4 plugin I get:

  res://addons/gdUnit4/src/ui/GdUnitInspector.gd:2 - Parse Error: Class "GdUnitInspecor" hides a global script class.
  modules/gdscript/gdscript.cpp:2788 - Failed to load script "res://addons/gdUnit4/src/ui/GdUnitInspector.gd" with error "Parse error". (User)
  res://addons/gdUnit4/src/network/GdUnitTcpServer.gd:2 - Parse Error: Class "GdUnitTcpServer" hides a global script class.
  modules/gdscript/gdscript.cpp:2788 - Failed to load script "res://addons/gdUnit4/src/network/GdUnitTcpServer.gd" with error "Parse error". (User)
  res://Addons/gdUnit4/src/mono/GdUnit4CSharpApiLoader.gd:25 - Invalid call. Nonexistent function 'Version' in base 'CSharpScript'.
  res://addons/gdUnit4/src/network/GdUnitServer.gd:4 - Trying to assign value of type 'GdUnitTcpServer.gd' to a variable of type 'GdUnitTcpServer.gd'.
  res://addons/gdUnit4/src/network/GdUnitServer.gd:8 - Invalid call. Nonexistent function 'start' in base 'Nil'.

But it's enabled in the settings afterwards.

When enabling YAT in plugins, I get a message box with:

Unable to load addon script from path: 'res://addons/yat/Plugin.cs'. This might be due to a code error in that script.
Disabling the addon at 'res://addons/yat/plugin.cfg' to prevent further errors.

I've seen the Class "GdUnitInspecor" hides a global script class. on several other plugins before, but those were not labeled C#. So I thought they just don't run with the Mono version of Godot.

Desktop/smartphone (please complete the following information):

  • Godot v4.2.1.stable.mono - macOS 14.1.2 - Vulkan (Forward+) - integrated Apple M1 Pro - Apple M1 Pro (10 Threads)
  • YAT (C#) 1.25.0-beta
  • .NET 8
@Serotonindude Serotonindude added the bug Something isn't working label Mar 5, 2024
@MASSHUU12
Copy link
Owner

Hey, thanks for the report.

It looks like the vast majority of the errors are related to gdunit4, which does not belong to me, and I am not working on it.
I've been having problems with this plugin for a long time, it doesn't detect tests at all, won't run them or anything, making it hard to test YAT. I am currently waiting for an update, if nothing changes, I will look for another plugin.

The strange thing is that you have gdunit4 downloaded at all, because I checked in .gitattributes not to export it. I'll take a look at it and in the next update it won't be an issue anymore, for now just delete the folder with gdunit4.

On the other hand, as for the problem concerning YAT directly, the error you mention occurs when there is no C# solution created in the project, and this error in such a situation will appear with any plugin written in C#.

To create a C# solution in your project, you must select Project > Tools > C# > Create C# solution in the upper left corner of the window. A new hammer icon will appear in the upper right corner of the screen to compile the project. But before you can do that, you need to make some adjustments to the newly created .csproj file (I'll have to refresh the documentation).

The file should look as follows (minimum .NET 7 and C# 11):

<Project Sdk="Godot.NET.Sdk/4.2.1">
  <PropertyGroup>
    <TargetFramework>net7.0</TargetFramework>
    <TargetFramework Condition=" '$(GodotTargetPlatform)' == 'android' ">net7.0</TargetFramework>
    <TargetFramework Condition=" '$(GodotTargetPlatform)' == 'ios' ">net8.0</TargetFramework>
    <EnableDynamicLoading>true</EnableDynamicLoading>
    <LangVersion>11.0</LangVersion>
  </PropertyGroup>
  <ItemGroup>
    <Compile Remove="script_templates/**/*.cs" />
  </ItemGroup>
</Project>

If something still doesn't work, or you have more questions, I'm here to help.

@MASSHUU12
Copy link
Owner

I have just released a new version that fixes these problems, among other things.

It is still required to create a C# solution and make changes to the .csproj. I wrote an instruction similar to my message above, which can be found here.

@Serotonindude
Copy link
Author

Hey,
thanks for the great and extensive answers!
Of course I already had a solution and project (otherwise nothing would have worked), which I don't remember where it actually came from. Must have been created by Godot on project creation. Though, the project file looked a bit different. Learned about Project > Tools > C# > Create C# solution from you, that's nice. Created a new one, updated it with my own changes. Removed the gdunit4 stuff. Still the plugin would fail to load.
After some fiddling around and it still complaining about not being able to be loaded from res://addon/yat... I saw, that my addon folder is spelled Addon with a capital A. Well, I'm on a case sensitive system here as far as paths go, and probably Godot paths are also case sensitive? Must have changed or created it to/with a capital A. So I changed it to being lower case (although it's ugly now, since all other folders are capital cased :D). And see there, everything works. :D Even other plugins suddenly work. I'm an idiot. :D
Though, the Godot editor still crashes when I install the plugin for the first time. Guess something goes wrong with registering the input maps or beforehand? Had to add the input maps manually afterwards. But the thing works now. :)
One other thing. I'm having a 4k display on a relatively small screen size. The UI of the terminal is really small and hard to read. Is there a way to change that?
Kind regards

@MASSHUU12
Copy link
Owner

Hey, glad to hear that everything is working now.

Godot allows you to change the plugin installation folder, so you would probably be able to install YAT where you want.
Rather, there should be no conflicts with the paths in the plugin itself. When I have a moment, I'll make sure everything works fine from a different location.

As for Godot crashing, on the other hand, it is unfortunately quite common and is unlikely to be caused by the plugin. Only autoload is registered during activation, and beyond that nothing else happens. Default input maps are registered by YAT on _Ready in autoload.
From my observations, Godot can crash quite often when doing something related to the file system.

At the moment, I'm limited to a Windows PC with a FHD monitor, so it's hard for me to test YAT on another system. I plan to change that soon, so I'll probably detect a lot of hidden bugs at this point.

I thought that the terminal scales reasonably well, but it turns out that I was wrong, and as a result I will try to address this as a priority. At this point, you can sort of get around this by scaling the whole interface, but it won't look pretty. You can find this option in Project > Project Settings > Display > Window > Stretch > Scale.

If you have more questions, or find more errors you can of course open a new issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants