Godot: Godot server version fails to run projects.

Created on 27 Apr 2020  路  8Comments  路  Source: godotengine/godot

Godot version:
Godot v3.2.1 stable mono linux server 64 bit

OS/device including version:
Ubuntu Linux 18.04/PC

Issue description:
Trying to launch a project fails. For example:

./godot --path /path/to/project

Results in:

ERROR: start: Condition "!valid_type" is true. Continuing.
   At: main/main.cpp:1693.

Or sometimes with some projects:

ERROR: can_instance: Method failed. Returning: __null
   At: modules/mono/csharp_script.cpp:2912.

I had one other random person test it and it failed for them too. Bug seems to be present in latest preview also. Didn't test older versions.

The project runs perfectly in the GUI version of Godot.

Steps to reproduce:
0) Download and unpack fresh Godot server:
https://downloads.tuxfamily.org/godotengine/3.2.1/mono/Godot_v3.2.1-stable_mono_linux_server_64.zip
1) Create a minimal project with one node.
2) Attach a C# script.
3) Put Console.WriteLine("Hello"); in the script or anything that gives output to console.
4) Try to run it from command line either with:
./godot --path path/to/project
Or with:
./godot path/to/project/project.godot
5) See it fail miserably.

Minimal reproduction project:
https://www.dropbox.com/s/voqut71tdloj5sd/bugtest.tar.gz?dl=0

bug mono

Most helpful comment

Can confirm that, bug occurs even on 3.2.2 beta (i was the random person)
Headless version works fine
OS: Arch linux

All 8 comments

cc @neikeq

Can confirm that, bug occurs even on 3.2.2 beta (i was the random person)
Headless version works fine
OS: Arch linux

Can you run the game in verbose mode (--verbose) and paste here the full output?

What is happening here is that right now you can't just run an export template with the path to a project. Right now, export templates depend on the Godot editor export process.
The game probably works with these manual steps:

  • Build the solution for the export template: msbuild /p:Configuration=ExportDebug ProjectSolution.sln (or ExportRelease if release template).
  • Generate scripts metadata: Most of the time you can re-use the editor's, so copy res://.mono/metadata/scripts_metadata.editor_player to res://.mono/metadata/scripts_metadata.debug (or scripts_metadata.release if release template).
  • Your export template should include the data directory. For the game to detect it, the data directory must be renamed to data_<ProjectName> or data_Godot.

I finally got the project working with the server version of Godot by:

1) Open the normal Godot GUI version.
2) Open Export menu and select X11.
3) Click "Export all."
4) You get:

  • data_ 5) Download Godot server version, unpack.
    6) Copy the Godot server binary over the binary file.
    7) Done.

PS. The instructions in the docs could use some improvements on this matter. But as far as I'm concerned you can close this issue.

I finally got the project working with the server version of Godot by:

  1. Open the normal Godot GUI version.
  2. Open Export menu and select X11.
  3. Click "Export all."
  4. You get:
  • binary file.
  • .pck
  • data_ folder.
  1. Download Godot server version, unpack.
  2. Copy the Godot server binary over the binary file.
  3. Done.

PS. The instructions in the docs could use some improvements on this matter. But as far as I'm concerned you can close this issue.

Can confirm, dragging server binary to exported game works fine.
Not the exported .pck file to server folder, but server binary to export folder.

OS Debian 10 64bit
Build v3.2.1 stable mono linux server 64 bit

I am experiencing the same issue with my own project.

ERROR: can_instance: Method failed. Returning: __null
At: modules/mono/csharp_script.cpp:2912.

The solutions of @neikeq and @Pilvinen did not work for me. --verbose puts out nothing exceptional except possibly "Mono: Skipping runtime initialization because 'mscorlib.dll' could not be found".

Godot version:
v3.2.2 stable Windows 64 bit and mono linux server 64 bit binary.

OS/device including version:
Out-Of-The-Box OS Debian 10 64bit, with up to date software and .NET core & mono installed.
(https://docs.microsoft.com/en-us/dotnet/core/install/linux-debian)
(https://www.mono-project.com/download/stable/#download-lin-debian)

I am also experiencing the following error on the Minimal reproduction project (and all other projects) even when following the aforementioned solutions step by step. I am exporting from Godot on Windows to Linux.

ERROR: can_instance: Method failed. Returning: __null
At: modules/mono/csharp_script.cpp:2912.

Empty mono log and --verbose mentions nothing special but Mono: Skipping runtime initialization because 'mscorlib.dll' could not be found".

I have tried creating a new blank Godot project myself with a simple GD.Print("Hello world!"); in the overridden ready method and exporting that, pasting the official server mono binary over the exported binary and running it on my fresh Debian (with mono stuff installed) OS still gives me the same error. I have no idea how I can get my project to work on Linux as a server. Exported versions of my mono projects to Windows do work without a problem.

Was this page helpful?
0 / 5 - 0 ratings