[Solved] Problem when calling PhotonNetwork.CreateRoom()

When I call PhotonNetwork.CreateRoom(null),
sometimes (about once every five trials) I got error messages below and it seems that no response from server were recieved.
None of callbacks (OnJoinedRoom(), OnCreatedRoom() and OnPhotonJoinRoomFailed()) have got called.
What kind of case would apply to the situation like this?
Any information would be helpful.
Thanks.


Authentication failed: 'Authentication ticket expired' Code: 32753
UnityEngine.Debug:LogError(Object)
NetworkingPeer:OnOperationResponse(OperationResponse) (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/NetworkingPeer.cs:1001)
ExitGames.Client.Photon.PeerBase:DeserializeMessageAndCallback(Byte[])
ExitGames.Client.Photon.EnetPeer:DispatchIncomingCommands()
ExitGames.Client.Photon.PhotonPeer:DispatchIncomingCommands()
PhotonHandler:Update() (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/PhotonHandler.cs:76)

Comments

  • I assume this is in the Cloud?
    Which version of PUN do you use?
    Is that in the default lobby?
    What is your timing to produce this issue? Do you wait somewhere for minutes or play a game before creating the new one or ..?
    Anything else in your logs?

    We don't know at the moment how this error gets caused.
    We have those tickets/secrets to identify a user on all servers. They time out but usually get replaced on every Join and Create and some other operations.
  • Thank you for your quick response.

    Yes, this is in the Cloud.
    I use Version1.25.2 with PUN+ available.
    I could reproduce this error with a scene as simplified as possible.
    There are a GameObject and Main Camera placed in the scene.
    I added a script below to the GameObject.
    using UnityEngine;
    using System.Collections;
    
    public class Test : MonoBehaviour 
    {
    	void Awake()
    	{
    		print("Awake");
    		PhotonNetwork.ConnectUsingSettings("0.1");
    	}
    
    	void OnGUI()
    	{
    		GUILayout.Label(PhotonNetwork.connectionStateDetailed.ToString());	
    	}
    
    	void OnJoinedLobby()
    	{
    		print("OnJoinedLobby");
    		PhotonNetwork.CreateRoom(null);
    	}
    
    
    	void OnCreatedRoom()
    	{
    		print("OnCreatedRoom");
    	}
    	void OnJoinedRoom()
    	{
    		print("OnJoinedRoom");
    	}
    	void OnPhotonCreateRoomFailed()
    	{
    		print("OnPhotonCreateRoomFailed");
    	}
    
    }
    
    
    

    When I play this scene, sometimes the error gets caused showing logs below.
    Thanks.


    ***Awake
    UnityEngine.MonoBehaviour:print(Object)
    Test:Awake() (at Assets/Test.cs:8)

    ***OnJoinedLobby
    UnityEngine.MonoBehaviour:print(Object)
    Test:OnJoinedLobby() (at Assets/Test.cs:19)
    UnityEngine.GameObject:SendMessage(String, Object, SendMessageOptions)
    NetworkingPeer:SendMonoMessage(PhotonNetworkingMessage, Object[]) (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/NetworkingPeer.cs:1769)
    NetworkingPeer:OnOperationResponse(OperationResponse) (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/NetworkingPeer.cs:1157)
    ExitGames.Client.Photon.PeerBase:DeserializeMessageAndCallback(Byte[])
    ExitGames.Client.Photon.EnetPeer:DispatchIncomingCommands()
    ExitGames.Client.Photon.PhotonPeer:DispatchIncomingCommands()
    PhotonHandler:Update() (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/PhotonHandler.cs:76)

    Authentication failed: 'Authentication ticket expired' Code: 32753
    UnityEngine.Debug:LogError(Object)
    NetworkingPeer:OnOperationResponse(OperationResponse) (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/NetworkingPeer.cs:1001)
    ExitGames.Client.Photon.PeerBase:DeserializeMessageAndCallback(Byte[])
    ExitGames.Client.Photon.EnetPeer:DispatchIncomingCommands()
    ExitGames.Client.Photon.PhotonPeer:DispatchIncomingCommands()
    PhotonHandler:Update() (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/PhotonHandler.cs:76)
  • We will try to reproduce this. If we can, we can probably also find a fix.
    Subscribe this topic to get updates when we post them ;)
  • We didn't find any problems when using the code provided. Can you please send us your Unity project? Also, can it be the case that you have any other script which does something that affects Photon?
  • We also got this error message.

    We use the following steps to Create Room.
    void Start()
    {
        PhotonNetwork.playerName = "some unique name" ;
        PhotonNetwork.autoJoinLobby = false ;
        PhotonNetwork.ConnectUsingSettings("1.0") ;
    }
    
    void CreateRoom()
    {
        if ( PhotonNetwork.connectedAndReady && ! PhotonNetwork.inRoom )
        {
            RoomOptions options = new RoomOptions() ;
            return PhotonNetwork.CreateRoom( null , options , null ) ;
        }
    }
    
    
  • Hello,

    was this on the "Japan" region? If yes: the issue is now resolved. Please let us know if you still have any problems.

    Our apologies for the inconvenience!
  • Nicole wrote:
    Hello,

    was this on the "Japan" region? If yes: the issue is now resolved. Please let us know if you still have any problems.

    Our apologies for the inconvenience!


    Yes, thanks ! :lol:
  • I confirmed that my project became to work properly now.
    I appreciate for your quick response!
    Thank you.
  • RoomOptions options = new RoomOptions() ;
    

    i dont know but it keeps saying that RoomOptions coud not be found