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

Server not Joinable by Client #282

Closed
KarmaLN opened this issue Sep 15, 2022 · 9 comments · Fixed by #286
Closed

Server not Joinable by Client #282

KarmaLN opened this issue Sep 15, 2022 · 9 comments · Fixed by #286
Labels

Comments

@KarmaLN
Copy link

KarmaLN commented Sep 15, 2022

Description:
On the newest Update of CSM Clients can not join the Host it returns an Error for the Host (Error while parsing command, see log)

Steps to reproduce the behavior:

  1. Join Server as Client or have Client join your Server

Expected behavior
Connect without Issues/Error

Active DLCs
-None

Active mods
-Harmony 2.2-0
-Cities Skylines Multiplayer (CSM)

Versions

  • Mod version: 2209.211
  • Game version: 2022.10 / 1.15.0-f7

Additional context

Log File
Encountered an error while reading command from (Joining Client IPADDRESS):: System.ArgumentNullException: Argument cannot be null. Parameter name: first at System.Linq.Check.FirstAndSecond (System.Object first, System.Object second) [0x00000] in <filename unknown>:0 at System.Linq.Enumerable.SequenceEqual[String] (IEnumerable1 first, IEnumerable1 second, IEqualityComparer1 comparer) [0x00000] in <filename unknown>:0 at System.Linq.Enumerable.SequenceEqual[String] (IEnumerable1 first, IEnumerable1 second) [0x00000] in <filename unknown>:0 at CSM.Commands.Handler.Internal.ConnectionRequestHandler.HandleOnServer (CSM.Commands.Data.Internal.ConnectionRequestCommand command, LiteNetLib.NetPeer peer) [0x00000] in <filename unknown>:0 at CSM.Commands.CommandReceiver.Parse (LiteNetLib.NetPacketReader reader, LiteNetLib.NetPeer peer) [0x00000] in <filename unknown>:0 at CSM.Networking.Server.ListenerOnNetworkReceiveEvent (LiteNetLib.NetPeer peer, LiteNetLib.NetPacketReader reader, DeliveryMethod deliveryMethod) [0x00000] in <filename unknown>:0

-Multiple people have reported this on the Discord so I doubt its a isolated Case

@KarmaLN KarmaLN added the bug label Sep 15, 2022
@DominicMaas
Copy link
Member

hmmm, maybe something to do with the ConnectionRequestCommand (more specifically ConnectionRequestHandler), and running SequenceEqual on the mods. The mods list may be null from the client?

@DominicMaas
Copy link
Member

I assume the host is running the same version as the client?

@chrisi51
Copy link

chrisi51 commented Sep 15, 2022

on my side both are on the same game/mod version but one is using windows the other one is on mac ...

and we are on LAN ... so portforwarding shouldnd be the issue

[21:08:42.4409] [Info] Attempting to start server on port 4230...
[21:08:43.6909] [Info] The server has started.
[21:08:46.8958] [Warn] It was tried to forward the port automatically, but the server is not reachable from the internet. Manual port forwarding is required.
[21:08:47.2908] [Info] Received connection request.
[21:08:47.2938] [Except] Encountered an error while reading command from 192.168.1.93:60929:: System.ArgumentNullException: Argument cannot be null.
Parameter name: first
  at System.Linq.Check.FirstAndSecond (System.Object first, System.Object second) [0x00000] in <filename unknown>:0 
  at System.Linq.Enumerable.SequenceEqual[String] (IEnumerable`1 first, IEnumerable`1 second, IEqualityComparer`1 comparer) [0x00000] in <filename unknown>:0 
  at System.Linq.Enumerable.SequenceEqual[String] (IEnumerable`1 first, IEnumerable`1 second) [0x00000] in <filename unknown>:0 
  at CSM.Commands.Handler.Internal.ConnectionRequestHandler.HandleOnServer (CSM.Commands.Data.Internal.ConnectionRequestCommand command, LiteNetLib.NetPeer peer) [0x00000] in <filename unknown>:0 
  at CSM.Commands.CommandReceiver.Parse (LiteNetLib.NetPacketReader reader, LiteNetLib.NetPeer peer) [0x00000] in <filename unknown>:0 
  at CSM.Networking.Server.ListenerOnNetworkReceiveEvent (LiteNetLib.NetPeer peer, LiteNetLib.NetPacketReader reader, DeliveryMethod deliveryMethod) [0x00000] in <filename unknown>:0 

@DominicMaas
Copy link
Member

yeah not a networking issue, I think it has to do with parsing the mods list

@KarmaLN
Copy link
Author

KarmaLN commented Sep 15, 2022

Mine came from Windows (Host) and Linux (Client) using Portforwarding with same versions game and mod

@chrisi51
Copy link

if it helps in any way ... on windows the log was well formatted while on mac the log is without linebreaks ... so maybe unix/windows missmatch on linebreaks?

@kaenganxt
Copy link
Member

I just tested an assumption I had. When the list of mods is empty, protobuf seems to send null to the other side, which then causes the issue.
Fix coming up shortly :)

@DominicMaas
Copy link
Member

if it helps in any way ... on windows the log was well formatted while on mac the log is without linebreaks ... so maybe unix/windows missmatch on linebreaks?

Yeah, looks like the new line character needs to be different on unix platforms, will have to see how you detect that in mono (separate issue though)

@chrisi51
Copy link

I just tested an assumption I had. When the list of mods is empty, protobuf seems to send null to the other side, which then causes the issue. Fix coming up shortly :)

was thinking the same but didnt had same content on both machines for testing it xD

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants