empiricaly / empirica

Open source project to tackle the problem of long development cycles required to produce software to conduct multi-participant and real-time human experiments online.
https://empirica.ly/
Apache License 2.0
47 stars 8 forks source link

Clearing players does not work #418

Closed frasalvi closed 7 months ago

frasalvi commented 1 year ago

Is there an existing issue for this?

What happened?

The Clearing Players feature does not seem to work. When I try to clear players, even if there are open games with the same treatment conditions, they get stuck in an infinite loading screen.

I suspect that this has to do with the fact that the assignplayer function checks for player.get("gameID") to be undefined: https://github.com/empiricaly/empirica/blob/297d560424ab9a7ee8d53efabdfc09248e7ec271/lib/%40empirica/core/src/admin/classic/classic.ts#L74-L76 but the latter is not reset when pressing clear:https://github.com/empiricaly/empirica/blob/297d560424ab9a7ee8d53efabdfc09248e7ec271/lib/admin-ui/src/components/players/PlayerLine.svelte#L9-L16

I tried to debug this myself by manually setting gameID as undefined after the exit steps, and what happens is that players then get assigned to a new game, but they get stuck in a "Game loading - Please wait for the game to be ready." page. So, there must be something else that I am missing.

Steps To Reproduce

  1. Create a batch of more than 1 game with the default template, and "Solo" treatment
  2. Create a player and complete a game
  3. Clear the player from the Admin UI

Empirica Version

Version: v1.8.0
SHA:     297d560
Branch:  main
Time:    2023-09-16T08:00:40Z

What OS are you seeing the problem on?

Linux

What browser are you seeing the problem on?

Chrome

Relevant log output

No response

Anything else?

No response

Code of Conduct

npaton commented 7 months ago

Oh, there is an issue for that. Sorry, it fell off my radar. I will look into it.