hugosaintemarie / magic-maze

Online version of board game "Magic Maze"
https://magicmaze.herokuapp.com
MIT License
20 stars 11 forks source link

New tiles do not get added in other windows #26

Closed rcjsuen closed 3 years ago

rcjsuen commented 3 years ago

I tried testing the Heroku page in Firefox and a separate incognito Firefox window. When I explore and add a tile to one window, the other window does not updated with the tile.

image

hugosaintemarie commented 3 years ago

Thank you for the report @rcjsuen. That's weird, this used to work 😕 I'll have a look!

rcjsuen commented 3 years ago

Thank you for the report @rcjsuen. That's weird, this used to work 😕 I'll have a look!

Cool. Hope the fix won't be too hard if it used to work.

rcjsuen commented 3 years ago

@ashugeo Where in the code should I be looking if I want to try and help fix this?

hugosaintemarie commented 3 years ago

@rcjsuen Well the console is full of errors 😱

[moveToEnd] Could not find element hero-0 [moveToEnd] Could not find element hero-1 [moveToEnd] Could not find element hero-2 [moveToEnd] Could not find element hero-3 [setAttribute] Could not find element with id tile-4 transform [addClass] Could not find element with id tile-4 invalid [removeClass] Could not find element with id tile-4 valid [removeClass] Could not find element with id tile-4 valid invalid

These can be reproduced by running npm start locally at the root of the project. Solving these would be a good place to start, I don't have the time to do so as of now unfortunately 😕

Edit: actually, you should rather run npm run watch to start the server and npm run dev alongside to watch and compile source files while you edit them.

rcjsuen commented 3 years ago

@rcjsuen Well the console is full of errors 😱

@ashugeo Yeah, I saw those...but assumed they were normal since there were so many of them. :P

rcjsuen commented 3 years ago

From what I can tell, it looks like the <g id="tiles"> DOM element is not getting new tiles appended to it.

rcjsuen commented 3 years ago

@ashugeo I've opened #27 to address this issue. Please take a look, thanks!

rcjsuen commented 3 years ago

@ashugeo Have you pushed the fix live to Heroku?

hugosaintemarie commented 3 years ago

@rcjsuen I did. We're getting 400 errors from socket.io and I'm not sure how to tackle this…

rcjsuen commented 3 years ago

@rcjsuen I did. We're getting 400 errors from socket.io and I'm not sure how to tackle this…

You're right, I see it in the browser's console now. :(