How to handle error 32746 (already joined)?
The whole answer can be found below.
Try Our
Documentation
Please check if you can find an answer in our extensive documentation on PUN.
Join Us
on Discord
Meet and talk to our staff and the entire Photon-Community via Discord.
Read More on
Stack Overflow
Find more information on Stack Overflow (for Circle members only).
How to handle error 32746 (already joined)?
DuckOfDoom
2017-09-18 15:12:31
There are some rare cases when my users get disconnected and when they try to rejoin, PUN answers with an error code 32746.
In documentation:
PhotonNetwork.room
is null and everything after that crashes and burns.
What do I have to do to successfully rejoin? Call JoinRoom()
? Call ReconnectAndRejoin()
?
Comments
DuckOfDoom
2017-09-18 15:15:13
If it helps, there is something like this in the log prior to this error:
ERROR:UnityLog: 2017-09-18 14:51:14 (s) (3623.266) : Cannot send op: 252 Not connected. PeerState: Zombie
ERROR:UnityLog: 2017-09-18 14:51:14 (s) (3623.266) : Cannot send op: 252 Not connected. PeerState: Zombie
ERROR:UnityLog: 2017-09-18 14:51:14 (s) (3623.266) : Cannot send op: 252 Not connected. PeerState: Zombie
Hi @DuckOfDoom,
While we are looking at your report you can take a look at the other discussion here.
DuckOfDoom
2017-09-18 15:31:49
@JohnTube Thanks for a quick reply!
I searched the forum before posting but missed that particular post. Thanks for directions.
Unfortunately, my PlayerTTL has to be a pretty big value (5 minutes) because of design issues.
Also, is there any reliable way to reproduce this error so that I could try different variants?
Hi @DuckOfDoom,
FYI: the other discussion has been updated.
Do you use Photon Cloud or do you connect to self hosted servers?
If the latter which SDK version?
What did you call to get the error code (JoinFailedFoundActiveJoiner = 32746)?
-
ReconnectAndRejoin
-
Join
-
Rejoin
DuckOfDoom
2017-09-20 15:09:23
Hi, @JohnTube,
I'm using Photon Cloud.
After timeout-disconnect and connecting back to lobby (OnJoinedLobby()
is called) I call PhotonNetwork.ReJoinRoom()
with room name. Most of the times this works as intended (i.e. if player terminates the app or it just enters background. After reconnect Rejoin works like a charm), but sometimes, after "timeout-disconnect", this error happens.
You should use ReconnectAndRejoin in this case as it's a good shortcut and should avoid this error.
In any case if you still get this error while you make sure you use unique UserID per player and same player is not joined to the same room elsewhere then I can't suggest anything but retry.
DuckOfDoom
2017-09-21 08:07:19
@JohnTube Thanks, I'll try ReconnectAndRejoin.
User ID per player is 100% unique because players can correctly rejoin in other cases.
Back to top