lichess-org / lila

♞ lichess.org: the forever free, adless and open source chess server ♞
https://lichess.org
GNU Affero General Public License v3.0
15.08k stars 2.23k forks source link

challenges from anonymous players don’t work anymore #10772

Closed ghost closed 2 years ago

ghost commented 2 years ago

(referring to #10707)

It was working fine for a while, but now it seems the user creating the challenge will be put into the spectator room and be unable to play.

ornicar commented 2 years ago

I just tried and it worked.

ghost commented 2 years ago

It doesn’t seem to be working for me and a friend of mine also had trouble with it.

What kinds of information could I provide to help figure out what the issue might be for me?

I tried with both Ungoogled Chromium 97 and GNU IceCat 91. I have extensions installed in neither of them, and tried it by simply opening an incognito window and creating a challenge to a user that has the setting set appropriately.

I have cookies enabled, as well as functional localStorage, and Lichess seems to have set those appropriately, but I still get put in the spectator room when the challenge is accepted.

The same set of steps worked fine in the development environment I set up for creating that pull request.

ghost commented 2 years ago

Some potentially relevant information:

The only cookie set on the incognito window is lila2 to [random‐looking hex]-sid=[random‐looking string], whereas on my standard browser window, the lila2 cookie includes sid=[random‐looking string] and also sessionId=[random‐looking string].

ornicar commented 2 years ago

I tried again in a chrome incognito window and it worked as expected.

The bug report templates mentions the information to provide: https://github.com/lichess-org/lila/issues/new?assignees=&labels=bug&template=bug.md&title=. "Steps to reproduce" is the most important

ghost commented 2 years ago

There isn’t much more than what I said, I think. The specific steps I followed were:

1) Open an incognito window in Chromium or IceCat. 2) Browse to https://lichess.org. 3) Find a player with the appropriate setting set to “Always”. (In my case, my bot Dummyette.) 4) Click the “challenge” icon on their profile to open the corresponding dialogue window. 5) Choose a color (in my case “white”) to create the challenge. 6) Wait for the player to accept the challenge. 7) Notice you are a spectator and are thus unable to play.

Note that the same thing seems to happen even in a non‐incognito window when I’m logged out.

I have also recorded a video to show exactly what I did, so that it is hopefully clearer: https://zamfofex.neocities.org/bug.webm

ghost commented 2 years ago

Is there any more information I should provide? I suspect the issue is that the challenge is accepted too quickly, before the challenge page has the opportunity to show up. I’d be interested in investigating more and fixing it. Is there anything I could do to get this issue recognized and reopened?

ornicar commented 2 years ago

I could reproduce it now, by throttling my network to simulate a slow connection. Will work on a fix.