Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Board api stream not returning gameState response when user resigns the game #60

Open
mcaap opened this issue Sep 24, 2020 · 4 comments
Labels
bug Something isn't working can't reproduce Needs steps to reproduce

Comments

@mcaap
Copy link

mcaap commented Sep 24, 2020

Continuation of discord...
When the other user resigns, there is no gameState response. Only gameFinish is received. Whereas the API documentation shows a final gameState with status and winner fields (which is what we need)
this: https://lichess.org/api#operation/boardGameStream
Looks like the final gameState response is indeed received for 'checkmate' scenarios. But no final gameState with winner/status is received when the lichess user resigns (on the web)

@ornicar
Copy link
Contributor

ornicar commented Sep 24, 2020

I just tried, and saw this:

{"type":"gameState","moves":"e2e4 e7e6 b1c3 d7d5 d2d3 c7c5 f1e2 f8e7 g1f3 g8f6 e4d5 e6d5 c1d2 b8c6 e1g1 e8g8 h2h3 c8f5 a2a3 d5d4 d1e1 d4c3 d2c3 f6d5","wtime":5460,"btime":6450,"winc":1000,"binc":1000,"wdraw":false,"bdraw":false,"status":"resign","winner":"black"}

it has "status":"resign","winner":"black"

@mcaap
Copy link
Author

mcaap commented Sep 24, 2020

Looks like a weird issue. If the lichess user resigns when it is the opponent's turn to play, I only get the gameFinish and dont get the gameState response. Opponent in this case is the user of the board API.
Example game: {"type":"gameFinish","game":{"id":"XU2wWbhi"}}

But if the lichess user resigns when its his turn, I get the gameFinish followed by the gameState response as expected!

@ornicar
Copy link
Contributor

ornicar commented Sep 24, 2020

I tried that too and still got the gameState event.

@mcaap
Copy link
Author

mcaap commented Sep 24, 2020

Strange, I will triple-check this. Thanks for your time.

@niklasf niklasf added bug Something isn't working can't reproduce Needs steps to reproduce labels Sep 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working can't reproduce Needs steps to reproduce
Projects
None yet
Development

No branches or pull requests

3 participants