System.TypeInitializationException on 1.4.2.1 (1.4.1.2 works)

Timtaran

Terrarian
Hello, when I starting server I have error:
Logs:
4/9/2021 11:56:24 AM
System.TypeInitializationException: The type initializer for 'System.Net.IPAddress' threw an exception. ---> System.MissingMethodException: Method not found: !0 modreq(System.Runtime.InteropServices.InAttribute)& System.ReadOnlySpan`1.get_Item(int)
at System.Net.IPAddress..ctor (System.Byte[] address, System.Int64 scopeid) [0x00010] in <32fc020d7373456995b3d44fa885e01a>:0
at System.Net.IPAddress..cctor () [0x00032] in <32fc020d7373456995b3d44fa885e01a>:0
--- End of inner exception stack trace ---
at Terraria.Netplay.StartServer () [0x00000] in <c62dec19bbe944969ce327cab98fe21b>:0
at Terraria.Main.DedServ () [0x00cb1] in <c62dec19bbe944969ce327cab98fe21b>:0
at Terraria.Program.LaunchGame (System.String[] args, System.Boolean monoArgs) [0x000b2] in <c62dec19bbe944969ce327cab98fe21b>:0
 
Hello, I know this is an old thread, but I made an account just to show the fix I found from this Reddit post.

The key part is deleting the default mono files:
Bash:
cd /path/to/terraria-server/
rm System*
rm Mono*
rm monoconfig
rm mscorlib.dll

Hope this helps, for anyone from Google.
 
Back
Top Bottom