Photon JoinLobby not working

Hi, I tried to Join a Lobby in Photon, but it always gives me the error:
Operation JoinLobby (229) not called because client is not connected or not ready yet, client state: PeerCreated
PhotonNetwork.JoinLobby() Gets called in OnConnectedToMaster()
Thanksfor your help

You first have to connect. This is a short workflow, which needs to complete, so we added a callback, telling you when thatā€™s done. Then, you could join a lobby (but donā€™t have to).

The Basics Tutorial is a good first read. Code-along and you will not stumble over those basics anymore.

Yes, I thought OnConnectedtoMaster gets called when youā€™re connected

I just checked in PUN 2.27 and JoinLobby can be called in OnConnectedToMaster.
Do you run an older version?

No I run PUN 2.27

Do you have other PhotonNetwork calls in OnConnectedToMaster?
What exactly does the log say (it should have some hint what state your client is in)ā€¦

Hey Broļ¼today i met the same problem,finally i find in Resource if you set photon start in offline would cause this problem.may be you fixed hhh

4 Likes

Thank you so much!! That worked for me

Thanks bro