ThePandemoniumInstitute / botc-release

The Official Blood on the Clocktower App
https://botc.app
35 stars 2 forks source link

TypeError on joining from different browser #133

Closed TrulyTHRiO closed 8 months ago

TrulyTHRiO commented 9 months ago

Bug description: When joining a game you have a seat in from a different browser, a TypeError is thrown.

Steps to reproduce: Log in to online.bloodontheclocktower.com on 2 different browsers (or 1 browser twice using an incognito window). Join a lobby and take a seat from 1 instance of BOTC online. Attempt to join the lobby from the other instance.

Result: You are removed from the game as expected, but the game fails to join on the other instance. TypeError Cannot destructure property 'role' of 'e.players[o]' as it is undefined.

Expected behaviour: The game allows you to join from the second instance, removing you from the first. (This happens when the local storage item "players" is present.)

Cause: The problem seems to be exclusively as a result of the missing "players" item in local storage as manually setting that item allows the second instance to join without any issue.

Screenshot: TypeError

Operating System: Windows 11 Version 22H2

Tested with the use of a few browsers: Browser: Vivaldi Browser Version: 6.6.3271.45 (Stable channel) (64-bit) Browser: Microsoft Edge Version: 122.0.2365.66 (Official build) (64-bit) Browser: Google Chrome Version: 122.0.6261.95 (Official Build) (64-bit)

bra1n commented 8 months ago

Thanks for the amazing bug report, this will be fixed with 3.22.1!