Closed MarkZH closed 1 year ago
Thanks for the report. My problem here is that I can't reproduce it. bot1 sends a challenge to bot2, then bot1 cancels the challenge. When bot2 hits /api/challenge/4PNDH8Lp/accept
it gets 400 "error": "The challenge has been canceled."
and the game doesn't start.
I think I got it, and next deploy should fix it.
I was writing this when you made the commit, maybe this will be useful just in case there are any other issues.
Do the lichess logs show anything out of the ordinary for the game IDs listed above? It seems strange that 10 or 20 minutes could pass between a challenge and a game since the challenge should expire after 20 seconds for realtime games.
Now that I look at the logs, this only happened when the user's bot geit2023 challenged the bot Zagreus_Engine. IDs:
re4ELMrx
- 13 minute delayz9b50qTa
- 20 minute delayVZsnUR71
- 40 minute delayNcjU7kQZ
- 40 minute delaychallenges switch to offline after 20s but they can still become online again, or be accepted.
The problem was that offline challenges could not be canceled properly.
In an issue reported to lichess-bot, it was discovered that a challenge that was cancelled could still result in a game.
Here's a timeline of events from the user's log for challenge/game ID
re4ELMrx
.Challenge created:
Challenge cancelled after 28 seconds with no response:
Then, 13 minutes later, apparently the challenge is accepted and the game starts.
The same thing happens with challenge/game ID
z9b50qTa
, in which the game starts 20 minutes after the challenge is cancelled.Link to full log from user