question

ericview avatar image
ericview asked

PlayFab Authentication to Photon Error

Hi, I have been following several examples to connect to Photon, and I'm stuck here. I am able to generate my LogInWithCustomerId, and I am using Photon Realtime with a PlayFab generated GameID. I do have PUN+ with 100 CCU activated in my Unity Scene. Here is the error I am getting:

Custom Authentication failed (either due to user-input or configuration or AuthParameter string format). Calling: OnCustomAuthenticationFailed()
Operation failed: OperationResponse 230: ReturnCode: 32755 (Failed to parse token from request). Parameters: {} Server: NameServer
UnityEngine.Debug:LogError(Object)

Does anything look wrong here, that would cause this error? Please excuse C# learning curve.

 private string playfabId = string.Empty; 
 private string LoginResult = string.Empty;

// callback on successful LoginToPlayFab request
    void OnLoginSuccess(LoginResult result)
    {
// StartCoroutine(GetUserStats());
   this.playfabId = result.PlayFabId;
      
 GetPhotonAuthenticationTokenRequest request = new GetPhotonAuthenticationTokenRequest();

//request.PhotonApplicationId = photonComponent.AppId.Trim();//errors out

	request.PhotonApplicationId = PhotonAppId.Trim();

// get an authentication ticket to pass on to Photon

  PlayFabClientAPI.GetPhotonAuthenticationToken(request, OnPhotonAuthenticationSuccess, OnPlayFabError);

     
 
    }

Thanks,

Eric

Authentication
10 |1200

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

brendan avatar image
brendan answered

There's a fundamental issue here - PUN+ is completely distinct from the Photon Realtime/Chat offering which is integrated with PlayFab. The Photon integration for authentication (GetPhotonAuthenticationToken) and webhooks is dependent upon the title using the App IDs from the Photon add-ons page in the PlayFab Game Manager.

2 comments
10 |1200

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

ericview avatar image ericview commented ·

Hi, I am using the Realtime AppID from the Photon add-ons page in the PlayFab Game Manager. I am using the sample Demo Files for Photon, and when I try to launch and play any Photon-enabled game, the authentication is not being recognized. Is there a specific Photon Demo that I should use that is specific to PlayFab/Photon integration?

Thanks,

Eric

0 Likes 0 ·
brendan avatar image brendan ericview commented ·

Yes, we have an old example that showed using Photon Turnbased, here: https://github.com/PlayFab/Photon-Cloud-Integration. Photon Turnbased merged into Photon Realtime, so that would be the example to start with.

My question would be, what specific API call is failing, and what are the details of the error response you're getting back?

0 Likes 0 ·
ericview avatar image
ericview answered

Hi, I am making some progress, stuck on compiler. I started a new project, launched the Photon-Cloud-Integration Script to validate in Unity 5.5.2f1 on Windows. When trying to Build and Run, I get an error;

Unable to load mono library from" ..opexturnbased_build_root_Data/Mono/mono.dll" (error = 126).

The scene will launch, authenticate, and play from the Editor, but not when trying to build and test from two .exe instances.

Any reason why this demo would not compile in 5.5.2?

Thanks...

4 comments
10 |1200

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

ericview avatar image ericview commented ·

In addition to the mono.dll error, the console reads...

Managed\UnityEngine.PlaymodeTestsRunner.dll does not exist

0 Likes 0 ·
brendan avatar image brendan ericview commented ·

Unfortunately, the issue you're running into is specific to the Photon Cloud service code, so we're not really able to help debug this. I would recommend posting your issue to the Photon forums, here: http://forum.photonengine.com/

0 Likes 0 ·
ericview avatar image ericview brendan commented ·

Hi, thanks for the reply. @Hamza Lazaar would you have any insight to this Compile error? I started a thread on the Photon site...

Missing DDLs compiling Unity 5.5 with Playfab

0 Likes 0 ·
Show more comments

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.