Photon Chat Authentication request error: -1. Disconnecting

asrakan
asrakan
edited June 14 in Photon Chat
We have a live game with Photon premium cloud. At the game start we are using PlayFab User Id to connect photon chat however we are getting the "photon chat Authentication request error: -1. Disconnecting"

It is mostly random and we cant figure out the reason. Most of the time we successfully connect. When it does it happens to all of the devices at once.


Our connect code :
public static void Connect()
        {
            if (!Instance || Instance._chatClient == null)
            {
                return;
            }
            if (Instance._chatClient.State == ChatState.Uninitialized || Instance._chatClient.State == ChatState.Disconnected)
            {
                Instance._chatClient.Connect("SECRET_ID", GameConfig.PhotonNetworkVersion, new Photon.Chat.AuthenticationValues(PlayfabDataManager.LocalPlayerPlayfabID));
            }
        }


Our debugs:
[Log] OnChatStateChange(ChatState state) : ConnectedToNameServer
[Log] OnChatStateChange(ChatState state) : Authenticated
[Log] Network Chat Handler Debug Return : Received your UserID from server. Updating local value to: 1B16E30AEE1929A2.Debug level: INFO
[Log] Set local player status to : Online
[Log] Network Chat Handler Debug Return : SetOnlineStatus called while not connected to front end server..Debug level: ERROR
[Log] Network Chat Handler Debug Return : Authentication request error: -1. Disconnecting..Debug level: ERROR
[Log] OnChatStateChange(ChatState state) : Disconnected
[Log] Network Chat Handler Debug Return : RemoveFriends called while not connected to front end server..Debug level: ERROR

Another device
[Log] OnChatStateChange(ChatState state) : ConnectedToNameServer
[Log] OnChatStateChange(ChatState state) : Authenticated
[Log] Network Chat Handler Debug Return : Received your UserID from server. Updating local value to: 1B16E30AEE1929A2.Debug level: INFO
[Log] Network Chat Handler Debug Return : Authentication request error: -1. Disconnecting..Debug level: ERROR
[Log] OnChatStateChange(ChatState state) : Disconnected

Comments

  • Hi @asrakan,

    Thank you for choosing Photon!

    Make sure you are using a Photon Chat AppId and not a Photon AppId of another type.
    Also, do not call SetOnlineStatus before the client is fully connected and authenticated, wait for the callback OnConnected.
  • Hi @JohnTube thanks for quick answer i am trying the target solution and will let you know the results.
  • Hi @JohnTube i created control for all the functions but problem still occurs.

    [Log] OnChatStateChange(ChatState state) : ConnectedToNameServer
    [Log] OnChatStateChange(ChatState state) : Authenticated
    [Log] Network Chat Handler Debug Return : Received your UserID from server. Updating local value to: 1B16E30AEE1929A2.Debug level: INFO
    [Log] Network Chat Handler Debug Return : Authentication request error: -1. Disconnecting..Debug level: ERROR
    [Log] OnChatStateChange(ChatState state) : Disconnected


    Is there any connection between Photon Chat Auth and Photon auth? Because I am using same user ID but different App ID. What could be the reason that it disconnect me from server even after I connected?

    PhotonNetwork.AuthValues = new AuthenticationValues(PlayfabDataManager.LocalPlayerPlayfabID);
    PhotonNetwork.player.UserId = PlayfabDataManager.LocalPlayerPlayfabID;
  • Also it seems issue started last week in our live game without our update. Was there any update in Photon servers @JohnTube
  • @JohnTube I just adjusted logs in Photon codes and it seems like error caused from Internal server.

    Network Chat Handler Debug Return : OperationResponse 230: ReturnCode: -1 (Authentication failed. Internal server error). Parameters: {} NS: ns.exitgames.com:5058 FrontEnd: chat-eu.exitgames.com:5057.Debug level: INFO
  • Hi @asrakan,

    Please send an email to [email protected] with your AppId and link to this forum discussion as soon as possible.