NEW_REQUEST_WITH_A_DUPLICATE_PLAYER

Hello there

Sometimes my matchmaking ticket is cancelled due to “NEW_REQUEST_WITH_A_DUPLICATE_PLAYER” error.
This code below, is in Lambda

from future import print_function
import boto3

client = boto3.client( “gamelift” )

def handler( event, context ):
# PlayerId is only for debug.
playerId = event[ “PlayerId” ]
matchmakingTicketId = event[ “MatchmakingTicketId” ]

response = { "TicketStatus" : "NotSet", "IpAddress" : "NotYet", "Port" : 0, "PlayerId" : "NotYet", "PlayerSessionId" : "NotYet" }

if not matchmakingTicketId :
    return response

match_response = client.describe_matchmaking( TicketIds = [ matchmakingTicketId ] )
print( "=====> match_response : ", match_response )

PlayerId is one of parameters for start_matchmaking() in Lambda.

After I get the “NEW_REQUEST_WITH_A_DUPLICATE_PLAYER” error, I always get the same error every time. After creating a new account for the PlayerId, the error disappears because the PlayerId is different but I tested the matchmaking alone with one game client and I submitted my matchmaking one at a time but I don’t remember whether stop_matchmaking() is called or not before closing my client.

This error message below, is result of “client.describe_matchmaking” function in Lambda.

What is a problem?

Any help is appreciated.

Matchmaking tickets will be cancelled if they reference player ids that are referenced in new active matchmaking tickets.

"A player (identified by their player ID) can only be included in one active matchmaking request at a time. When you create a new request for a player, any active matchmaking tickets with the same player ID are automatically canceled. "

https://docs.amazonaws.cn/en_us/gamelift/latest/developerguide/match-client.html