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
43 stars 8 forks source link

Server chat message don't appear #561

Closed npaton closed 3 weeks ago

npaton commented 1 month ago

Is there an existing issue for this?

What happened?

Server chat message don't appear on the client without a page refresh, while client message appear.

Steps To Reproduce

  1. I'm using the Chat component from https://gist.github.com/npaton/489daf6c3c5fa1f40ffd997af80b023a
  2. I render the Chat component in Game.jsx and give the game from useGame() as scope; by default, messages are stored in game.get("chat")
  3. On the server, I have a process adding messages to the chat log periodically (via a setInterval that starts on game creation, and does game.append("chat", {chat content})

Empirica Version

Latest

What OS are you seeing the problem on?

No response

What browser are you seeing the problem on?

No response

Relevant log output

No response

Anything else?

No response

Code of Conduct

npaton commented 1 month ago

Was apparently solved by adding Empirica.flush() on the server. Reopen if further issues with this.