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

/api/games/user/{username} crashes #15885

Closed
Torom opened this issue Aug 12, 2024 · 12 comments · Fixed by #15901 or #15916
Closed

/api/games/user/{username} crashes #15885

Torom opened this issue Aug 12, 2024 · 12 comments · Fixed by #15901 or #15916
Labels

Comments

@Torom
Copy link

Torom commented Aug 12, 2024

Exact URL of where the bug happened

https://lichess.org/api/games/user/ToromBot?since=1711729864000&sort=dateAsc&rated=true&perfType=rapid

Steps to reproduce the bug

curl "https://lichess.org/api/games/user/ToromBot?since=1711729864000&sort=dateAsc&rated=true&perfType=rapid"

What did you expect to happen?

Export of the requested games.

What happened instead?

curl: (92) HTTP/2 stream 1 was not closed cleanly: INTERNAL_ERROR (err 2)

Operating system

Linux

Browser and version (or alternate access method)

curl

Additional information

Maybe this has already been fixed with #15867. But since it looks different from it, I have opened a new issue.
Still present after deploying #15867.
Still present after deploying #15901.

@Torom Torom added the bug label Aug 12, 2024
@TBestLittleHelper
Copy link
Contributor

Probably related too : lichess-org/api#366

@Torom
Copy link
Author

Torom commented Aug 12, 2024

I think lichess-org/api#366 is identical with #15866 and should be fixed by #15867 at the next deploy.

@Torom
Copy link
Author

Torom commented Aug 13, 2024

I can confirm that after the last deploy this request still crashes and is not fixed.

@lenguyenthanh
Copy link
Member

I can confirm that after the last deploy this request still crashes and is not fixed.

thanks for your feedback, does lichess-org/api#366 still happen?

@Torom
Copy link
Author

Torom commented Aug 13, 2024

thanks for your feedback, does lichess-org/api#366 still happen?

Filtering by rated and by perfType seems to work now, but the sort parameter is ignored.
For example: https://lichess.org/api/games/user/ToromBot?since=1723529523000&sort=dateAsc&rated=true&perfType=bullet returns the same as curl "https://lichess.org/api/games/user/ToromBot?since=1723529523000&sort=dateDesc&rated=true&perfType=bullet".

Newer games always come first.

@lenguyenthanh
Copy link
Member

thanks, I'll take a look later today after $work, if no one is faster!

@eikob
Copy link

eikob commented Aug 14, 2024

The /api/games/ endpoint seems to be completely dead at the moment.

@matthew-piziak
Copy link

Working for me for now, at least with query https://lichess.org/api/games/user/Deltaway?rated=true&since=1709269200000&sort=dateAsc.

@Torom
Copy link
Author

Torom commented Aug 14, 2024

Indeed, it seems that the sort parameter is respected if you do NOT add the perfType parameter.
As soon as you try to use both, the sort parameter is ignored.

curl "https://lichess.org/api/games/user/ToromBot?rated=true&since=1723666109000&sort=dateDesc"

[Event "Rated bullet game"]
[Site "https://lichess.org/pyv6VrT0"]
[UTCDate "2024.08.14"]
[UTCTime "20:31:42"]

[Event "Rated bullet game"]
[Site "https://lichess.org/BAPQ44g8"]
[UTCDate "2024.08.14"]
[UTCTime "20:28:29"]

[Event "Rated rapid game"]
[Site "https://lichess.org/OzJL6TpG"]
[UTCDate "2024.08.14"]
[UTCTime "20:11:07"]

[Event "Rated bullet game"]
[Site "https://lichess.org/lBQGSqKl"]
[UTCDate "2024.08.14"]
[UTCTime "20:08:29"]

curl "https://lichess.org/api/games/user/ToromBot?rated=true&since=1723666109000&sort=dateAsc"

[Event "Rated bullet game"]
[Site "https://lichess.org/lBQGSqKl"]
[UTCDate "2024.08.14"]
[UTCTime "20:08:29"]

[Event "Rated rapid game"]
[Site "https://lichess.org/OzJL6TpG"]
[UTCDate "2024.08.14"]
[UTCTime "20:11:07"]

[Event "Rated bullet game"]
[Site "https://lichess.org/BAPQ44g8"]
[UTCDate "2024.08.14"]
[UTCTime "20:28:29"]

[Event "Rated bullet game"]
[Site "https://lichess.org/pyv6VrT0"]
[UTCDate "2024.08.14"]
[UTCTime "20:31:42"]

curl "https://lichess.org/api/games/user/ToromBot?rated=true&since=1723666109000&sort=dateDesc&perfType=bullet"

[Event "Rated bullet game"]
[Site "https://lichess.org/pyv6VrT0"]
[UTCDate "2024.08.14"]
[UTCTime "20:31:42"]

[Event "Rated bullet game"]
[Site "https://lichess.org/BAPQ44g8"]
[UTCDate "2024.08.14"]
[UTCTime "20:28:29"]

[Event "Rated bullet game"]
[Site "https://lichess.org/lBQGSqKl"]
[UTCDate "2024.08.14"]
[UTCTime "20:08:29"]

curl "https://lichess.org/api/games/user/ToromBot?rated=true&since=1723666109000&sort=dateAsc&perfType=bullet"

[Event "Rated bullet game"]
[Site "https://lichess.org/pyv6VrT0"]
[UTCDate "2024.08.14"]
[UTCTime "20:31:42"]

[Event "Rated bullet game"]
[Site "https://lichess.org/BAPQ44g8"]
[UTCDate "2024.08.14"]
[UTCTime "20:28:29"]

[Event "Rated bullet game"]
[Site "https://lichess.org/lBQGSqKl"]
[UTCDate "2024.08.14"]
[UTCTime "20:08:29"]

@matthew-piziak
Copy link

matthew-piziak commented Aug 15, 2024

perfKey isn't indexed in the primary store, so a query that includes it triggers a query against ElasticSearch, and in the construction of that query I don't see where the sort parameter is passed along. I might be reading it wrong.

@Torom
Copy link
Author

Torom commented Aug 18, 2024

After deploying #15901, the stream still crashes in the same way.

$ curl "https://lichess.org/api/games/user/ToromBot?since=1711729864000&sort=dateAsc&rated=true&perfType=rapid"
curl: (92) HTTP/2 stream 1 was not closed cleanly: INTERNAL_ERROR (err 2)

I don't seem to be permitted to reopen the issue.

@ornicar ornicar reopened this Aug 18, 2024
@ornicar
Copy link
Collaborator

ornicar commented Aug 18, 2024

simpler reproduction

curl "https://lichess.org/api/games/user/thibault?perfType=bullet"

curl: (92) HTTP/2 stream 1 was not closed cleanly: INTERNAL_ERROR (err 2)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
6 participants