Forum Multiplayer Cannot connect to a game room from dev local server

Discussion and help relating to the PlayerIO Multiplayer API.

Cannot connect to a game room from dev local server

Postby fair_wind_ » December 6th, 2017, 12:22 pm

Hi, I have a problem with local dev server. I can create a local server (from an account of the game creator), but cannot connect to the server from account that has all available privileges. Also if I use game creator account I can join to local dev server and also can create room, but I cannot connect to it, infinite callback awaits. What's the problem? I added lines:
Code: Select all
GameClient.Multiplayer.DevelopmentServer = new ServerEndpoint("127.0.0.1", 8184);

Also, I tried to use my global IP and my local address, ports (8184, 4505) are open.
fair_wind_
 
Posts: 6
Joined: November 14th, 2017, 7:33 am

Re: Cannot connect to a game room from dev local server

Postby Emalton » December 6th, 2017, 7:17 pm

Hi, try using 0.0.0.0 or localhost.
Emalton
 
Posts: 86
Joined: June 28th, 2013, 3:49 am

Re: Cannot connect to a game room from dev local server

Postby fair_wind_ » December 7th, 2017, 8:07 am

Emalton wrote:Hi, try using 0.0.0.0 or localhost.

localhost - nothing chaned, 0.0.0.0 - got a new error
Unable to connect, errorcode=AddressNotAvailable
fair_wind_
 
Posts: 6
Joined: November 14th, 2017, 7:33 am

Re: Cannot connect to a game room from dev local server

Postby Henrik » December 8th, 2017, 6:25 am

Hey fair_wind,

You have to connect the dev server as the account that owns the game for everything to work.
Henrik
.IO
 
Posts: 1880
Joined: January 4th, 2010, 1:53 pm

Re: Cannot connect to a game room from dev local server

Postby fair_wind_ » December 8th, 2017, 6:54 am

Henrik wrote:Hey fair_wind,

You have to connect the dev server as the account that owns the game for everything to work.


I do as you say, but still can’t join any room. If I use my own acc I even connect to the game server to join room.
fair_wind_
 
Posts: 6
Joined: November 14th, 2017, 7:33 am

Re: Cannot connect to a game room from dev local server

Postby Henrik » December 8th, 2017, 8:06 pm

fair_wind_ wrote:If I use my own acc I even connect to the game server to join room.


I don't understand what you mean by this?

When you start the dev server, it needs the credentials of a PlayerIO developer account to connect to PlayerIO. Once it's started, you should be able to see it in the Multiplayer control panel for your games on PlayerIO.

With the dev server running on your local machine, you can run a game client, where you first authenticate as a game user, and then join a room on that dev server as that game user.

And for that to work, you need to set the DevelopmentServer override in your game client to an address where your dev server is reachable. If everything is running on the same machine, setting it to 127.0.0.1 should be correct.


What happens when you try to join a room on your dev server? Do you get any error callbacks? Do you get any indication in the dev server UI that a room opened and a user joined?
Henrik
.IO
 
Posts: 1880
Joined: January 4th, 2010, 1:53 pm

Re: Cannot connect to a game room from dev local server

Postby fair_wind_ » December 8th, 2017, 9:13 pm

Henrik wrote:
fair_wind_ wrote:If I use my own acc I even connect to the game server to join room.


I don't understand what you mean by this?


Sorry, just my typo. I meant I cannot authenticate in game because I got an error like this: viewtopic.php?f=4&t=35708. Of course I found, that I must use game creator account to avoid this error.
After using acc of the game creator I got nothing when try to authenticate in game (I mean really nothing both in game and in server app). I tried to use localhost, 127.0.0.1 Both didn't help at all. Could it happen because of I use Windows 10?
fair_wind_
 
Posts: 6
Joined: November 14th, 2017, 7:33 am

Re: Cannot connect to a game room from dev local server

Postby Henrik » December 9th, 2017, 3:11 am

When you call Authenticate in your game client, what happens? Success? Error? Any error message? Do you get back a Client object? Authenticate is completely independent of your dev server, it doesn't have to be running or working for Authenticate to work, since that method just calls the PlayerIO webservice. If Authenticate isn't working, you have other issues than your dev server.

If Authenticate is successful, and you call CreateJoinRoom, then what happens? Error? Any error message? Timeout? Nothing?

Windows 10 has nothing to do with it, I'm running it, lots of others are running it, it's fine. What environment is your game in, though? Unity? Are you running in the editor, or publishing to WebGL or something when it's not working?
Henrik
.IO
 
Posts: 1880
Joined: January 4th, 2010, 1:53 pm


Return to Multiplayer