thomasboyt/manygolf

During sync, a recorded past position newer than the sync message time cannot be found for a player

Closed this issue · 0 comments

This is the most common exception by far in Sentry:

TypeError: Cannot read property '0' of undefined
  at forEach(./src/client/reducer.ts:97:27)
  at syncWorld(./src/client/reducer.ts:87:22)
  at type(./src/client/reducer.ts:533:22)
  at currentReducer(./src/universal/createImmutableReducer.ts:20:44)
  at dispatch(~/redux/lib/createStore.js:173:0)
  at dispatch(./src/client/ws.ts:48:26)

As far as I can tell there are a few possible reasons for this:

  • A bug is causing a sync message to be used to sync before the timestamp of the sync message has actually been reached. This should be impossible.
  • A bug is causing the recorded time of past positions to be out of sync from the real time
  • The player has disconnected/become an observer before the sync message is replayed. This shouldn't happen if player disconnect/observer messages are played at the current time after the sync is played back, but I think currently they're played immediately.

Sentry: https://app.getsentry.com/share/issue/37343032392e313234323238383035/