Closed jorgebg closed 4 years ago
Thanks for the clear report and reproduction steps!
This is actually a symptom of another bug/error: in this case each client is rendering the Debug Panel (one on top of the other). That’s why player 1 is selected by default — because player 1’s debug panel is rendered second and appears on top. We actually need to fix this some other way by rendering one debug panel per master instead of per client (or potentially have some way of toggling between debug panel instances if there are several).
Thank you, the fix worked! I also activated the debug panel only in the first client, as you suggested, and then everything worked as expected. Thanks again!
Sumary
When running the game with a local master the moves triggered from the debug panel raise the following error:
Steps to reproduce:
Go to the local master docs and open the example in SandBox https://boardgame.io/documentation/#/multiplayer?id=local-master
In the
Client
, setdebug
totrue
and reload the app: https://codesandbox.io/s/boardgameio-dibw3?file=/src/index.js:551-556Open the developer console.
Select player 0 by clicking on it from the debug panel (otherwise it will raise
ERROR: player not active - playerID=[1]
as player 1 is selected by default, not sure why):clickCell
move from the debug panel, enter0
(or leave it empty), and pressenter
:I forked the example project following the steps to reproduce so you can take a look right away: https://codesandbox.io/s/boardgameio-forked-1yihh