PurpleKingdomGames/virtual-gloomhaven-board

Players movements reset when other players move board tokens

chrisrudy opened this issue ยท 25 comments

Affected Scenario(s): 108

Describe the bug
There are three players playing remotely. One of the players (not myself) was in a state where, whenever the first or second player move their token, the third players token resets to the original position.

It should be noted that neither the first or second (the non-impacted players) can see the movement of the third player at all.

To Reproduce
Steps to reproduce the behavior:

  1. Have three players playing remotely
  2. Add three character tokens to the board
  3. Player 3 clicks on a character token and moves it to another space
  4. Character only moves visibly for one player

Browser : Chrome

That's going to be a fun one to test ๐Ÿ˜„

It sounds like the third player had lost connection somehow and it hadn't been re-restablished properly. I'll give it a go and see if I can figure out what might have gone wrong. Out of curiosity were you all using Chrome? Did the third player try refreshing the app, and did that help at all?

I ran into this as well, in a 2 player game. One player would move tokens and they wouldn't change on the other player's screen. When the other player moved tokens it reset the first player's tokens and showed those new changes on boths screens. So in effect only one player could change the board and have it sync correctly.

If it matters, the player whose sync was working joined the game/site first. Refreshing the browsers (Chrome) didn't fix it.

Odd - I can't seem to replicate it ๐Ÿค”

I guess the first thing to check is that everyone is running the latest version of the app... in the bottom right, does the Version number read 1.12.0? If the version is different then try forcing a reload (Ctrl + R on Windows, Cmd + R on Mac) until the version is 1.12.0. If you could let me know either way, that would be great ๐Ÿ™‚

@chrisrudy The only other thing that might be useful (but is a pain to get hold of) is the state data of someone who's in sync, and someone who isn't ๐Ÿค”

To get that data you'll need to right-click anywhere on the board and click 'Inspect', in the window that opens then select the 'Application' tab. On the left, under 'Storage' there should be an entry for vgb.purplekingdomgames.com, click on that, and then copy the data directly below the Value heading (should look something like {"config":{"appMode":"game","game...) by double-clicking the entry and pressing Ctrl+A and then Ctrl+C

Once you have that then copy the data into this issue, and I can completely replicate what you're seeing on this end (hopefully ๐Ÿคž ). It's a big old faff, but should give me something very solid to work from, but if you don't feel comfortable doing it I completely understand ๐Ÿ™‚

OK, thanks for trying again.. I'll keep this open for now in case anymore people get the issue and want to report it ๐Ÿ™‚

@eheikes Did your group experiance the same thing again, or does it appear fixed?

We only play every other week, so I haven't had a chance to check again. I'll let you know after we try it again.

We tried again and experienced the same problem -- sync only worked for the one person (not the first player to join this time).

Hi @eheikes , Any chance you can get me the logs (I mention how above). I could probably do with one set of logs from the person who has the problem, and another from someone who works fine. I know it's a bit of a pain, but I can't replicate it here at all โ˜น๏ธ

So an idea occurs to me... does the player experiencing the problem have 2 tabs of the game open? It's a bit of a long shot, but worth asking ๐Ÿ™‚

My group has been running into this several times now with 3 and 4 players over the last month or two. IIRC, one of the users was running with an up to date version of Chrome and the workaround was to use a different browser. Personally I have been using Safari with several tabs open (but to other websites) and have noticed this problem myself. I have run multiple instances at home using different devices when playing with family and do not recall seeing this problem but it has been several months.

Thanks for adding to this @cafelizardo - I might have some more ideas on how to test it my end... I'm wondering if it's something to do with sleeping a computer and coming back to it? Definitely feels like the computers are going out of sync somewhere and then just can't re-establish the connection.

With that in mind a thought occurs to me... What happens if the affected player changes rooms, and then changes back again? Does that fix the problem? Also, what did you do @cafelizardo to fix your issue? Did you switch browser too?

Thanks for adding to this @cafelizardo - I might have some more ideas on how to test it my end... I'm wondering if it's something to do with sleeping a computer and coming back to it? Definitely feels like the computers are going out of sync somewhere and then just can't re-establish the connection.

With that in mind a thought occurs to me... What happens if the affected player changes rooms, and then changes back again? Does that fix the problem? Also, what did you do @cafelizardo to fix your issue? Did you switch browser too?

No, we were actively playing the game each time the chrome user starting having issues with not seeing updates our updates. Me (safari on osx) and the other player, not sure what broweser/OS he was using, we could see our updates. Only the person who was having issues switched browsers, the other did not. Our setup is running Zoom so we can talk to each other, gloomhaven helper app hosted by one of the other guys not having issues, and we use your wonderful web app which has made it possible to play again as the we had horrible issues trying to point a webcam at a map trying to read pixelated game pieces we could barely read. Next time we get the sync problem I will suggest he trying changing rooms and back.

Thanks @cafelizardo - I'll have a play with this later and see if I can replicate it (perks of working from home at least mean I have 3 computers here I can try it on ๐Ÿ™‚ ) . I'm hoping to get a release out soon and it would be nice to include a fix for this if at all possible

So I didn't manage to replicate the problem last night, and I can't really see where the issue might be. Another thought I had though, was that maybe (and this is a long shot) the versions are off for the people out of sync. The latest version is 1.13.0 (found in the bottom right of the screen), so for those experiencing issues maybe it's worth checking the versions are all the same? With that in mind I've modified the app to be better at keeping people up to date, due to be released soon. @cafelizardo and @eheikes , could you check the version for me of people who are experiencing issues, please? Would be nice to get to the bottom of this ๐Ÿ™‚

The latest version is now out with a few additional cache bustng capabilities - if you could clear your web caches (nmot any web data) and try again I'd be very grateful ๐Ÿ™‚

Sorry for the delay, I just tested this again. I think the sync may have worked briefly, but it quickly stopped working again. Here are the notes:

  • We were both running v1.13.0.
  • We both only had one tab open with the app. We open a new tab when we start the gaming session.
  • Trying to change the scenario also did not work for the problem browser. After clicking the "OK" button the dialog window goes away and nothing changes.
  • Using a different browser always works.

Here is the state data from the local storage for each user at a point in time:

Healthy user
{
  "config": {
    "appMode": "game",
    "gameMode": "lootCell",
    "roomCode": "NKWFE-R5cC9",
    "showRoomCode": true,
    "envelopeX": false,
    "boardOnly": false,
    "campaignTracker": null,
    "tutorialStep": 3
  },
  "gameState": {
    "scenario": { "expansion": "gloomhaven", "id": 23 },
    "players": [{ "class": "tinkerer" }, { "class": "mindthief" }],
    "updateCount": 13,
    "visibleRooms": ["i1b"],
    "overlays": [
      {
        "ref": {
          "type": "door",
          "subType": "corridor",
          "material": "pressure-plate",
          "size": 1,
          "links": ["m1a", "m1a"]
        },
        "id": 2,
        "direction": "default",
        "cells": [[1, 13]]
      },
      {
        "ref": {
          "type": "door",
          "subType": "corridor",
          "material": "pressure-plate",
          "size": 1,
          "links": ["m1a", "m1a"]
        },
        "id": 1,
        "direction": "default",
        "cells": [[4, 15]]
      },
      {
        "ref": { "type": "door", "subType": "stone", "links": ["k2b", "m1a"] },
        "id": 2,
        "direction": "diagonal-left",
        "cells": [[5, 11]]
      },
      {
        "ref": {
          "type": "door",
          "subType": "corridor",
          "material": "pressure-plate",
          "size": 1,
          "links": ["d1a", "d1a"]
        },
        "id": 2,
        "direction": "default",
        "cells": [[17, 13]]
      },
      {
        "ref": { "type": "obstacle", "subType": "boulder-1" },
        "id": 20,
        "direction": "default",
        "cells": [[16, 12]]
      },
      {
        "ref": { "type": "obstacle", "subType": "boulder-1" },
        "id": 19,
        "direction": "default",
        "cells": [[14, 14]]
      },
      {
        "ref": {
          "type": "door",
          "subType": "corridor",
          "material": "pressure-plate",
          "size": 1,
          "links": ["d1a", "d1a"]
        },
        "id": 1,
        "direction": "default",
        "cells": [[14, 15]]
      },
      {
        "ref": { "type": "door", "subType": "stone", "links": ["k2b", "d1a"] },
        "id": 1,
        "direction": "diagonal-right",
        "cells": [[13, 11]]
      },
      {
        "ref": { "type": "obstacle", "subType": "boulder-1" },
        "id": 18,
        "direction": "default",
        "cells": [[12, 11]]
      },
      {
        "ref": { "type": "obstacle", "subType": "boulder-1" },
        "id": 17,
        "direction": "default",
        "cells": [[11, 10]]
      },
      {
        "ref": { "type": "trap", "subType": "bear" },
        "id": 16,
        "direction": "default",
        "cells": [[8, 10]]
      },
      {
        "ref": { "type": "trap", "subType": "bear" },
        "id": 15,
        "direction": "default",
        "cells": [[7, 10]]
      },
      {
        "ref": { "type": "obstacle", "subType": "boulder-1" },
        "id": 14,
        "direction": "default",
        "cells": [[10, 9]]
      },
      {
        "ref": { "type": "trap", "subType": "bear" },
        "id": 13,
        "direction": "default",
        "cells": [[6, 9]]
      },
      {
        "ref": { "type": "obstacle", "subType": "boulder-1" },
        "id": 12,
        "direction": "default",
        "cells": [[12, 8]]
      },
      {
        "ref": { "type": "door", "subType": "stone", "links": ["i1b", "k2b"] },
        "id": 1,
        "direction": "default",
        "cells": [[9, 5]]
      },
      {
        "ref": { "type": "treasure", "subType": "chest", "id": "72" },
        "id": 11,
        "direction": "default",
        "cells": [[12, 4]]
      },
      {
        "ref": { "type": "treasure", "subType": "chest", "id": "39" },
        "id": 10,
        "direction": "default",
        "cells": [[7, 4]]
      },
      {
        "ref": { "type": "starting-location" },
        "id": 9,
        "direction": "default",
        "cells": [[10, 1]]
      },
      {
        "ref": { "type": "starting-location" },
        "id": 8,
        "direction": "default",
        "cells": [[9, 1]]
      },
      {
        "ref": { "type": "starting-location" },
        "id": 7,
        "direction": "default",
        "cells": [[8, 1]]
      },
      {
        "ref": { "type": "starting-location" },
        "id": 6,
        "direction": "default",
        "cells": [[11, 0]]
      },
      {
        "ref": { "type": "starting-location" },
        "id": 5,
        "direction": "default",
        "cells": [[10, 0]]
      },
      {
        "ref": { "type": "starting-location" },
        "id": 4,
        "direction": "default",
        "cells": [[9, 0]]
      },
      {
        "ref": { "type": "starting-location" },
        "id": 3,
        "direction": "default",
        "cells": [[8, 0]]
      }
    ],
    "pieces": [
      { "ref": { "type": "player", "class": "mindthief" }, "x": 9, "y": 0 },
      { "ref": { "type": "player", "class": "tinkerer" }, "x": 8, "y": 0 },
      {
        "ref": {
          "type": "monster",
          "class": "stone-golem",
          "id": 0,
          "level": "normal",
          "wasSummoned": false,
          "outOfPhase": false
        },
        "x": 8,
        "y": 7
      },
      {
        "ref": {
          "type": "monster",
          "class": "ancient-artillery",
          "id": 0,
          "level": "normal",
          "wasSummoned": false,
          "outOfPhase": false
        },
        "x": 7,
        "y": 11
      },
      {
        "ref": {
          "type": "monster",
          "class": "ancient-artillery",
          "id": 0,
          "level": "normal",
          "wasSummoned": false,
          "outOfPhase": false
        },
        "x": 11,
        "y": 11
      },
      {
        "ref": {
          "type": "monster",
          "class": "living-bones",
          "id": 0,
          "level": "normal",
          "wasSummoned": false,
          "outOfPhase": false
        },
        "x": 13,
        "y": 13
      },
      {
        "ref": {
          "type": "monster",
          "class": "living-spirit",
          "id": 0,
          "level": "elite",
          "wasSummoned": false,
          "outOfPhase": false
        },
        "x": 16,
        "y": 14
      },
      {
        "ref": {
          "type": "monster",
          "class": "living-bones",
          "id": 0,
          "level": "normal",
          "wasSummoned": false,
          "outOfPhase": false
        },
        "x": 16,
        "y": 11
      },
      {
        "ref": {
          "type": "monster",
          "class": "ancient-artillery",
          "id": 0,
          "level": "elite",
          "wasSummoned": false,
          "outOfPhase": false
        },
        "x": 2,
        "y": 15
      },
      {
        "ref": {
          "type": "monster",
          "class": "stone-golem",
          "id": 0,
          "level": "normal",
          "wasSummoned": false,
          "outOfPhase": false
        },
        "x": 4,
        "y": 14
      },
      {
        "ref": {
          "type": "monster",
          "class": "ancient-artillery",
          "id": 5,
          "level": "normal",
          "wasSummoned": false,
          "outOfPhase": false
        },
        "x": 11,
        "y": 3
      },
      {
        "ref": {
          "type": "monster",
          "class": "stone-golem",
          "id": 5,
          "level": "normal",
          "wasSummoned": false,
          "outOfPhase": false
        },
        "x": 9,
        "y": 3
      },
      {
        "ref": {
          "type": "monster",
          "class": "ancient-artillery",
          "id": 1,
          "level": "normal",
          "wasSummoned": false,
          "outOfPhase": false
        },
        "x": 7,
        "y": 3
      }
    ],
    "availableMonsters": [
      { "ref": "ancient-artillery", "bucket": [3, 1, 5, 2] },
      { "ref": "living-bones", "bucket": [0, 6, 2, 8, 9, 5, 4, 3, 7, 1] },
      { "ref": "living-spirit", "bucket": [2, 3, 0, 1, 5, 4] },
      { "ref": "stone-golem", "bucket": [3, 5, 0, 2, 1] }
    ],
    "roomCode": "NKWFE-R5cC9"
  }
}
Problem user
{
  "config": {
    "appMode": "game",
    "gameMode": "movePiece",
    "roomCode": "NKWFE-R5cC9",
    "showRoomCode": true,
    "envelopeX": false,
    "boardOnly": false,
    "campaignTracker": null,
    "tutorialStep": 3
  },
  "gameState": {
    "scenario": { "expansion": "gloomhaven", "id": 23 },
    "players": [{ "class": "tinkerer" }, { "class": "mindthief" }],
    "updateCount": 6,
    "visibleRooms": ["i1b"],
    "overlays": [
      {
        "ref": {
          "type": "door",
          "subType": "corridor",
          "material": "pressure-plate",
          "size": 1,
          "links": ["m1a", "m1a"]
        },
        "id": 2,
        "direction": "default",
        "cells": [[1, 13]]
      },
      {
        "ref": {
          "type": "door",
          "subType": "corridor",
          "material": "pressure-plate",
          "size": 1,
          "links": ["m1a", "m1a"]
        },
        "id": 1,
        "direction": "default",
        "cells": [[4, 15]]
      },
      {
        "ref": { "type": "door", "subType": "stone", "links": ["k2b", "m1a"] },
        "id": 2,
        "direction": "diagonal-left",
        "cells": [[5, 11]]
      },
      {
        "ref": {
          "type": "door",
          "subType": "corridor",
          "material": "pressure-plate",
          "size": 1,
          "links": ["d1a", "d1a"]
        },
        "id": 2,
        "direction": "default",
        "cells": [[17, 13]]
      },
      {
        "ref": { "type": "obstacle", "subType": "boulder-1" },
        "id": 20,
        "direction": "default",
        "cells": [[16, 12]]
      },
      {
        "ref": { "type": "obstacle", "subType": "boulder-1" },
        "id": 19,
        "direction": "default",
        "cells": [[14, 14]]
      },
      {
        "ref": {
          "type": "door",
          "subType": "corridor",
          "material": "pressure-plate",
          "size": 1,
          "links": ["d1a", "d1a"]
        },
        "id": 1,
        "direction": "default",
        "cells": [[14, 15]]
      },
      {
        "ref": { "type": "door", "subType": "stone", "links": ["k2b", "d1a"] },
        "id": 1,
        "direction": "diagonal-right",
        "cells": [[13, 11]]
      },
      {
        "ref": { "type": "obstacle", "subType": "boulder-1" },
        "id": 18,
        "direction": "default",
        "cells": [[12, 11]]
      },
      {
        "ref": { "type": "obstacle", "subType": "boulder-1" },
        "id": 17,
        "direction": "default",
        "cells": [[11, 10]]
      },
      {
        "ref": { "type": "trap", "subType": "bear" },
        "id": 16,
        "direction": "default",
        "cells": [[8, 10]]
      },
      {
        "ref": { "type": "trap", "subType": "bear" },
        "id": 15,
        "direction": "default",
        "cells": [[7, 10]]
      },
      {
        "ref": { "type": "obstacle", "subType": "boulder-1" },
        "id": 14,
        "direction": "default",
        "cells": [[10, 9]]
      },
      {
        "ref": { "type": "trap", "subType": "bear" },
        "id": 13,
        "direction": "default",
        "cells": [[6, 9]]
      },
      {
        "ref": { "type": "obstacle", "subType": "boulder-1" },
        "id": 12,
        "direction": "default",
        "cells": [[12, 8]]
      },
      {
        "ref": { "type": "door", "subType": "stone", "links": ["i1b", "k2b"] },
        "id": 1,
        "direction": "default",
        "cells": [[9, 5]]
      },
      {
        "ref": { "type": "treasure", "subType": "chest", "id": "72" },
        "id": 11,
        "direction": "default",
        "cells": [[12, 4]]
      },
      {
        "ref": { "type": "treasure", "subType": "chest", "id": "39" },
        "id": 10,
        "direction": "default",
        "cells": [[7, 4]]
      },
      {
        "ref": { "type": "starting-location" },
        "id": 9,
        "direction": "default",
        "cells": [[10, 1]]
      },
      {
        "ref": { "type": "starting-location" },
        "id": 8,
        "direction": "default",
        "cells": [[9, 1]]
      },
      {
        "ref": { "type": "starting-location" },
        "id": 7,
        "direction": "default",
        "cells": [[8, 1]]
      },
      {
        "ref": { "type": "starting-location" },
        "id": 6,
        "direction": "default",
        "cells": [[11, 0]]
      },
      {
        "ref": { "type": "starting-location" },
        "id": 5,
        "direction": "default",
        "cells": [[10, 0]]
      },
      {
        "ref": { "type": "starting-location" },
        "id": 4,
        "direction": "default",
        "cells": [[9, 0]]
      },
      {
        "ref": { "type": "starting-location" },
        "id": 3,
        "direction": "default",
        "cells": [[8, 0]]
      }
    ],
    "pieces": [
      { "ref": { "type": "player", "class": "tinkerer" }, "x": 9, "y": 1 },
      { "ref": { "type": "player", "class": "mindthief" }, "x": 9, "y": 0 },
      {
        "ref": {
          "type": "monster",
          "class": "stone-golem",
          "id": 0,
          "level": "normal",
          "wasSummoned": false,
          "outOfPhase": false
        },
        "x": 8,
        "y": 7
      },
      {
        "ref": {
          "type": "monster",
          "class": "ancient-artillery",
          "id": 0,
          "level": "normal",
          "wasSummoned": false,
          "outOfPhase": false
        },
        "x": 7,
        "y": 11
      },
      {
        "ref": {
          "type": "monster",
          "class": "ancient-artillery",
          "id": 0,
          "level": "normal",
          "wasSummoned": false,
          "outOfPhase": false
        },
        "x": 11,
        "y": 11
      },
      {
        "ref": {
          "type": "monster",
          "class": "living-bones",
          "id": 0,
          "level": "normal",
          "wasSummoned": false,
          "outOfPhase": false
        },
        "x": 13,
        "y": 13
      },
      {
        "ref": {
          "type": "monster",
          "class": "living-spirit",
          "id": 0,
          "level": "elite",
          "wasSummoned": false,
          "outOfPhase": false
        },
        "x": 16,
        "y": 14
      },
      {
        "ref": {
          "type": "monster",
          "class": "living-bones",
          "id": 0,
          "level": "normal",
          "wasSummoned": false,
          "outOfPhase": false
        },
        "x": 16,
        "y": 11
      },
      {
        "ref": {
          "type": "monster",
          "class": "ancient-artillery",
          "id": 0,
          "level": "elite",
          "wasSummoned": false,
          "outOfPhase": false
        },
        "x": 2,
        "y": 15
      },
      {
        "ref": {
          "type": "monster",
          "class": "stone-golem",
          "id": 0,
          "level": "normal",
          "wasSummoned": false,
          "outOfPhase": false
        },
        "x": 4,
        "y": 14
      },
      {
        "ref": {
          "type": "monster",
          "class": "ancient-artillery",
          "id": 5,
          "level": "normal",
          "wasSummoned": false,
          "outOfPhase": false
        },
        "x": 11,
        "y": 3
      },
      {
        "ref": {
          "type": "monster",
          "class": "stone-golem",
          "id": 5,
          "level": "normal",
          "wasSummoned": false,
          "outOfPhase": false
        },
        "x": 9,
        "y": 3
      },
      {
        "ref": {
          "type": "monster",
          "class": "ancient-artillery",
          "id": 1,
          "level": "normal",
          "wasSummoned": false,
          "outOfPhase": false
        },
        "x": 7,
        "y": 3
      }
    ],
    "availableMonsters": [
      { "ref": "ancient-artillery", "bucket": [3, 1, 5, 2] },
      { "ref": "living-bones", "bucket": [0, 6, 2, 8, 9, 5, 4, 3, 7, 1] },
      { "ref": "living-spirit", "bucket": [2, 3, 0, 1, 5, 4] },
      { "ref": "stone-golem", "bucket": [3, 5, 0, 2, 1] }
    ],
    "roomCode": "NKWFE-R5cC9"
  }
}

Thanks @eheikes ! I'll take this info and see if I can find the discrepency and fix it... hopefully I can get something out in the next few weeks ๐Ÿคž

Our group finally got to play again after vacations. 3 people playing latest version of the web app 1.13.0. Two people on latest Safari for Mac, 3rd playing running chrome 94.0.4606.81 which was released 2021-10-08. Worked fine for maybe 8 rounds. We stopped seeing his changes but Safari users could see each others changes. Windows user tried clearing cache and restarting Chrome with no effect. He gave up and used another browser. Don't recall if it was Firefox or possibly Edge. We finished several hours later on round 17 without issue. No problems with connections using Gloomhaven Helper app connecting to the other Apple user. We usually use Zoom but had to switch to Skype after we discovered zoom now limits time again.

Just a quick update so you know I haven't forgotten about this ๐Ÿ™‚ :
I've tried with the states provided, but it all works as expected. My only conclusion at the moment is some sort of SignalR or browser blip. But I can't think of a single scenario where one of those 2 things wouldn't be resolved with a page refresh. It's definitely not a network issue as the problem is resolved by changing browsers

I wonder if it's a JS error that just isn't being dealt with ๐Ÿค” I realise that this must be super frustrating, so completely understand if you just want to move on, but can I ask you (@cafelizardo , @eheikes and @chrisrudy ) to check the browser console the next time this happens, and tell me if there are any errors reported there?

I don't remember seeing an error in the console before -- that's usually one of the first things I check. I'll look again next time I run into the problem.