question

James Cooper (SI) avatar image
James Cooper (SI) asked

PlayFab Party EndpointCreated and EndpointDestroyed immediately

Hi,

I'm trying to integrate PlayFab Party into our game but running into an issue.

When the second user joins the party and calls StartProcessingStateChanges(), I get the EndpointCreated for the other user already in the Party as expected. The problem is I also get an EndpointDestroyed state change on either the same or the next call.

The reason given on the EndpointDestroyed state change is: 'Disconnected' and the error given is: 3722304989 which PartyManager.GetErrorMessage() returns as "The error code is not valid or does not have an error message."

What could be causing this behaviour of joining the party and then immediately losing connection?

Thanks, James

apismultiplayer
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

·
Xiao Zha avatar image
Xiao Zha answered

May I know which version and platform of the Party SDK you are using? And could you please provide us with detailed reproduction steps and code snippets so that we can do better research? Also, you may try referring our official Party samples: https://learn.microsoft.com/en-us/gaming/playfab/features/multiplayer/networking/party-samples and test to see if the issue persists.

3 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.

James Cooper (SI) avatar image James Cooper (SI) commented ·

I'm currently using PlayFab Party version 1.8.9.

I've done some more digging. The first user is sending 2 messages to the first user, on the same StartProcessingStateChanges() call I get 2 EndpointMessageReceieved and 2 EndpointDestroyed messages. I tried switching it over so the second user sends the first message and in that case I get an EndpointDestroyed state change immediately after the EndpointMessageReceieved on the first user.

So it seems that currently whenever a user sends a message, the user that receives that message gets an EndpointDestroyed state change on the exact same StartProcessingStateChanges() call.

Is there anything I could be doing that's causing all of these messages to disconnect the user they're sent to?

0 Likes 0 ·
James Cooper (SI) avatar image James Cooper (SI) commented ·

I've tested on the sample and the issue doesn't occur so it must be something wrong with what my code is doing.

It seems consistent on my code that whenever I send a message, I get an EndpointDestroyed state change (with reason Disconnected). There doesn't seem to be any error codes for anything that I can find to explain this

0 Likes 0 ·
Xiao Zha avatar image Xiao Zha James Cooper (SI) commented ·

Since the issue does not appear in testing using the official Party sample, you could try to modify and test the code in your project by referring to the official sample code. You could also try upgrading your Party SDK to the latest version.

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.