PlayFab / PlayFabPartyUnity

38 stars 7 forks source link

Playfab Party unity "failed to establish or maintain a connection to a network or remote peer" #31

Closed MonierHossam closed 1 year ago

MonierHossam commented 1 year ago

Hi, I implemented Playfab and Party sdk and followed the instructions I enabled party in the playfab dashboard, I allowed unsafe code but when I run the demo, the login is successful but when I try to create or join network it fails and shows these errors "failed to establish or maintain a connection to a network or remote peer" + " PARTY_STATE_CHANGE_RESULT_INTERNET_CONNECTIVITY_ERROR" I checked the internet connection its fine and when I googled the issue, I can't find any solution out there would appreciate the help

Unity version 2021.3.4f1 Playfab sdk version 2.153.221024 Playfab party version .1.7.6.0-main.0-09.27.2022

nassosterz-ms commented 1 year ago

Hello,

We are sorry you are facing this. Could you share here the entire log generated from Unity?

MonierHossam commented 1 year ago

Thank you for your response, so I tried also to change party sdk version and tried to downgrade unity version too but did not work, I have attached the log file below. Player.log

nassosterz-ms commented 1 year ago

The error hints that there is no internet connection but I understand that you already tried that. One more question, from your Unity logs I cant find any calls to PartyInitialize, are you sure you are calling that?

MonierHossam commented 1 year ago

I tested the internet connection multiple times it has nothing to do with the internet connection and I'm using the demo without any changes, but I rechecked the example code now and yes it does initialize PlayfabMultiplayerManager, is there is another initialization that should be there beside the PlayfabMultiplayerManager initialization?

nassosterz-ms commented 1 year ago

Nope that is the only initialization. Are you using a valid PF title ID?

MonierHossam commented 1 year ago

Yes, I have a valid PF title with party enabled, and as you can see in the logs the login works fine and I also can see the API calls in the dashboard, I literally did nothing but running the demo after completing the setup instructions (allowing unsafe code, and using IL2CPP support, and logging in the playfab extension, setting my title) that's why it's frustrating because im just trying to run the demo

nassosterz-ms commented 1 year ago

Could you use fiddler to capture a trace of the create and join network call? It will give us more information about the root of this issue.

MonierHossam commented 1 year ago

Okay will do so and get back to you

MonierHossam commented 1 year ago

So, I used Fiddler as you said, and I have attached file containing the session of me trying out the demo, I believe some of the requests attached contains some secret keys, but I will change it later no problem just trying to understand the issue for now 2022-11-08.zip

MonierHossam commented 1 year ago

I just checked the Playfab party dashboard it shows that there is 19 created parties and its shows them all with "Internet connectivity error"

nassosterz-ms commented 1 year ago

Can i ask which demo are you running? The fiddler traces do not have any call to CreateAndJoinNetwork

MonierHossam commented 1 year ago

The one from the latest unity party sdk

MonierHossam commented 1 year ago

Playfab party version .1.7.6.0-main.0-09.27.2022 in unity project in assets/PlayFabPartySDK/Examples/Demo

MonierHossam commented 1 year ago

I just checked the Playfab party dashboard it shows that there is 19 created parties and its shows them all with "Internet connectivity error"

it also shows for yesterday requests 8 crated parties with "Network no longer exists" error

nassosterz-ms commented 1 year ago

Hm I just ran the demo successfully and took a Fiddler trace and compared it with yours. One thing I am seeing differently is that I am making an API call to GetCognitiveServicesToken which it doesnt happen in your case. I am unsure how this can impact things since I am using a test profile that has cognitive services enabled.

This demo works (as I just verified) but it is kinda outdated. How about you follow the instructions here: https://learn.microsoft.com/en-us/gaming/playfab/features/multiplayer/networking/party-unity-plugin-quickstart

MonierHossam commented 1 year ago

I just refollowed the instructions in the link you sent and wrote the example code myself from there, which does not refer to any "Cognitive services" neither does the demo code in the sdk, and I checked the dashboard I'm not sure there is reference to it there either, I googled for it, and I found only this https://learn.microsoft.com/en-us/gaming/playfab/features/multiplayer/networking/party-unreal-engine-oss-cognitive-services-interface so, if you could please refer me to how to implement API call to GetCognitiveServicesToken you mentioned to be able to get the demo working so I can start on with using party

nassosterz-ms commented 1 year ago

There is one more thing that would be helpful for us. Please follow the instructions here: https://github.com/PlayFab/PlayFabParty/tree/master/TraceScripts

You can then send us the resulting files in a zipped folder. If you dont want to upload it here, you can email it at aterzakis@microsoft.com

If you have any questions, please let us know

nassosterz-ms commented 1 year ago

Hello again,

Redirecting our communication here. We have been investigating on our side but havent found something so far, as this like an unique situation. Has there been any progress from your side?

nassosterz-ms commented 1 year ago

We are closing this issue for now due to inactivity, please let us know if there is any update.