-
Notifications
You must be signed in to change notification settings - Fork 704
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
Debug Log fails after phase change #923
Comments
I was able to recreate this bug using the React client instead. I got the same error as @lkingsford mentioned above, including how the game went on fine until I clicked the log. I don't know what this change breaks, but the following edit did fix the bug you encountered. File and line mentioned in the exception:
I'm using bgio 43.3 and found the file at I haven't looked into the other problems this was causing in your game, but hopefully this helps :) @lkingsford and great job on your game!!! |
Thanks for the super detailed report @lkingsford! Sorry it took a while to get to it. As @Dissolutio guessed, this line was not accounting for all values of
Specifically, for that phase ending, A further problem is that the actual |
Expected behavior
When a game move goes to the next phase, and another move is made, the debug game log shows the actions taken.
Current behaviour
After a phase change, going to the log fails to show the moves made, and the JS application becomes unresponsive.
Reproduction:
Run the following app with Debug
(I used Webpack dev server)
app.js
index.html
The following exception is logged in the debug console:
Additional Notes
I observed this initially not in the bug but in recreating the historic state from the log. I discussed it on March 7 at 17:34 (UTC+11) on the boardgame.io gitter.im instance. I also observed that it seems to be coming from a disallowed move - which the trace started with:
In that reducer,
conf.moves
was undefined (hence returningnull
, hence disallowed) and state.ctx.phase was null.I also note that the phase shift continues to let you play the game either server/client or hotseat - it only seems to effect recreating the state in certain circumstances (such as the debug log)
This is presently effecting the Emu Bay Railway Company online client - most significantly with the new branch letting you step through the game (which is, I think, crashing for this same reason).
The text was updated successfully, but these errors were encountered: