Errors on ticket creation
Ticket creation may fail for a number of reasons. In most of these cases, the PlayFab error code identifies something invalid about the submission request. Correcting this allows you to submit successfully.The errors
MatchmakingAttributeInvalid and MatchmakingPlayerAttributesInvalid indicate an issue with the formatting of attributes. For more information, see the section on Specifying Ticket Attributes for the details on how to pass attributes in a ticket.MatchmakingRateLimitExceeded- This indicates you have been submitting tickets too frequently. For more information, see the section below for more details.MatchmakingTicketMembershipLimitExceeded- This indicates the user is already in another active ticket. Users are restricted from being in more than one ticket within a queue at a time, as they can’t play two games at once. For more information, see the more detailed section below on correcting this situation.
Call returns MatchmakingRateLimitExceeded
Similar to other PlayFab features, PlayFab matchmaking restricts the number of calls you make, according to the limits configured inside the game manager. Receiving theMatchmakingRateLimitExceeded error indicates the title has exceeded the limit for this call type.
In matchmaking, this most frequently occurs when polling GetMatchmakingTicket to see if a ticket has matched.
To avoid this error either increase your limit, or reduce your call frequency.
Although the response has an HTTP status code of 429, the request itself is valid and can still be retried.
Creating or joining a ticket returns MatchmakingTicketMembershipLimitExceeded
In PlayFab matchmaking, a user can only be in one ticket at a time per queue to avoid a case where a user enters two matches and must decide which ticket to honor. Whichever match isn’t honored, it will be short a player, and its players will likely be forced to re-enter matchmaking. The errorMatchmakingTicketMembershipLimitExceeded is returned if a user is already in one ticket that isn’t canceled or matched, but tries to create or join another.
However, sometimes a title or server may lose track of a ticket, either by crashing, restarting, or other unforeseen errors. When this occurs, it leaves an active ticket that neither the user nor title is aware of.
This lost ticket prevents any future tickets from being submitted for this user until it expires. If this happens, there are two options available to resolve the issue:
Option 1: Clear the ticket from matchmaking
Cancel all of a user’s existing tickets. Calling CancelAllMatchmakingTicketsForPlayer performs this task. Afterwards matchmaking has no tickets in progress, and be ready for a new ticket to be created.Option 2: Find the lost ticket
Find the user’s existing ticket and continue using it. Calling ListMatchmakingTicketsForPlayer returns all the matchmaking ticket IDs the user is a member of. Calling GetMatchmakingTicket on each ticketId provided allows you to retrieve its state and continue monitoring it until it finds a match.Not all players join a multi-user ticket
When creating a multi-user ticket, one of the invited players may fail or refuse to join. In a case like this, the created ticket remains in the WaitingForPlayers status until it expires. Titles should expect this situation to happen from time to time, and set a fairly short timeout within the UI. After that timeout, the title should cancel the ticket and check that all players have still agreed to play a game together.GetMatch returns not found
Once a match is created, the match lives for a period of time and eventually age out. If the match isn’t retrieved in time, those users need to resubmit tickets to get matched again. This can be avoided by ensuring matches are retrieved in a timely manner (that is, within a few minutes). If you’re using Matchmaking and Lobby together as described here, it’s possible that the lobbyArrangementString is valid for a period of time after the match times out here. Make sure you retrieve and use the info from GetMatch before it expires.The ticket is canceled
Tickets may be canceled for multiple reasons. The most common cases are user cancellations and tickets expiring, but the ticket can also be canceled by the server. If you callGetMatchmakingTicket, and discover your ticket is canceled, the reason is listed in the CancellationReason field. The possible CancellationReason responses, along with potential resolutions, are listed below.
Cancelling a ticket returns an error
Cancelling a ticket isn’t guaranteed to succeed. While most errors are self-explanatory, the errorMatchmakingTicketAlreadyCompleted indicates one of two possibilities:
- The ticket was already canceled.
- The ticket was already matched.
