#FishNet with MST server toolkit RoomSpawn and Auth Issue

36 messages · Page 1 of 1 (latest)

nimble stag
#

Hey all I am having a bit of trouble. I am using Master Server Toolkit as my current backend, and fishnet as my network solution for all other things (I.E Transport, etc. ) I am using currently Unity 2021.3.20fa, Mst Version 4.15, and Fishnet version 3.4.3

The way I have my setup configured is the typical Server, Room, and Client setup. I have my Server Registering handlers, Mst needs, I have my own variation of a connection controller as well as my own variation of an authentication, (based off Mst auth). Most of the work with Mst , utilizes the Mst.Client (which is shorthand for MstClient). That's the basic backstory of my setup.

The actual issue I keep running into first started with Mst spawning rooms correctly for me, I took their Spawn Module, and using them as a parent overrode the methods and handlers I needed to spawn the rooms (based on Mst rooms module). I was able to get past the spawning of the rooms, and even the naming of the rooms, until I try to join the actual instance of the room.

This is what happens:

  1. I log in as a guest on the server build
    2 ) I create a room, which spawns as a separate built room. It shows connected to the server
  2. My client in the game UI screen, sees the spawned room and attempts to join
  3. Connection does start to happen but is then rejected resulting in the error
    Peer with a given ID is not in the game I have tried many things including making sure my connection is correct in all scripts, that references are correct, but always fallback to this same error, which comes form this method handler
        protected virtual void ValidateRoomAccessResultHandler(ValidateRoomAccessResultMessage msg)
        {
            if (msg.Status != ResponseStatus.Success)
            {
                reporter.Error(msg.Error); // where error says Peer with a given ID is not in game
                StartDisconnection();
                return;
            }

            reporter.Debug("Access to server room is successfully validated");
        }````

I would appreciate any gudiance, ideas or help, cause honestly I have spent the better part of 2 weeks (working regular job, and then back to this), and I am spinning my wheels. I have included a stacktrace. 

Before you might potentially jump the gun, I did speak to Mst developer, and he sees its coming in some form from fishnet, although he didn't have time to identify why and where.  Stacktrace, also seems to reflect this.

I could also be wrong, to be honest I am not entirely sure at the moment, this late at night. Some guidance in troubleshooting what I hope to be a simple case of a bad refence, would be very much appreciate
nimble stag
#

@olive lichen any thoughts??

olive lichen
#

Isn't that error coming from MST though?

#

'peer with given id' doesnt actually say what Id. So you cannot know if its incorrect/corrupt

nimble stag
#

the expected connection is correct, but the peer seems seems to be incorrect when joing a room

#

was hoping for an idea of what i should look at to breakdown where the break is, so I can potnetially correct it

olive lichen
#

I've honestly not sure. I never got around to using the room system on it.

#

You could output the MST results to see what is happening vs expected but I still wouldnt know what to do with that info.

nimble stag
#

i am adding debugs, more or less everywhere to see where it breaks down, hopefully it might shed some light on the trigger for peer to not match

olive lichen
#

its not consistent?

nimble stag
#

no it is consistent in terms of behavior

#

i am not getting random behavior but its simply giving the same message no matter my approach [Error | VexstormRoomClientManager] Peer with a given ID is not in the game

#

i am trying to identify what is being expected versus what is given, i have dialed down some things like the room token matchs all the way through, room name matches all the way through

#

the id, is a bit suspect, and peer is in Mst says Peer Id 1, but Fishnet Client ID shows as -1

#

I am not entirely sure, but shouldnt both of these match?

olive lichen
#

-1 is unset

#

or invalid

nimble stag
#

i see, so that at least tells me something is not saving properly

#

or being assigned properly, any suggestions at where i might or should look

#

?

olive lichen
#

is the client supposed to be getting the packet?

nimble stag
#

in the case of the room, yes

olive lichen
#

did you untick ShareIds on the ServerManager by any chance?

nimble stag
#

room client ,

olive lichen
#

Cannot know further what might be going on without seeing the broadcasts.

nimble stag
#

i will check, servermanager, to see if i checked that off

#

he does not have that on any of the fishnet demo scenes, nor do i have that in mine

#

meaning the servermanager component

olive lichen
#

Ah well then it's default to on.

#

Need to see the broadcast struct then.

nimble stag
#

you will have to forgive me, where would i pull that specifically from ?

olive lichen
#

probably whatever script is throwing the peer Id

#

it be getting called from a broadcast from looks of stack

nimble stag
#

ahh now i know where you mean,, let me look

hidden narwhal
#

Did you used LInux or Windows for your Room Server in your tests?