[PlayFab] app not associated with title/no chat id

Options
deaverinc
deaverinc
edited March 2022 in Any Topic & Chat

first, how long does it take to setup the title id on the server for authentication? i followed the process and have been waiting an hour but still get the error:


/Client/GetPhotonAuthenticationToken: PhotonApplicationNotAssociatedWithTitle

UnityEngine.Debug:LogError (object)


second, how do i get a chat id? i am using photon cloud and have tried to select every option when creating a new app but none of them will give me a chat id. what am i doing wrong?

Best Answer

  • JohnTube
    JohnTube ✭✭✭✭✭
    Answer ✓
    Options

    Hi @deaverinc,

    Please replace

       PhotonApplicationId = PhotonNetwork.PhotonServerSettings.AppSettings.AppVersion
    

    with

       PhotonApplicationId = PhotonNetwork.PhotonServerSettings.AppSettings.AppIdRealtime
    


Answers

  • JohnTube
    JohnTube ✭✭✭✭✭
    Options

    Hi @deaverinc,

    Thank you for choosing Photon!

    I don't see any mention to PlayFab in your post although this error is from PlayFab.

    when you create a new app from dashboard you can specify it's type: Chat.

    Otherwise, you need to properly configure Photon addon on PlayFab.

    Follow PlayFab's guide as well: here, although it's meant for Realtime/PUN, you can skip the steps specific to Webhooks and set Chat AppId in Photon add-on.


  • deaverinc
    Options

    i tried that but it does not give me a chat id, what else can i do?

  • deaverinc
    Options

    lets start from the beginning. my first question was how long do i have to wait for the setup the title id on the server for authentication?


    i still am getting the error:


    /Client/GetPhotonAuthenticationToken: PhotonApplicationNotAssociatedWithTitle

    UnityEngine.Debug:LogError (object)


    i followed the tutorial to setup this. i login, my app is photon cloud, i am using realtime, i click on manage:


    it asks for a url, i entered:


    Authentication URL

    https://C03A0.playfabapi.com/photon/authenticate

    unchecked allow anonymous clients and clicked the create (i think button, it is not present anymore)


    it said to wait for a while so the information can propagate to all servers. it has been 24 hours.


    How long should i wait? what else should i do?

  • deaverinc
    Options

    to be sure i have logged in to playfab, clicked on my studio for elemental, clicked on add ons, clicked on photon multiplayer and chat, photon is installed, i entered the realtime app id, clicked on save settings since it never gave me a chat id i didnt enter it. what else is there? i am at a lose.

  • deaverinc
    Options

    public static void LoginSuccessStartAccountInfo(string playfabId)

      {

        string PlayFabId = playfabId;

         Database.UpdateDatabase();

        AccountInfo.GetAccountInfo();

        GetPhotonAuthenticationTokenRequest request = new GetPhotonAuthenticationTokenRequest()

        {

          PhotonApplicationId = PhotonNetwork.PhotonServerSettings.AppSettings.AppVersion


        };

        PlayFabClientAPI.GetPhotonAuthenticationToken(request, OnPhotonAuthSuccess, GameFunctions.PlayFabAPIFailure);

        Debug.Log("login successful " + request);

      }


    static void OnPhotonAuthSuccess(GetPhotonAuthenticationTokenResult result)

      {

        AuthenticationValues customAuth = new AuthenticationValues();

        customAuth.UserId = Instance.playFabId;

        customAuth.AuthType = CustomAuthenticationType.Custom;

        customAuth.AddAuthParameter("username", Instance.playFabId);

        customAuth.AddAuthParameter("Token", result.PhotonCustomAuthenticationToken);

        customAuth.Token = result.PhotonCustomAuthenticationToken;


        PhotonNetwork.AuthValues = customAuth;

        PhotonNetwork.ConnectUsingSettings();

      }


    i even removed the line:


    customAuth.Token = result.PhotonCustomAuthenticationToken;


    i am not trying to use any webhooks.

  • deaverinc
    Options

    not sure why my code doesnt work but i copy and pasted from the tutorial and now it works. i will leave it at that.

  • deaverinc
    Options

    actually that is not right, i am still getting the error. i dont know what else to do.

  • Tobias
    Options

    If you are still working on this error "GetPhotonAuthenticationToken: PhotonApplicationNotAssociatedWithTitle", I think you may want to ask the PlayFab team. This seems to be an issue on their side, really. Yes, it names Photon but they seem to issue the token.

    It seems to be an issue with the setup of your app.

  • JohnTube
    JohnTube ✭✭✭✭✭
    Answer ✓
    Options

    Hi @deaverinc,

    Please replace

       PhotonApplicationId = PhotonNetwork.PhotonServerSettings.AppSettings.AppVersion
    

    with

       PhotonApplicationId = PhotonNetwork.PhotonServerSettings.AppSettings.AppIdRealtime