joinRandomRoom() doesn't work well

hi, i’m trying to use photon cloud to develop a multiply mode for my game, but i really met many troubles… 

here is the first one, which just make me crazy and can’t continue my job…

here is part of my code:

local photon = require "plugin.photon" local masterAddress = "app-us.exitgamescloud.com:5055" local appId = "my photon app id" local appVersion = "1.03" local client = photon.loadbalancing.LoadBalancingClient.new(masterAddress, appId, appVersion) function client:onStateChange (state)     if state == photon.loadbalancing.LoadBalancingClient.State.JoinedLobby then         client:joinRandomRoom()     elseif state == photon.loadbalancing.LoadBalancingClient.State.Joined then         local myRoom = client:myRoom()         for k,v in pairs(myRoom) do             print(k,v)         end     end end

here comes the trouble, sometimes the output will be like this:

(i think it means when i trying to join a random room and no room available, the could auto created one for me)

INFO LoadBalancingClient: State: Uninitialized -\> ConnectingToMasterserver onStateChange ConnectingToMasterserver INFO LoadBalancingClient: Connecting to Master app-us.exitgamescloud.com:5055 TRACE PhotonPeer: create INFO PhotonConnect: app-us.exitgamescloud.com:5055 start connection to host INFO PhotonConnect: app-us.exitgamescloud.com:5055 app-us.exitgamescloud.com 5055 successful start connection INFO LoadBalancingClient: Master: Connected INFO LoadBalancingClient: Master: Encryption Establishing... INFO LoadBalancingClient: Master: Encryption Established INFO LoadBalancingClient: Master: Authenticate... INFO LoadBalancingClient: Master: Authenticated INFO LoadBalancingClient: State: ConnectingToMasterserver -\> ConnectedToMaster onStateChange ConnectedToMaster INFO LoadBalancingClient: Master: Join Lobby nil nil ... INFO LoadBalancingClient: Master: Joined to Lobby INFO LoadBalancingClient: State: ConnectedToMaster -\> JoinedLobby onStateChange JoinedLobby INFO LoadBalancingClient: Join Random Room nil nil ... INFO LoadBalancingClient: Connecting to Game 173.193.192.29:5056 TRACE PhotonPeer: create INFO PhotonConnect: 173.193.192.29:5056 start connection to host INFO PhotonConnect: 173.193.192.29:5056 173.193.192.29 5056 successful start connection INFO LoadBalancingClient: State: JoinedLobby -\> ConnectingToGameserver onStateChange ConnectingToGameserver INFO LoadBalancingClient: Master: Disconnected INFO LoadBalancingClient: Game: Connected INFO LoadBalancingClient: Game: Encryption Establishing... INFO LoadBalancingClient: Game: Encryption Established INFO LoadBalancingClient: Game: Authenticate... INFO LoadBalancingClient: Game: Authenticated INFO LoadBalancingClient: Game: Connected INFO LoadBalancingClient: State: ConnectingToGameserver -\> ConnectedToGameserver onStateChange ConnectedToGameserver INFO LoadBalancingClient: Game: myActor: table: 0x7ffa6bd6ae00 INFO LoadBalancingClient: State: ConnectedToGameserver -\> Joined onStateChange Joined emptyRoomLiveTime 0 isOpen true playerCount 0 loadBalancingClient table: 0x7ffa6bd4db10 propsListedInLobby table: 0x7ffa6bd4de70 cleanupCacheOnLeave false customProperties table: 0x7ffa6bd4de30 uniqueUserId false name 744988e8-0418-419f-9b46-435c90a32cb9 suspendedPlayerLiveTime 0 removed false isVisible true address 173.193.192.29:5056 maxPlayers 0

but sometimes the out put like this:

(nothing happen after “INFO LoadBalancingClient: Join Random Room nil nil …”, the code is the same, but the outputs are different from time to time)

client:joinRandomRoom() INFO LoadBalancingClient: State: Uninitialized -\> ConnectingToMasterserver onStateChange ConnectingToMasterserver INFO LoadBalancingClient: Connecting to Master app-us.exitgamescloud.com:5055 TRACE PhotonPeer: create INFO PhotonConnect: app-us.exitgamescloud.com:5055 start connection to host INFO PhotonConnect: app-us.exitgamescloud.com:5055 app-us.exitgamescloud.com 5055 successful start connection INFO LoadBalancingClient: Master: Connected INFO LoadBalancingClient: Master: Encryption Establishing... INFO LoadBalancingClient: Master: Encryption Established INFO LoadBalancingClient: Master: Authenticate... INFO LoadBalancingClient: Master: Authenticated INFO LoadBalancingClient: State: ConnectingToMasterserver -\> ConnectedToMaster onStateChange ConnectedToMaster INFO LoadBalancingClient: Master: Join Lobby nil nil ... INFO LoadBalancingClient: Master: Joined to Lobby INFO LoadBalancingClient: State: ConnectedToMaster -\> JoinedLobby onStateChange JoinedLobby INFO LoadBalancingClient: Join Random Room nil nil ...

Please enable more detailed log when initializing application to check if JoinRandomRoom operation responded by server properly.

client:setLogLevel(photon.common.Logger.Level.DEBUG)

Do you experience other problems like unexpected disconnections during play? Or app fails on random join only?

hi, i’m still learning how to use your services, and trying to create a room, then join the same room from 2 different devices. but it’s hard for me to step forward.

below is the DEBUG info, the ‘joinRandomRoom’ function should create me a new room if there have no available room, but it doesn’t work. 

2015-03-28 10:20:54.638 Corona Simulator[545:507] Sat Mar 28 10:20:54 2015 INFO LoadBalancingClient: State: Uninitialized -\> ConnectingToMasterserver 2015-03-28 10:20:54.638 Corona Simulator[545:507] onStateChange ConnectingToMasterserver 2015-03-28 10:20:54.638 Corona Simulator[545:507] Sat Mar 28 10:20:54 2015 INFO LoadBalancingClient: Connecting to Master app-us.exitgamescloud.com:5055 2015-03-28 10:20:54.638 Corona Simulator[545:507] Sat Mar 28 10:20:54 2015 TRACE PhotonPeer: create 2015-03-28 10:20:54.638 Corona Simulator[545:507] Sat Mar 28 10:20:54 2015 DEBUG LoadBalancingClient: Master: PhotonPeer[\_addListener] - Adding listener for event 1001 2015-03-28 10:20:54.639 Corona Simulator[545:507] Sat Mar 28 10:20:54 2015 DEBUG LoadBalancingClient: Master: PhotonPeer[\_addListener] - Adding listener for event 1002 2015-03-28 10:20:54.639 Corona Simulator[545:507] Sat Mar 28 10:20:54 2015 DEBUG LoadBalancingClient: Master: PhotonPeer[\_addListener] - Adding listener for event 1004 2015-03-28 10:20:54.639 Corona Simulator[545:507] Sat Mar 28 10:20:54 2015 DEBUG LoadBalancingClient: Master: PhotonPeer[\_addListener] - Adding listener for event 1005 2015-03-28 10:20:54.639 Corona Simulator[545:507] Sat Mar 28 10:20:54 2015 DEBUG LoadBalancingClient: Master: PhotonPeer[\_addListener] - Adding listener for event 1 2015-03-28 10:20:54.639 Corona Simulator[545:507] Sat Mar 28 10:20:54 2015 DEBUG LoadBalancingClient: Master: PhotonPeer[\_addListener] - Adding listener for event 2 2015-03-28 10:20:54.640 Corona Simulator[545:507] Sat Mar 28 10:20:54 2015 DEBUG LoadBalancingClient: Master: PhotonPeer[\_addListener] - Adding listener for event 4 2015-03-28 10:20:54.640 Corona Simulator[545:507] Sat Mar 28 10:20:54 2015 DEBUG LoadBalancingClient: Master: PhotonPeer[\_addListener] - Adding listener for event 3 2015-03-28 10:20:54.640 Corona Simulator[545:507] Sat Mar 28 10:20:54 2015 DEBUG LoadBalancingClient: Master: PhotonPeer[\_addListener] - Adding listener for event 1003 2015-03-28 10:20:54.640 Corona Simulator[545:507] Sat Mar 28 10:20:54 2015 DEBUG LoadBalancingClient: Master: PhotonPeer[\_addListener] - Adding listener for event 230 2015-03-28 10:20:54.640 Corona Simulator[545:507] Sat Mar 28 10:20:54 2015 DEBUG LoadBalancingClient: Master: PhotonPeer[\_addListener] - Adding listener for event 229 2015-03-28 10:20:54.641 Corona Simulator[545:507] Sat Mar 28 10:20:54 2015 DEBUG LoadBalancingClient: Master: PhotonPeer[\_addListener] - Adding listener for event 230 2015-03-28 10:20:54.641 Corona Simulator[545:507] Sat Mar 28 10:20:54 2015 DEBUG LoadBalancingClient: Master: PhotonPeer[\_addListener] - Adding listener for event 229 2015-03-28 10:20:54.641 Corona Simulator[545:507] Sat Mar 28 10:20:54 2015 DEBUG LoadBalancingClient: Master: PhotonPeer[\_addListener] - Adding listener for event 227 2015-03-28 10:20:54.641 Corona Simulator[545:507] Sat Mar 28 10:20:54 2015 DEBUG LoadBalancingClient: Master: PhotonPeer[\_addListener] - Adding listener for event 226 2015-03-28 10:20:54.641 Corona Simulator[545:507] Sat Mar 28 10:20:54 2015 DEBUG LoadBalancingClient: Master: PhotonPeer[\_addListener] - Adding listener for event 225 2015-03-28 10:20:54.641 Corona Simulator[545:507] Sat Mar 28 10:20:54 2015 DEBUG LoadBalancingClient: Master: PhotonPeer[\_addListener] - Adding listener for event 222 2015-03-28 10:20:54.642 Corona Simulator[545:507] Sat Mar 28 10:20:54 2015 DEBUG LoadBalancingClient: Master: PhotonPeer[\_addListener] - Adding listener for event 221 2015-03-28 10:20:54.642 Corona Simulator[545:507] Sat Mar 28 10:20:54 2015 DEBUG LoadBalancingClient: Master: PhotonPeer[\_addListener] - Adding listener for event 224 2015-03-28 10:20:54.642 Corona Simulator[545:507] Sat Mar 28 10:20:54 2015 DEBUG LoadBalancingClient: Master: PhotonPeer[\_addListener] - Adding listener for event 226 2015-03-28 10:20:54.642 Corona Simulator[545:507] Sat Mar 28 10:20:54 2015 DEBUG LoadBalancingClient: Master: PhotonPeer[\_addListener] - Adding listener for event 219 2015-03-28 10:20:54.642 Corona Simulator[545:507] Sat Mar 28 10:20:54 2015 DEBUG LoadBalancingClient: Master: connect app-us.exitgamescloud.com:5055 23397a0c-58c3-431a-82e8-8f051045e17f 2015-03-28 10:20:54.643 Corona Simulator[545:507] Sat Mar 28 10:20:54 2015 DEBUG LoadBalancingClient: Master: startConnection to app-us.exitgamescloud.com:5055 2015-03-28 10:20:54.643 Corona Simulator[545:507] Sat Mar 28 10:20:54 2015 INFO PhotonConnect: app-us.exitgamescloud.com:5055 start connection to host 2015-03-28 10:20:54.647 Corona Simulator[545:507] Sat Mar 28 10:20:54 2015 INFO PhotonConnect: app-us.exitgamescloud.com:5055 app-us.exitgamescloud.com 5055 successful start connection 2015-03-28 10:20:54.749 Corona Simulator[545:507] Sat Mar 28 10:20:54 2015 DEBUG LoadBalancingClient: Master: \>reliable: sent 1 0 0 0 2015-03-28 10:20:55.146 Corona Simulator[545:507] Sat Mar 28 10:20:55 2015 DEBUG LoadBalancingClient: Master: \<ack: 1 255 2015-03-28 10:20:55.146 Corona Simulator[545:507] Sat Mar 28 10:20:55 2015 DEBUG LoadBalancingClient: Master: \>reliable: sent 1 0 0 0 2015-03-28 10:20:55.541 Corona Simulator[545:507] Sat Mar 28 10:20:55 2015 DEBUG LoadBalancingClient: Master: \<ack: 1 0 2015-03-28 10:20:55.541 Corona Simulator[545:507] Sat Mar 28 10:20:55 2015 DEBUG LoadBalancingClient: Master: \>reliable: sent 2 0 0 0 2015-03-28 10:20:55.541 Corona Simulator[545:507] Sat Mar 28 10:20:55 2015 INFO LoadBalancingClient: Master: Connected 2015-03-28 10:20:55.795 Corona Simulator[545:507] Sat Mar 28 10:20:55 2015 DEBUG LoadBalancingClient: Master: \>reliable: sent 2 0 0 0 2015-03-28 10:20:55.795 Corona Simulator[545:507] Sat Mar 28 10:20:55 2015 INFO LoadBalancingClient: Master: Encryption Establishing... 2015-03-28 10:20:56.069 Corona Simulator[545:507] Sat Mar 28 10:20:56 2015 DEBUG LoadBalancingClient: Master: \<reliable: skipping duplicate 1 1 2015-03-28 10:20:56.201 Corona Simulator[545:507] Sat Mar 28 10:20:56 2015 DEBUG LoadBalancingClient: Master: \<ack: 2 20 2015-03-28 10:20:56.201 Corona Simulator[545:507] Sat Mar 28 10:20:56 2015 DEBUG LoadBalancingClient: Master: \>reliable: sent 3 0 0 0 2015-03-28 10:20:56.202 Corona Simulator[545:507] Sat Mar 28 10:20:56 2015 DEBUG LoadBalancingClient: Master: \<ack: 2 0 2015-03-28 10:20:56.502 Corona Simulator[545:507] Sat Mar 28 10:20:56 2015 INFO LoadBalancingClient: Master: Encryption Established 2015-03-28 10:20:56.505 Corona Simulator[545:507] Sat Mar 28 10:20:56 2015 DEBUG LoadBalancingClient: Master: \>reliable: sent 3 0 0 0 2015-03-28 10:20:56.506 Corona Simulator[545:507] Sat Mar 28 10:20:56 2015 INFO LoadBalancingClient: Master: Authenticate... 2015-03-28 10:20:56.795 Corona Simulator[545:507] Sat Mar 28 10:20:56 2015 DEBUG LoadBalancingClient: Master: \<ack: 3 20 2015-03-28 10:20:56.927 Corona Simulator[545:507] Sat Mar 28 10:20:56 2015 DEBUG LoadBalancingClient: Master: \<ack: 3 0 2015-03-28 10:20:56.927 Corona Simulator[545:507] Sat Mar 28 10:20:56 2015 DEBUG LoadBalancingClient: Master: ev AppStats table: 0x7f92253b78c0 2015-03-28 10:20:56.930 Corona Simulator[545:507] Sat Mar 28 10:20:56 2015 DEBUG LoadBalancingClient: Master: resp Authenticate table: 0x7f9225351e50 2015-03-28 10:20:56.930 Corona Simulator[545:507] Sat Mar 28 10:20:56 2015 INFO LoadBalancingClient: Master: Authenticated 2015-03-28 10:20:56.931 Corona Simulator[545:507] Sat Mar 28 10:20:56 2015 INFO LoadBalancingClient: State: ConnectingToMasterserver -\> ConnectedToMaster 2015-03-28 10:20:56.931 Corona Simulator[545:507] onStateChange ConnectedToMaster 2015-03-28 10:20:56.931 Corona Simulator[545:507] Sat Mar 28 10:20:56 2015 DEBUG LoadBalancingClient: Master: \>reliable: sent 4 0 0 0 2015-03-28 10:20:56.931 Corona Simulator[545:507] Sat Mar 28 10:20:56 2015 INFO LoadBalancingClient: Master: Join Lobby nil nil ... 2015-03-28 10:20:57.323 Corona Simulator[545:507] Sat Mar 28 10:20:57 2015 DEBUG LoadBalancingClient: Master: \<ack: 4 0 2015-03-28 10:20:57.324 Corona Simulator[545:507] Sat Mar 28 10:20:57 2015 DEBUG LoadBalancingClient: Master: resp JoinLobby table: 0x7f92251178b0 2015-03-28 10:20:57.324 Corona Simulator[545:507] Sat Mar 28 10:20:57 2015 INFO LoadBalancingClient: Master: Joined to Lobby 2015-03-28 10:20:57.324 Corona Simulator[545:507] Sat Mar 28 10:20:57 2015 INFO LoadBalancingClient: State: ConnectedToMaster -\> JoinedLobby 2015-03-28 10:20:57.324 Corona Simulator[545:507] onStateChange JoinedLobby 2015-03-28 10:20:57.324 Corona Simulator[545:507] Sat Mar 28 10:20:57 2015 INFO LoadBalancingClient: Join Random Room nil nil ... 2015-03-28 10:20:57.325 Corona Simulator[545:507] Sat Mar 28 10:20:57 2015 DEBUG LoadBalancingClient: Master: \>reliable: sent 5 0 0 0 2015-03-28 10:20:57.325 Corona Simulator[545:507] Sat Mar 28 10:20:57 2015 DEBUG LoadBalancingClient: Master: ev GameList table: 0x7f92240d2a70 table: 0x7f922516f2c0 2015-03-28 10:20:57.719 Corona Simulator[545:507] Sat Mar 28 10:20:57 2015 DEBUG LoadBalancingClient: Master: \<ack: 5 0 2015-03-28 10:20:57.720 Corona Simulator[545:507] Sat Mar 28 10:20:57 2015 DEBUG LoadBalancingClient: Master: resp JoinRandomGame table: 0x7f9224575840 2015-03-28 10:20:59.831 Corona Simulator[545:507] Sat Mar 28 10:20:59 2015 DEBUG LoadBalancingClient: Master: \>reliable: sent 4 0 0 0 2015-03-28 10:21:00.359 Corona Simulator[545:507] Sat Mar 28 10:21:00 2015 DEBUG LoadBalancingClient: Master: \<ack: 4 255 2015-03-28 10:21:01.942 Corona Simulator[545:507] Sat Mar 28 10:21:01 2015 DEBUG LoadBalancingClient: Master: ev AppStats table: 0x7f922518cf00 2015-03-28 10:21:02.471 Corona Simulator[545:507] Sat Mar 28 10:21:02 2015 DEBUG LoadBalancingClient: Master: \>reliable: sent 5 0 0 0 2015-03-28 10:21:02.999 Corona Simulator[545:507] Sat Mar 28 10:21:02 2015 DEBUG LoadBalancingClient: Master: \<ack: 5 255 2015-03-28 10:21:05.111 Corona Simulator[545:507] Sat Mar 28 10:21:05 2015 DEBUG LoadBalancingClient: Master: \>reliable: sent 6 0 0 0 2015-03-28 10:21:05.639 Corona Simulator[545:507] Sat Mar 28 10:21:05 2015 DEBUG LoadBalancingClient: Master: \<ack: 6 255 2015-03-28 10:21:07.751 Corona Simulator[545:507] Sat Mar 28 10:21:07 2015 DEBUG LoadBalancingClient: Master: \>reliable: sent 7 0 0 0 2015-03-28 10:21:08.278 Corona Simulator[545:507] Sat Mar 28 10:21:08 2015 DEBUG LoadBalancingClient: Master: \<ack: 7 255 2015-03-28 10:21:10.391 Corona Simulator[545:507] Sat Mar 28 10:21:10 2015 DEBUG LoadBalancingClient: Master: \>reliable: sent 8 0 0 0 2015-03-28 10:21:10.919 Corona Simulator[545:507] Sat Mar 28 10:21:10 2015 DEBUG LoadBalancingClient: Master: \<ack: 8 255 2015-03-28 10:21:13.031 Corona Simulator[545:507] Sat Mar 28 10:21:13 2015 DEBUG LoadBalancingClient: Master: \>reliable: sent 9 0 0 0 2015-03-28 10:21:13.559 Corona Simulator[545:507] Sat Mar 28 10:21:13 2015 DEBUG LoadBalancingClient: Master: \<ack: 9 255 2015-03-28 10:21:15.671 Corona Simulator[545:507] Sat Mar 28 10:21:15 2015 DEBUG LoadBalancingClient: Master: \>reliable: sent 10 0 0 0 2015-03-28 10:21:16.331 Corona Simulator[545:507] Sat Mar 28 10:21:16 2015 DEBUG LoadBalancingClient: Master: \<ack: 10 255 2015-03-28 10:21:18.442 Corona Simulator[545:507] Sat Mar 28 10:21:18 2015 DEBUG LoadBalancingClient: Master: \>reliable: sent 11 0 0 0 2015-03-28 10:21:20.654 Corona Simulator[545:507] Sat Mar 28 10:21:20 2015 DEBUG LoadBalancingClient: Master: \>reliable: resending pCommand: 11 , time: 29455 . sent time: 27375 timeout: 29373.320910215 , sentCount: 1 , original sent time: 27375 round trip: 1998.3209102154 2015-03-28 10:21:20.654 Corona Simulator[545:507] Sat Mar 28 10:21:20 2015 DEBUG LoadBalancingClient: Master: \>reliable: sent 11 0 27375 27375 2015-03-28 10:21:21.050 Corona Simulator[545:507] Sat Mar 28 10:21:21 2015 DEBUG LoadBalancingClient: Master: \<ack: 11 255 2015-03-28 10:21:23.161 Corona Simulator[545:507] Sat Mar 28 10:21:23 2015 DEBUG LoadBalancingClient: Master: \>reliable: sent 12 0 0 0 2015-03-28 10:21:23.821 Corona Simulator[545:507] Sat Mar 28 10:21:23 2015 DEBUG LoadBalancingClient: Master: \<ack: 12 255 2015-03-28 10:21:25.933 Corona Simulator[545:507] Sat Mar 28 10:21:25 2015 DEBUG LoadBalancingClient: Master: \>reliable: sent 13 0 0 0 2015-03-28 10:21:26.593 Corona Simulator[545:507] Sat Mar 28 10:21:26 2015 DEBUG LoadBalancingClient: Master: \<ack: 13 255 2015-03-28 10:21:28.705 Corona Simulator[545:507] Sat Mar 28 10:21:28 2015 DEBUG LoadBalancingClient: Master: \>reliable: sent 14 0 0 0 2015-03-28 10:21:29.233 Corona Simulator[545:507] Sat Mar 28 10:21:29 2015 DEBUG LoadBalancingClient: Master: \<ack: 14 255 2015-03-28 10:21:31.345 Corona Simulator[545:507] Sat Mar 28 10:21:31 2015 DEBUG LoadBalancingClient: Master: \>reliable: sent 15 0 0 0 2015-03-28 10:21:31.873 Corona Simulator[545:507] Sat Mar 28 10:21:31 2015 DEBUG LoadBalancingClient: Master: \<ack: 15 255 2015-03-28 10:21:33.984 Corona Simulator[545:507] Sat Mar 28 10:21:33 2015 DEBUG LoadBalancingClient: Master: \>reliable: sent 16 0 0 0 2015-03-28 10:21:34.513 Corona Simulator[545:507] Sat Mar 28 10:21:34 2015 DEBUG LoadBalancingClient: Master: \<ack: 16 255 2015-03-28 10:21:36.592 Corona Simulator[545:507] Sat Mar 28 10:21:36 2015 DEBUG LoadBalancingClient: Master: \>reliable: sent 17 0 0 0 2015-03-28 10:21:37.252 Corona Simulator[545:507] Sat Mar 28 10:21:37 2015 DEBUG LoadBalancingClient: Master: \<ack: 17 255 2015-03-28 10:21:39.364 Corona Simulator[545:507] Sat Mar 28 10:21:39 2015 DEBUG LoadBalancingClient: Master: \>reliable: sent 18 0 0 0 2015-03-28 10:21:39.891 Corona Simulator[545:507] Sat Mar 28 10:21:39 2015 DEBUG LoadBalancingClient: Master: \<ack: 18 255 2015-03-28 10:21:41.970 Corona Simulator[545:507] Sat Mar 28 10:21:41 2015 DEBUG LoadBalancingClient: Master: \>reliable: sent 19 0 0 0 2015-03-28 10:21:42.730 Corona Simulator[545:507] Sat Mar 28 10:21:42 2015 DEBUG LoadBalancingClient: Master: \<ack: 19 255 2015-03-28 10:21:44.842 Corona Simulator[545:507] Sat Mar 28 10:21:44 2015 DEBUG LoadBalancingClient: Master: \>reliable: sent 20 0 0 0 2015-03-28 10:21:45.501 Corona Simulator[545:507] Sat Mar 28 10:21:45 2015 DEBUG LoadBalancingClient: Master: \<ack: 20 255 2015-03-28 10:21:47.614 Corona Simulator[545:507] Sat Mar 28 10:21:47 2015 DEBUG LoadBalancingClient: Master: \>reliable: sent 21 0 0 0 2015-03-28 10:21:48.274 Corona Simulator[545:507] Sat Mar 28 10:21:48 2015 DEBUG LoadBalancingClient: Master: \<ack: 21 255 2015-03-28 10:21:50.385 Corona Simulator[545:507] Sat Mar 28 10:21:50 2015 DEBUG LoadBalancingClient: Master: \>reliable: sent 22 0 0 0 2015-03-28 10:21:50.913 Corona Simulator[545:507] Sat Mar 28 10:21:50 2015 DEBUG LoadBalancingClient: Master: \<ack: 22 255 2015-03-28 10:21:53.025 Corona Simulator[545:507] Sat Mar 28 10:21:53 2015 DEBUG LoadBalancingClient: Master: \>reliable: sent 23 0 0 0 2015-03-28 10:21:53.552 Corona Simulator[545:507] Sat Mar 28 10:21:53 2015 DEBUG LoadBalancingClient: Master: \<ack: 23 255 2015-03-28 10:21:55.665 Corona Simulator[545:507] Sat Mar 28 10:21:55 2015 DEBUG LoadBalancingClient: Master: \>reliable: sent 24 0 0 0 2015-03-28 10:21:56.193 Corona Simulator[545:507] Sat Mar 28 10:21:56 2015 DEBUG LoadBalancingClient: Master: \<ack: 24 255 2015-03-28 10:21:58.271 Corona Simulator[545:507] Sat Mar 28 10:21:58 2015 DEBUG LoadBalancingClient: Master: \>reliable: sent 25 0 0 0 2015-03-28 10:21:58.800 Corona Simulator[545:507] Sat Mar 28 10:21:58 2015 DEBUG LoadBalancingClient: Master: \<ack: 25 255 2015-03-28 10:22:00.879 Corona Simulator[545:507] Sat Mar 28 10:22:00 2015 DEBUG LoadBalancingClient: Master: \>reliable: sent 26 0 0 0 2015-03-28 10:22:01.407 Corona Simulator[545:507] Sat Mar 28 10:22:01 2015 DEBUG LoadBalancingClient: Master: \<ack: 26 255 2015-03-28 10:22:03.519 Corona Simulator[545:507] Sat Mar 28 10:22:03 2015 DEBUG LoadBalancingClient: Master: \>reliable: sent 27 0 0 0 2015-03-28 10:22:04.046 Corona Simulator[545:507] Sat Mar 28 10:22:04 2015 DEBUG LoadBalancingClient: Master: \<ack: 27 255 2015-03-28 10:22:06.126 Corona Simulator[545:507] Sat Mar 28 10:22:06 2015 DEBUG LoadBalancingClient: Master: \>reliable: sent 28 0 0 0 2015-03-28 10:22:06.653 Corona Simulator[545:507] Sat Mar 28 10:22:06 2015 DEBUG LoadBalancingClient: Master: \<ack: 28 255 2015-03-28 10:22:08.765 Corona Simulator[545:507] Sat Mar 28 10:22:08 2015 DEBUG LoadBalancingClient: Master: \>reliable: sent 29 0 0 0 2015-03-28 10:22:09.294 Corona Simulator[545:507] Sat Mar 28 10:22:09 2015 DEBUG LoadBalancingClient: Master: \<ack: 29 255 2015-03-28 10:22:11.406 Corona Simulator[545:507] Sat Mar 28 10:22:11 2015 DEBUG LoadBalancingClient: Master: \>reliable: sent 30 0 0 0 2015-03-28 10:22:11.933 Corona Simulator[545:507] Sat Mar 28 10:22:11 2015 DEBUG LoadBalancingClient: Master: \<ack: 30 255 2015-03-28 10:22:14.046 Corona Simulator[545:507] Sat Mar 28 10:22:14 2015 DEBUG LoadBalancingClient: Master: \>reliable: sent 31 0 0 0 2015-03-28 10:22:14.574 Corona Simulator[545:507] Sat Mar 28 10:22:14 2015 DEBUG LoadBalancingClient: Master: \<ack: 31 255 2015-03-28 10:22:16.685 Corona Simulator[545:507] Sat Mar 28 10:22:16 2015 DEBUG LoadBalancingClient: Master: \>reliable: sent 32 0 0 0 2015-03-28 10:22:17.214 Corona Simulator[545:507] Sat Mar 28 10:22:17 2015 DEBUG LoadBalancingClient: Master: \<ack: 32 255 2015-03-28 10:22:19.325 Corona Simulator[545:507] Sat Mar 28 10:22:19 2015 DEBUG LoadBalancingClient: Master: \>reliable: sent 33 0 0 0 2015-03-28 10:22:19.853 Corona Simulator[545:507] Sat Mar 28 10:22:19 2015 DEBUG LoadBalancingClient: Master: \<ack: 33 255 2015-03-28 10:22:21.899 Corona Simulator[545:507] Sat Mar 28 10:22:21 2015 DEBUG LoadBalancingClient: Master: \>reliable: sent 34 0 0 0 2015-03-28 10:22:22.427 Corona Simulator[545:507] Sat Mar 28 10:22:22 2015 DEBUG LoadBalancingClient: Master: \<ack: 34 255 2015-03-28 10:22:24.506 Corona Simulator[545:507] Sat Mar 28 10:22:24 2015 DEBUG LoadBalancingClient: Master: \>reliable: sent 35 0 0 0 2015-03-28 10:22:25.034 Corona Simulator[545:507] Sat Mar 28 10:22:25 2015 DEBUG LoadBalancingClient: Master: \<ack: 35 255 2015-03-28 10:22:27.113 Corona Simulator[545:507] Sat Mar 28 10:22:27 2015 DEBUG LoadBalancingClient: Master: \>reliable: sent 36 0 0 0 2015-03-28 10:22:27.641 Corona Simulator[545:507] Sat Mar 28 10:22:27 2015 DEBUG LoadBalancingClient: Master: \<ack: 36 255 2015-03-28 10:22:29.720 Corona Simulator[545:507] Sat Mar 28 10:22:29 2015 DEBUG LoadBalancingClient: Master: \>reliable: sent 37 0 0 0 2015-03-28 10:22:30.248 Corona Simulator[545:507] Sat Mar 28 10:22:30 2015 DEBUG LoadBalancingClient: Master: \<ack: 37 255 2015-03-28 10:22:32.360 Corona Simulator[545:507] Sat Mar 28 10:22:32 2015 DEBUG LoadBalancingClient: Master: \>reliable: sent 38 0 0 0 2015-03-28 10:22:32.888 Corona Simulator[545:507] Sat Mar 28 10:22:32 2015 DEBUG LoadBalancingClient: Master: \<ack: 38 255 2015-03-28 10:22:35.000 Corona Simulator[545:507] Sat Mar 28 10:22:35 2015 DEBUG LoadBalancingClient: Master: \>reliable: sent 39 0 0 0 2015-03-28 10:22:35.495 Corona Simulator[545:507] Sat Mar 28 10:22:35 2015 DEBUG LoadBalancingClient: Master: \<ack: 39 255 2015-03-28 10:22:37.607 Corona Simulator[545:507] Sat Mar 28 10:22:37 2015 DEBUG LoadBalancingClient: Master: \>reliable: sent 40 0 0 0 2015-03-28 10:22:38.135 Corona Simulator[545:507] Sat Mar 28 10:22:38 2015 DEBUG LoadBalancingClient: Master: \<ack: 40 255 2015-03-28 10:22:40.247 Corona Simulator[545:507] Sat Mar 28 10:22:40 2015 DEBUG LoadBalancingClient: Master: \>reliable: sent 41 0 0 0 2015-03-28 10:22:40.774 Corona Simulator[545:507] Sat Mar 28 10:22:40 2015 DEBUG LoadBalancingClient: Master: \<ack: 41 255 2015-03-28 10:22:42.886 Corona Simulator[545:507] Sat Mar 28 10:22:42 2015 DEBUG LoadBalancingClient: Master: \>reliable: sent 42 0 0 0 2015-03-28 10:22:43.414 Corona Simulator[545:507] Sat Mar 28 10:22:43 2015 DEBUG LoadBalancingClient: Master: \<ack: 42 255

it just keep outputting : ack : 43 255, ack : 44 255, ack 45 255  …

Looks like JoinRandomRoom fails because of no rooms available in lobby but you do no handle this case.

You can do it with code like this (taken from particle demo):

 function client:onOperationResponse(errorCode, errorMsg, code, content) if errorCode ~= 0 then if code == LoadBalancingConstants.OperationCode.JoinRandomGame then if errorCode == LoadBalancingConstants.ErrorCode.NoRandomMatchFound then // create room or do something else end end end end

Please enable more detailed log when initializing application to check if JoinRandomRoom operation responded by server properly.

client:setLogLevel(photon.common.Logger.Level.DEBUG)

Do you experience other problems like unexpected disconnections during play? Or app fails on random join only?

hi, i’m still learning how to use your services, and trying to create a room, then join the same room from 2 different devices. but it’s hard for me to step forward.

below is the DEBUG info, the ‘joinRandomRoom’ function should create me a new room if there have no available room, but it doesn’t work. 

2015-03-28 10:20:54.638 Corona Simulator[545:507] Sat Mar 28 10:20:54 2015 INFO LoadBalancingClient: State: Uninitialized -\> ConnectingToMasterserver 2015-03-28 10:20:54.638 Corona Simulator[545:507] onStateChange ConnectingToMasterserver 2015-03-28 10:20:54.638 Corona Simulator[545:507] Sat Mar 28 10:20:54 2015 INFO LoadBalancingClient: Connecting to Master app-us.exitgamescloud.com:5055 2015-03-28 10:20:54.638 Corona Simulator[545:507] Sat Mar 28 10:20:54 2015 TRACE PhotonPeer: create 2015-03-28 10:20:54.638 Corona Simulator[545:507] Sat Mar 28 10:20:54 2015 DEBUG LoadBalancingClient: Master: PhotonPeer[\_addListener] - Adding listener for event 1001 2015-03-28 10:20:54.639 Corona Simulator[545:507] Sat Mar 28 10:20:54 2015 DEBUG LoadBalancingClient: Master: PhotonPeer[\_addListener] - Adding listener for event 1002 2015-03-28 10:20:54.639 Corona Simulator[545:507] Sat Mar 28 10:20:54 2015 DEBUG LoadBalancingClient: Master: PhotonPeer[\_addListener] - Adding listener for event 1004 2015-03-28 10:20:54.639 Corona Simulator[545:507] Sat Mar 28 10:20:54 2015 DEBUG LoadBalancingClient: Master: PhotonPeer[\_addListener] - Adding listener for event 1005 2015-03-28 10:20:54.639 Corona Simulator[545:507] Sat Mar 28 10:20:54 2015 DEBUG LoadBalancingClient: Master: PhotonPeer[\_addListener] - Adding listener for event 1 2015-03-28 10:20:54.639 Corona Simulator[545:507] Sat Mar 28 10:20:54 2015 DEBUG LoadBalancingClient: Master: PhotonPeer[\_addListener] - Adding listener for event 2 2015-03-28 10:20:54.640 Corona Simulator[545:507] Sat Mar 28 10:20:54 2015 DEBUG LoadBalancingClient: Master: PhotonPeer[\_addListener] - Adding listener for event 4 2015-03-28 10:20:54.640 Corona Simulator[545:507] Sat Mar 28 10:20:54 2015 DEBUG LoadBalancingClient: Master: PhotonPeer[\_addListener] - Adding listener for event 3 2015-03-28 10:20:54.640 Corona Simulator[545:507] Sat Mar 28 10:20:54 2015 DEBUG LoadBalancingClient: Master: PhotonPeer[\_addListener] - Adding listener for event 1003 2015-03-28 10:20:54.640 Corona Simulator[545:507] Sat Mar 28 10:20:54 2015 DEBUG LoadBalancingClient: Master: PhotonPeer[\_addListener] - Adding listener for event 230 2015-03-28 10:20:54.640 Corona Simulator[545:507] Sat Mar 28 10:20:54 2015 DEBUG LoadBalancingClient: Master: PhotonPeer[\_addListener] - Adding listener for event 229 2015-03-28 10:20:54.641 Corona Simulator[545:507] Sat Mar 28 10:20:54 2015 DEBUG LoadBalancingClient: Master: PhotonPeer[\_addListener] - Adding listener for event 230 2015-03-28 10:20:54.641 Corona Simulator[545:507] Sat Mar 28 10:20:54 2015 DEBUG LoadBalancingClient: Master: PhotonPeer[\_addListener] - Adding listener for event 229 2015-03-28 10:20:54.641 Corona Simulator[545:507] Sat Mar 28 10:20:54 2015 DEBUG LoadBalancingClient: Master: PhotonPeer[\_addListener] - Adding listener for event 227 2015-03-28 10:20:54.641 Corona Simulator[545:507] Sat Mar 28 10:20:54 2015 DEBUG LoadBalancingClient: Master: PhotonPeer[\_addListener] - Adding listener for event 226 2015-03-28 10:20:54.641 Corona Simulator[545:507] Sat Mar 28 10:20:54 2015 DEBUG LoadBalancingClient: Master: PhotonPeer[\_addListener] - Adding listener for event 225 2015-03-28 10:20:54.641 Corona Simulator[545:507] Sat Mar 28 10:20:54 2015 DEBUG LoadBalancingClient: Master: PhotonPeer[\_addListener] - Adding listener for event 222 2015-03-28 10:20:54.642 Corona Simulator[545:507] Sat Mar 28 10:20:54 2015 DEBUG LoadBalancingClient: Master: PhotonPeer[\_addListener] - Adding listener for event 221 2015-03-28 10:20:54.642 Corona Simulator[545:507] Sat Mar 28 10:20:54 2015 DEBUG LoadBalancingClient: Master: PhotonPeer[\_addListener] - Adding listener for event 224 2015-03-28 10:20:54.642 Corona Simulator[545:507] Sat Mar 28 10:20:54 2015 DEBUG LoadBalancingClient: Master: PhotonPeer[\_addListener] - Adding listener for event 226 2015-03-28 10:20:54.642 Corona Simulator[545:507] Sat Mar 28 10:20:54 2015 DEBUG LoadBalancingClient: Master: PhotonPeer[\_addListener] - Adding listener for event 219 2015-03-28 10:20:54.642 Corona Simulator[545:507] Sat Mar 28 10:20:54 2015 DEBUG LoadBalancingClient: Master: connect app-us.exitgamescloud.com:5055 23397a0c-58c3-431a-82e8-8f051045e17f 2015-03-28 10:20:54.643 Corona Simulator[545:507] Sat Mar 28 10:20:54 2015 DEBUG LoadBalancingClient: Master: startConnection to app-us.exitgamescloud.com:5055 2015-03-28 10:20:54.643 Corona Simulator[545:507] Sat Mar 28 10:20:54 2015 INFO PhotonConnect: app-us.exitgamescloud.com:5055 start connection to host 2015-03-28 10:20:54.647 Corona Simulator[545:507] Sat Mar 28 10:20:54 2015 INFO PhotonConnect: app-us.exitgamescloud.com:5055 app-us.exitgamescloud.com 5055 successful start connection 2015-03-28 10:20:54.749 Corona Simulator[545:507] Sat Mar 28 10:20:54 2015 DEBUG LoadBalancingClient: Master: \>reliable: sent 1 0 0 0 2015-03-28 10:20:55.146 Corona Simulator[545:507] Sat Mar 28 10:20:55 2015 DEBUG LoadBalancingClient: Master: \<ack: 1 255 2015-03-28 10:20:55.146 Corona Simulator[545:507] Sat Mar 28 10:20:55 2015 DEBUG LoadBalancingClient: Master: \>reliable: sent 1 0 0 0 2015-03-28 10:20:55.541 Corona Simulator[545:507] Sat Mar 28 10:20:55 2015 DEBUG LoadBalancingClient: Master: \<ack: 1 0 2015-03-28 10:20:55.541 Corona Simulator[545:507] Sat Mar 28 10:20:55 2015 DEBUG LoadBalancingClient: Master: \>reliable: sent 2 0 0 0 2015-03-28 10:20:55.541 Corona Simulator[545:507] Sat Mar 28 10:20:55 2015 INFO LoadBalancingClient: Master: Connected 2015-03-28 10:20:55.795 Corona Simulator[545:507] Sat Mar 28 10:20:55 2015 DEBUG LoadBalancingClient: Master: \>reliable: sent 2 0 0 0 2015-03-28 10:20:55.795 Corona Simulator[545:507] Sat Mar 28 10:20:55 2015 INFO LoadBalancingClient: Master: Encryption Establishing... 2015-03-28 10:20:56.069 Corona Simulator[545:507] Sat Mar 28 10:20:56 2015 DEBUG LoadBalancingClient: Master: \<reliable: skipping duplicate 1 1 2015-03-28 10:20:56.201 Corona Simulator[545:507] Sat Mar 28 10:20:56 2015 DEBUG LoadBalancingClient: Master: \<ack: 2 20 2015-03-28 10:20:56.201 Corona Simulator[545:507] Sat Mar 28 10:20:56 2015 DEBUG LoadBalancingClient: Master: \>reliable: sent 3 0 0 0 2015-03-28 10:20:56.202 Corona Simulator[545:507] Sat Mar 28 10:20:56 2015 DEBUG LoadBalancingClient: Master: \<ack: 2 0 2015-03-28 10:20:56.502 Corona Simulator[545:507] Sat Mar 28 10:20:56 2015 INFO LoadBalancingClient: Master: Encryption Established 2015-03-28 10:20:56.505 Corona Simulator[545:507] Sat Mar 28 10:20:56 2015 DEBUG LoadBalancingClient: Master: \>reliable: sent 3 0 0 0 2015-03-28 10:20:56.506 Corona Simulator[545:507] Sat Mar 28 10:20:56 2015 INFO LoadBalancingClient: Master: Authenticate... 2015-03-28 10:20:56.795 Corona Simulator[545:507] Sat Mar 28 10:20:56 2015 DEBUG LoadBalancingClient: Master: \<ack: 3 20 2015-03-28 10:20:56.927 Corona Simulator[545:507] Sat Mar 28 10:20:56 2015 DEBUG LoadBalancingClient: Master: \<ack: 3 0 2015-03-28 10:20:56.927 Corona Simulator[545:507] Sat Mar 28 10:20:56 2015 DEBUG LoadBalancingClient: Master: ev AppStats table: 0x7f92253b78c0 2015-03-28 10:20:56.930 Corona Simulator[545:507] Sat Mar 28 10:20:56 2015 DEBUG LoadBalancingClient: Master: resp Authenticate table: 0x7f9225351e50 2015-03-28 10:20:56.930 Corona Simulator[545:507] Sat Mar 28 10:20:56 2015 INFO LoadBalancingClient: Master: Authenticated 2015-03-28 10:20:56.931 Corona Simulator[545:507] Sat Mar 28 10:20:56 2015 INFO LoadBalancingClient: State: ConnectingToMasterserver -\> ConnectedToMaster 2015-03-28 10:20:56.931 Corona Simulator[545:507] onStateChange ConnectedToMaster 2015-03-28 10:20:56.931 Corona Simulator[545:507] Sat Mar 28 10:20:56 2015 DEBUG LoadBalancingClient: Master: \>reliable: sent 4 0 0 0 2015-03-28 10:20:56.931 Corona Simulator[545:507] Sat Mar 28 10:20:56 2015 INFO LoadBalancingClient: Master: Join Lobby nil nil ... 2015-03-28 10:20:57.323 Corona Simulator[545:507] Sat Mar 28 10:20:57 2015 DEBUG LoadBalancingClient: Master: \<ack: 4 0 2015-03-28 10:20:57.324 Corona Simulator[545:507] Sat Mar 28 10:20:57 2015 DEBUG LoadBalancingClient: Master: resp JoinLobby table: 0x7f92251178b0 2015-03-28 10:20:57.324 Corona Simulator[545:507] Sat Mar 28 10:20:57 2015 INFO LoadBalancingClient: Master: Joined to Lobby 2015-03-28 10:20:57.324 Corona Simulator[545:507] Sat Mar 28 10:20:57 2015 INFO LoadBalancingClient: State: ConnectedToMaster -\> JoinedLobby 2015-03-28 10:20:57.324 Corona Simulator[545:507] onStateChange JoinedLobby 2015-03-28 10:20:57.324 Corona Simulator[545:507] Sat Mar 28 10:20:57 2015 INFO LoadBalancingClient: Join Random Room nil nil ... 2015-03-28 10:20:57.325 Corona Simulator[545:507] Sat Mar 28 10:20:57 2015 DEBUG LoadBalancingClient: Master: \>reliable: sent 5 0 0 0 2015-03-28 10:20:57.325 Corona Simulator[545:507] Sat Mar 28 10:20:57 2015 DEBUG LoadBalancingClient: Master: ev GameList table: 0x7f92240d2a70 table: 0x7f922516f2c0 2015-03-28 10:20:57.719 Corona Simulator[545:507] Sat Mar 28 10:20:57 2015 DEBUG LoadBalancingClient: Master: \<ack: 5 0 2015-03-28 10:20:57.720 Corona Simulator[545:507] Sat Mar 28 10:20:57 2015 DEBUG LoadBalancingClient: Master: resp JoinRandomGame table: 0x7f9224575840 2015-03-28 10:20:59.831 Corona Simulator[545:507] Sat Mar 28 10:20:59 2015 DEBUG LoadBalancingClient: Master: \>reliable: sent 4 0 0 0 2015-03-28 10:21:00.359 Corona Simulator[545:507] Sat Mar 28 10:21:00 2015 DEBUG LoadBalancingClient: Master: \<ack: 4 255 2015-03-28 10:21:01.942 Corona Simulator[545:507] Sat Mar 28 10:21:01 2015 DEBUG LoadBalancingClient: Master: ev AppStats table: 0x7f922518cf00 2015-03-28 10:21:02.471 Corona Simulator[545:507] Sat Mar 28 10:21:02 2015 DEBUG LoadBalancingClient: Master: \>reliable: sent 5 0 0 0 2015-03-28 10:21:02.999 Corona Simulator[545:507] Sat Mar 28 10:21:02 2015 DEBUG LoadBalancingClient: Master: \<ack: 5 255 2015-03-28 10:21:05.111 Corona Simulator[545:507] Sat Mar 28 10:21:05 2015 DEBUG LoadBalancingClient: Master: \>reliable: sent 6 0 0 0 2015-03-28 10:21:05.639 Corona Simulator[545:507] Sat Mar 28 10:21:05 2015 DEBUG LoadBalancingClient: Master: \<ack: 6 255 2015-03-28 10:21:07.751 Corona Simulator[545:507] Sat Mar 28 10:21:07 2015 DEBUG LoadBalancingClient: Master: \>reliable: sent 7 0 0 0 2015-03-28 10:21:08.278 Corona Simulator[545:507] Sat Mar 28 10:21:08 2015 DEBUG LoadBalancingClient: Master: \<ack: 7 255 2015-03-28 10:21:10.391 Corona Simulator[545:507] Sat Mar 28 10:21:10 2015 DEBUG LoadBalancingClient: Master: \>reliable: sent 8 0 0 0 2015-03-28 10:21:10.919 Corona Simulator[545:507] Sat Mar 28 10:21:10 2015 DEBUG LoadBalancingClient: Master: \<ack: 8 255 2015-03-28 10:21:13.031 Corona Simulator[545:507] Sat Mar 28 10:21:13 2015 DEBUG LoadBalancingClient: Master: \>reliable: sent 9 0 0 0 2015-03-28 10:21:13.559 Corona Simulator[545:507] Sat Mar 28 10:21:13 2015 DEBUG LoadBalancingClient: Master: \<ack: 9 255 2015-03-28 10:21:15.671 Corona Simulator[545:507] Sat Mar 28 10:21:15 2015 DEBUG LoadBalancingClient: Master: \>reliable: sent 10 0 0 0 2015-03-28 10:21:16.331 Corona Simulator[545:507] Sat Mar 28 10:21:16 2015 DEBUG LoadBalancingClient: Master: \<ack: 10 255 2015-03-28 10:21:18.442 Corona Simulator[545:507] Sat Mar 28 10:21:18 2015 DEBUG LoadBalancingClient: Master: \>reliable: sent 11 0 0 0 2015-03-28 10:21:20.654 Corona Simulator[545:507] Sat Mar 28 10:21:20 2015 DEBUG LoadBalancingClient: Master: \>reliable: resending pCommand: 11 , time: 29455 . sent time: 27375 timeout: 29373.320910215 , sentCount: 1 , original sent time: 27375 round trip: 1998.3209102154 2015-03-28 10:21:20.654 Corona Simulator[545:507] Sat Mar 28 10:21:20 2015 DEBUG LoadBalancingClient: Master: \>reliable: sent 11 0 27375 27375 2015-03-28 10:21:21.050 Corona Simulator[545:507] Sat Mar 28 10:21:21 2015 DEBUG LoadBalancingClient: Master: \<ack: 11 255 2015-03-28 10:21:23.161 Corona Simulator[545:507] Sat Mar 28 10:21:23 2015 DEBUG LoadBalancingClient: Master: \>reliable: sent 12 0 0 0 2015-03-28 10:21:23.821 Corona Simulator[545:507] Sat Mar 28 10:21:23 2015 DEBUG LoadBalancingClient: Master: \<ack: 12 255 2015-03-28 10:21:25.933 Corona Simulator[545:507] Sat Mar 28 10:21:25 2015 DEBUG LoadBalancingClient: Master: \>reliable: sent 13 0 0 0 2015-03-28 10:21:26.593 Corona Simulator[545:507] Sat Mar 28 10:21:26 2015 DEBUG LoadBalancingClient: Master: \<ack: 13 255 2015-03-28 10:21:28.705 Corona Simulator[545:507] Sat Mar 28 10:21:28 2015 DEBUG LoadBalancingClient: Master: \>reliable: sent 14 0 0 0 2015-03-28 10:21:29.233 Corona Simulator[545:507] Sat Mar 28 10:21:29 2015 DEBUG LoadBalancingClient: Master: \<ack: 14 255 2015-03-28 10:21:31.345 Corona Simulator[545:507] Sat Mar 28 10:21:31 2015 DEBUG LoadBalancingClient: Master: \>reliable: sent 15 0 0 0 2015-03-28 10:21:31.873 Corona Simulator[545:507] Sat Mar 28 10:21:31 2015 DEBUG LoadBalancingClient: Master: \<ack: 15 255 2015-03-28 10:21:33.984 Corona Simulator[545:507] Sat Mar 28 10:21:33 2015 DEBUG LoadBalancingClient: Master: \>reliable: sent 16 0 0 0 2015-03-28 10:21:34.513 Corona Simulator[545:507] Sat Mar 28 10:21:34 2015 DEBUG LoadBalancingClient: Master: \<ack: 16 255 2015-03-28 10:21:36.592 Corona Simulator[545:507] Sat Mar 28 10:21:36 2015 DEBUG LoadBalancingClient: Master: \>reliable: sent 17 0 0 0 2015-03-28 10:21:37.252 Corona Simulator[545:507] Sat Mar 28 10:21:37 2015 DEBUG LoadBalancingClient: Master: \<ack: 17 255 2015-03-28 10:21:39.364 Corona Simulator[545:507] Sat Mar 28 10:21:39 2015 DEBUG LoadBalancingClient: Master: \>reliable: sent 18 0 0 0 2015-03-28 10:21:39.891 Corona Simulator[545:507] Sat Mar 28 10:21:39 2015 DEBUG LoadBalancingClient: Master: \<ack: 18 255 2015-03-28 10:21:41.970 Corona Simulator[545:507] Sat Mar 28 10:21:41 2015 DEBUG LoadBalancingClient: Master: \>reliable: sent 19 0 0 0 2015-03-28 10:21:42.730 Corona Simulator[545:507] Sat Mar 28 10:21:42 2015 DEBUG LoadBalancingClient: Master: \<ack: 19 255 2015-03-28 10:21:44.842 Corona Simulator[545:507] Sat Mar 28 10:21:44 2015 DEBUG LoadBalancingClient: Master: \>reliable: sent 20 0 0 0 2015-03-28 10:21:45.501 Corona Simulator[545:507] Sat Mar 28 10:21:45 2015 DEBUG LoadBalancingClient: Master: \<ack: 20 255 2015-03-28 10:21:47.614 Corona Simulator[545:507] Sat Mar 28 10:21:47 2015 DEBUG LoadBalancingClient: Master: \>reliable: sent 21 0 0 0 2015-03-28 10:21:48.274 Corona Simulator[545:507] Sat Mar 28 10:21:48 2015 DEBUG LoadBalancingClient: Master: \<ack: 21 255 2015-03-28 10:21:50.385 Corona Simulator[545:507] Sat Mar 28 10:21:50 2015 DEBUG LoadBalancingClient: Master: \>reliable: sent 22 0 0 0 2015-03-28 10:21:50.913 Corona Simulator[545:507] Sat Mar 28 10:21:50 2015 DEBUG LoadBalancingClient: Master: \<ack: 22 255 2015-03-28 10:21:53.025 Corona Simulator[545:507] Sat Mar 28 10:21:53 2015 DEBUG LoadBalancingClient: Master: \>reliable: sent 23 0 0 0 2015-03-28 10:21:53.552 Corona Simulator[545:507] Sat Mar 28 10:21:53 2015 DEBUG LoadBalancingClient: Master: \<ack: 23 255 2015-03-28 10:21:55.665 Corona Simulator[545:507] Sat Mar 28 10:21:55 2015 DEBUG LoadBalancingClient: Master: \>reliable: sent 24 0 0 0 2015-03-28 10:21:56.193 Corona Simulator[545:507] Sat Mar 28 10:21:56 2015 DEBUG LoadBalancingClient: Master: \<ack: 24 255 2015-03-28 10:21:58.271 Corona Simulator[545:507] Sat Mar 28 10:21:58 2015 DEBUG LoadBalancingClient: Master: \>reliable: sent 25 0 0 0 2015-03-28 10:21:58.800 Corona Simulator[545:507] Sat Mar 28 10:21:58 2015 DEBUG LoadBalancingClient: Master: \<ack: 25 255 2015-03-28 10:22:00.879 Corona Simulator[545:507] Sat Mar 28 10:22:00 2015 DEBUG LoadBalancingClient: Master: \>reliable: sent 26 0 0 0 2015-03-28 10:22:01.407 Corona Simulator[545:507] Sat Mar 28 10:22:01 2015 DEBUG LoadBalancingClient: Master: \<ack: 26 255 2015-03-28 10:22:03.519 Corona Simulator[545:507] Sat Mar 28 10:22:03 2015 DEBUG LoadBalancingClient: Master: \>reliable: sent 27 0 0 0 2015-03-28 10:22:04.046 Corona Simulator[545:507] Sat Mar 28 10:22:04 2015 DEBUG LoadBalancingClient: Master: \<ack: 27 255 2015-03-28 10:22:06.126 Corona Simulator[545:507] Sat Mar 28 10:22:06 2015 DEBUG LoadBalancingClient: Master: \>reliable: sent 28 0 0 0 2015-03-28 10:22:06.653 Corona Simulator[545:507] Sat Mar 28 10:22:06 2015 DEBUG LoadBalancingClient: Master: \<ack: 28 255 2015-03-28 10:22:08.765 Corona Simulator[545:507] Sat Mar 28 10:22:08 2015 DEBUG LoadBalancingClient: Master: \>reliable: sent 29 0 0 0 2015-03-28 10:22:09.294 Corona Simulator[545:507] Sat Mar 28 10:22:09 2015 DEBUG LoadBalancingClient: Master: \<ack: 29 255 2015-03-28 10:22:11.406 Corona Simulator[545:507] Sat Mar 28 10:22:11 2015 DEBUG LoadBalancingClient: Master: \>reliable: sent 30 0 0 0 2015-03-28 10:22:11.933 Corona Simulator[545:507] Sat Mar 28 10:22:11 2015 DEBUG LoadBalancingClient: Master: \<ack: 30 255 2015-03-28 10:22:14.046 Corona Simulator[545:507] Sat Mar 28 10:22:14 2015 DEBUG LoadBalancingClient: Master: \>reliable: sent 31 0 0 0 2015-03-28 10:22:14.574 Corona Simulator[545:507] Sat Mar 28 10:22:14 2015 DEBUG LoadBalancingClient: Master: \<ack: 31 255 2015-03-28 10:22:16.685 Corona Simulator[545:507] Sat Mar 28 10:22:16 2015 DEBUG LoadBalancingClient: Master: \>reliable: sent 32 0 0 0 2015-03-28 10:22:17.214 Corona Simulator[545:507] Sat Mar 28 10:22:17 2015 DEBUG LoadBalancingClient: Master: \<ack: 32 255 2015-03-28 10:22:19.325 Corona Simulator[545:507] Sat Mar 28 10:22:19 2015 DEBUG LoadBalancingClient: Master: \>reliable: sent 33 0 0 0 2015-03-28 10:22:19.853 Corona Simulator[545:507] Sat Mar 28 10:22:19 2015 DEBUG LoadBalancingClient: Master: \<ack: 33 255 2015-03-28 10:22:21.899 Corona Simulator[545:507] Sat Mar 28 10:22:21 2015 DEBUG LoadBalancingClient: Master: \>reliable: sent 34 0 0 0 2015-03-28 10:22:22.427 Corona Simulator[545:507] Sat Mar 28 10:22:22 2015 DEBUG LoadBalancingClient: Master: \<ack: 34 255 2015-03-28 10:22:24.506 Corona Simulator[545:507] Sat Mar 28 10:22:24 2015 DEBUG LoadBalancingClient: Master: \>reliable: sent 35 0 0 0 2015-03-28 10:22:25.034 Corona Simulator[545:507] Sat Mar 28 10:22:25 2015 DEBUG LoadBalancingClient: Master: \<ack: 35 255 2015-03-28 10:22:27.113 Corona Simulator[545:507] Sat Mar 28 10:22:27 2015 DEBUG LoadBalancingClient: Master: \>reliable: sent 36 0 0 0 2015-03-28 10:22:27.641 Corona Simulator[545:507] Sat Mar 28 10:22:27 2015 DEBUG LoadBalancingClient: Master: \<ack: 36 255 2015-03-28 10:22:29.720 Corona Simulator[545:507] Sat Mar 28 10:22:29 2015 DEBUG LoadBalancingClient: Master: \>reliable: sent 37 0 0 0 2015-03-28 10:22:30.248 Corona Simulator[545:507] Sat Mar 28 10:22:30 2015 DEBUG LoadBalancingClient: Master: \<ack: 37 255 2015-03-28 10:22:32.360 Corona Simulator[545:507] Sat Mar 28 10:22:32 2015 DEBUG LoadBalancingClient: Master: \>reliable: sent 38 0 0 0 2015-03-28 10:22:32.888 Corona Simulator[545:507] Sat Mar 28 10:22:32 2015 DEBUG LoadBalancingClient: Master: \<ack: 38 255 2015-03-28 10:22:35.000 Corona Simulator[545:507] Sat Mar 28 10:22:35 2015 DEBUG LoadBalancingClient: Master: \>reliable: sent 39 0 0 0 2015-03-28 10:22:35.495 Corona Simulator[545:507] Sat Mar 28 10:22:35 2015 DEBUG LoadBalancingClient: Master: \<ack: 39 255 2015-03-28 10:22:37.607 Corona Simulator[545:507] Sat Mar 28 10:22:37 2015 DEBUG LoadBalancingClient: Master: \>reliable: sent 40 0 0 0 2015-03-28 10:22:38.135 Corona Simulator[545:507] Sat Mar 28 10:22:38 2015 DEBUG LoadBalancingClient: Master: \<ack: 40 255 2015-03-28 10:22:40.247 Corona Simulator[545:507] Sat Mar 28 10:22:40 2015 DEBUG LoadBalancingClient: Master: \>reliable: sent 41 0 0 0 2015-03-28 10:22:40.774 Corona Simulator[545:507] Sat Mar 28 10:22:40 2015 DEBUG LoadBalancingClient: Master: \<ack: 41 255 2015-03-28 10:22:42.886 Corona Simulator[545:507] Sat Mar 28 10:22:42 2015 DEBUG LoadBalancingClient: Master: \>reliable: sent 42 0 0 0 2015-03-28 10:22:43.414 Corona Simulator[545:507] Sat Mar 28 10:22:43 2015 DEBUG LoadBalancingClient: Master: \<ack: 42 255

it just keep outputting : ack : 43 255, ack : 44 255, ack 45 255  …

Looks like JoinRandomRoom fails because of no rooms available in lobby but you do no handle this case.

You can do it with code like this (taken from particle demo):

 function client:onOperationResponse(errorCode, errorMsg, code, content) if errorCode ~= 0 then if code == LoadBalancingConstants.OperationCode.JoinRandomGame then if errorCode == LoadBalancingConstants.ErrorCode.NoRandomMatchFound then // create room or do something else end end end end