question

amyashdk19 avatar image
amyashdk19 asked

PhotonApplicationNotFound,Photon application not associated with title?

I'm working on a game developed with Unity using Playfab and Photon. At that time, Playfab generated a photon app id and chat app id for the game.

(title: 890F, photon app id : 8ac0cca4-7166-4989-9b5a-c646286185e8)

The game was recently finished and versions uploaded to the play store. I began working on a second version of the same game. I created a new title id (now deleted) and followed the updated Playfab documentation to create my own, new photon app id. At first I just changed the title id and photon app id in a copy of my original game. Later I created a new unity project installing photon and playfab sdk and setting it up with the new photon app id created by me and the new playfab title id. I exported the original game and imported into the new unity project and changed the title id and photon app id where necessary. However, I began to get custom authentication errors and the app would log into Playfab but not photon. I decided to start again from scratch , deleted the project and deleted the new title. However when I opened the original game project(title : 890F) the game logged into playfab but disconnected from photon, with the console showing: PhotonApplicationNotFound. This is happening to all versions of the original game including the one on the playstore. It is only logging into Playfab and unable to log into Photon, though this version uses the Playfab generated photon app id. Please help.

public string playfabTitleID = "890F";
        public string playfabID;
        public string applicationId = "8ac0cca4-7166-4989-9b5a-c646286185e8";
public string _gameVersion = "1";


 void Start()
        {


            PlayFabSettings.TitleId = "890F";
        }

//**called from different script if not connected to photon

 public IEnumerator LoginToPlayfab()
        {
           
            yield return new WaitForSeconds(3);
            if (Application.platform == RuntimePlatform.Android)
            {
                print("Android");
                LoginWithAndroidDeviceIDRequest req = new LoginWithAndroidDeviceIDRequest();


                req.AndroidDeviceId = SystemInfo.deviceUniqueIdentifier;
                req.AndroidDevice = SystemInfo.deviceModel;
                req.TitleId = PlayFabSettings.TitleId;
                req.CreateAccount = true;


                PlayFabClientAPI.LoginWithAndroidDeviceID(req, PlayfabLoginSuccess, OnPlayFabError);
            }
            else if (Application.platform == RuntimePlatform.IPhonePlayer)
            {
                
                string playerIosUniqueId = GetUniqueIdentifier();
                LoginWithCustomIDRequest req = new LoginWithCustomIDRequest();
                req.CreateAccount = true;
                req.CustomId = playerIosUniqueId;
                req.TitleId = PlayFabSettings.TitleId;
                PlayFabClientAPI.LoginWithCustomID(req, PlayfabLoginSuccess, OnPlayFabError);


            }
            else
            {

                //**CURRENTLY ONLY TESTED WITH THIS
               // print("unityEditor");
                LoginWithEmailAddressRequest r = new LoginWithEmailAddressRequest();
                r.Email = "something@something.com";
                r.Password = "something";
                r.TitleId = PlayFabSettings.TitleId;




                PlayFabClientAPI.LoginWithEmailAddress(r, PlayfabLoginSuccess, OnPlayFabError);


            }


        }


        public static string GetUniqueIdentifier()
        {
            //some code
        }


        void PlayfabLoginSuccess(LoginResult res)
        {


            message.text = "logged into playfab requesting photon token";
            Main.Instance.playfabID = res.PlayFabId;
            GetPhotonAuthenticationTokenRequest phReq = new GetPhotonAuthenticationTokenRequest();
            phReq.PhotonApplicationId = "8ac0cca4-7166-4989-9b5a-c646286185e8"; //Main.Instance.applicationId;
            PlayFabClientAPI.GetPhotonAuthenticationToken(phReq, PhotonAuthenticcationSuccess, OnPlayFabAuthError);
           
        }


        void PhotonAuthenticcationSuccess(GetPhotonAuthenticationTokenResult res)
        {


            message.text = "sucess getting authen";
            AuthenticationValues customAuth = new AuthenticationValues();
            customAuth.AuthType = CustomAuthenticationType.Custom;
            customAuth.AddAuthParameter("username", Main.Instance.playfabID);    // expected by PlayFab custom auth service
            customAuth.AddAuthParameter("token", res.PhotonCustomAuthenticationToken);   // expected by PlayFab custom auth service




            PhotonNetwork.AuthValues = customAuth;
            Connect();
        }

 public void Connect()
        {


            PhotonNetwork.ConnectUsingSettings(_gameVersion);
        }

,

Working on a Unity app using playfab and photon. Playfab generated photon app id and chat app id but now all versions of the game( including version on the playstore ) have stopped working. They log into Playfab but disconnect from photon. Error message : Photon application not associated with title.

Title is 890F and photon app id( generated by payfab ) is 8ac0cca4-7166-4989-9b5a-c646286185e8

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
brendan avatar image
brendan answered

Reviewing our logs, someone in your team re-used that Photon Realtime App ID in a title which was deleted at just past 0300 UTC today. In doing so, they deleted that Realtime App ID from Photon entirely. Unfortunately, it is not possible for us to "inject" a specific App ID into the Photon system, as we do not own or support that service. What you would need to do at this point is to either ask the Photon team to re-create that App ID (and then let us know and we can manually re-attach it to the title), or else create a new App ID in the Exit Games site, and update the title to use that.

1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

amyashdk19 avatar image amyashdk19 commented ·

Thank you so much Brendan you are a life saver. :) Created a new app id and its all working now.

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.