Mirror icon indicating copy to clipboard operation
Mirror copied to clipboard

Unity 2021 compiles wrong in Linux Standalones/Server

Open ezequielmm opened this issue 3 years ago • 6 comments

Describe the bug In Unity 2021 when you build for linux in standalone or server target, you cannot connect to that server despite the server is on server mode or in host mode (client + server)

[IMPORTANT] How can we reproduce the issue, step by step:

  1. Select all the scene for the additive example in the build settings
  2. Change the build target to linux, can be standole or server target
  3. Open the linux subsystem or use a virtual machine with linux or linux server
  4. Execute the linux build and check server only or host server and client
  5. In the unity editor or in windows build try to connect to localhost on that server
  6. You wont connect and no error is displayed
  7. only happens in unity 2021

Any bug that can be reproduced, can be fixed. If we can't reproduce it, we can't fix.

Expected behavior You cannot connect to that server and no error shows in the console image

Desktop (please complete the following information):

  • OS: Windows 11 with Linux subsystem to execute the linux build or using Linux server
  • Build target: Linux standalone or Linux Server
  • Unity version: 2021.3.6f1
  • Mirror branch: v66

Additional context Only happens in unity 2021

ezequielmm avatar Aug 08 '22 15:08 ezequielmm

please try to disable nonalloc in kcp transport, see if that works

miwarnec avatar Aug 08 '22 15:08 miwarnec

you can also try the telepathy transport

miwarnec avatar Aug 08 '22 15:08 miwarnec

I just tried disabling noalloc and the bug persist :(

ezequielmm avatar Aug 08 '22 16:08 ezequielmm

Also i tried compiling with Net Framework and with Net Standard 2.1 with same results

ezequielmm avatar Aug 08 '22 16:08 ezequielmm

please try telepathy. then we can possibly isolate it.

miwarnec avatar Aug 08 '22 16:08 miwarnec

Tried with telepathy transport and works now!!!! Thanks !!!!

ezequielmm avatar Aug 08 '22 18:08 ezequielmm

Tried with telepathy transport and works now!!!! Thanks !!!!

interesting. any chance you could attach your debugger and see where it may fail on linux with kcp?

miwarnec avatar Sep 24 '22 15:09 miwarnec

Assigning @vis2k to see if this is still an issue with recent kcp updates.

MrGadget1024 avatar Nov 24 '22 12:11 MrGadget1024

a lot of projects are using kcp transport on linux. this seems to work fine.

if anyone encounters issues like this one again: try binding the kcp server to "0.0.0.0" instead of "127.0.0.1". I've had a similar issue in Rust earlier, where "127.0.0.1" would not work on linux.

miwarnec avatar Dec 03 '22 18:12 miwarnec