Unity: OnPhotonJoinRoomFailed: Error "-3" > "Not authorized": more info?

We are in the late stage of our project and suddenly on a particular android device when trying to re-join an existing room we get this new kind of error

error code: -3
error message: "Not authorized"

I can not find any references in the code or documentation on this and would like to understand why only a specific device is getting this error and can not re-join an existing room?

Example code
public override void OnPhotonJoinRoomFailed (object[] codeAndMsg)
{
	int errorCode 	= int.Parse(codeAndMsg[0].ToString());
	string message 	= codeAndMsg[1].ToString();

	if(errorCode == 32765 || message.ToLower() == "game full"){
		//Game is full
	}else if(error == -3){
		// ?
	}
}

Comments

  • It seems that our device did not authenticated even though the following conditions were true
    • PhotonNetwork.connected == true
    • Application.internetReachability != NetworkReachability.NotReachable
    Is it a requirement to be inside the lobby to (re)join a game?

    We solved our problem in the end by skipping or ignoring the error and attempting to join again
  • JohnTube
    JohnTube ✭✭✭✭✭
    edited November 2015
    This is not related to your question directly.

    Are you using Application.internetReachability != NetworkReachability.NotReachable to check if device is connected to the Internet? If that's the case, I suggest you change the method as it is not reliable. Either implement or use a captive portal detection solution. There is an nice package on the asset store for that. You can also make use of the built-in and native Android one.