react-socketio-tic-tac-toe icon indicating copy to clipboard operation
react-socketio-tic-tac-toe copied to clipboard

Joining Game does not work in Safari

Open patrickshox opened this issue 1 year ago • 1 comments

Description

I found in Chrome, the game works perfectly. However, in Safari, I wasn't able to start a match. When I tried to get two players to join the same room, whichever player joins a room second, continues to display "Waiting for other player to join to start the game". Interestingly, a third player is unable to join that room so it seems there are two players in the room but "start_game" isn't being received. In Chrome, there were no errors in the console. However, in Safari, I got the following warning:

Warning: Can't perform a React state update on an unmounted component. This is a no-op, but it indicates a memory leak in your application. To fix, cancel all subscriptions and asynchronous tasks in a useEffect cleanup function. JoinRoom@http://localhost:3000/static/js/main.chunk.js:769:89

Demonstration

issue-demo

To reproduce

Downloaded this repo as a zip; ran npm install nodemon in the server folder and nom install react-scripts in the client folder; ran npm start in each; opened two private Safari browsers (v. 15.6) and went to localhost:3000; and attempted to join the same room on each.

patrickshox avatar Aug 20 '22 10:08 patrickshox