hanabi-live icon indicating copy to clipboard operation
hanabi-live copied to clipboard

TypeScript error: "Failed to get the previously known card identity for card: 45"

Open JelleZijlstra opened this issue 1 year ago • 13 comments

I got a TypeScript error on the last play in sudoku + dark null.

TypeError: Failed to get the previously known card identity for card: 45
    at Se (https://hanab.live/public/js/bundles/main.6089.min.js:1:46727)
    at Pa.getCardIdentity (https://hanab.live/public/js/bundles/main.6089.min.js:15:25033)
    at Pa.setBareImage (https://hanab.live/public/js/bundles/main.6089.min.js:15:24442)
    at um (https://hanab.live/public/js/bundles/main.6089.min.js:183:17021)
    at Object.AE [as onChange] (https://hanab.live/public/js/bundles/main.6089.min.js:183:19274)
    at i (https://hanab.live/public/js/bundles/main.6089.min.js:183:14083)
    at Object.C [as dispatch] (https://hanab.live/public/js/bundles/main.6089.min.js:172:28786)
    at https://hanab.live/public/js/bundles/main.6089.min.js:198:9443
    at Object.finishOngoingGame (https://hanab.live/public/js/bundles/main.6089.min.js:198:19908)
    at cR.onMessage (https://hanab.live/public/js/bundles/main.6089.min.js:172:27203)
Screenshot 2023-12-03 at 8 01 47 PM

JelleZijlstra avatar Dec 04 '23 04:12 JelleZijlstra

what was the game id?

Zamiell avatar Dec 04 '23 04:12 Zamiell

1072518

JelleZijlstra avatar Dec 04 '23 04:12 JelleZijlstra

image

Today's error, game 1074188.

argothiel avatar Dec 07 '23 09:12 argothiel

Another one today: image

Game 1074353.

argothiel avatar Dec 07 '23 18:12 argothiel

And during the hypo: image Game 1074394.

argothiel avatar Dec 07 '23 19:12 argothiel

Today game. image

Game 1074502.

argothiel avatar Dec 07 '23 23:12 argothiel

image

Game 1075985.

argothiel avatar Dec 10 '23 03:12 argothiel

Is this a duplicate of #2876?

argothiel avatar Dec 10 '23 17:12 argothiel

ok Rama has been working on this.

today we added new error messages for when the deck gets out of sync.

@argothiel let me know if you get any new error messages lately, and hopefully with the steps to recreate the error message from scratch

Zamiell avatar Dec 16 '23 15:12 Zamiell

I didn't get any new messages right after the game recently. I got the "A hypoBack action was dispatched with a null hypothetical state" during the hypo, but that might be unrelated.

argothiel avatar Dec 18 '23 15:12 argothiel

Not the exact same error, but I just got this stacktrace while watching a 2p-NoVar game. I did not take any special actions except spectating. image

Clear Stacktrace:

TypeError: Failed to get card of order 15 from the deck.
    at ve (https://hanab.live/public/js/bundles/main.6226.min.js:5:285677)
    at si (https://hanab.live/public/js/bundles/main.6226.min.js:32:65293)
    at hV (https://hanab.live/public/js/bundles/main.6226.min.js:34:41438)
    at go (https://hanab.live/public/js/bundles/main.6226.min.js:34:40954)
    at https://hanab.live/public/js/bundles/main.6226.min.js:34:41028
    at qi.finishedTweening (https://hanab.live/public/js/bundles/main.6226.min.js:34:24302)
    at Object.onFinish (https://hanab.live/public/js/bundles/main.6226.min.js:13:97737)
    at e.onFinish (https://hanab.live/public/js/bundles/main.6226.min.js:13:95813)
    at tween.onFinish (https://hanab.live/public/js/bundles/main.6226.min.js:12:122920)
    at e.fire (https://hanab.live/public/js/bundles/main.6226.min.js:12:119021)

Since NoVar clearly has at least 16 cards in the deck, there is probably some race condition going on, i.e. the deck has not been updated yet, but the client already wanted to access the card in the deck? I would say the error occurred around a time where card 15 (= the 16th card in the deck) was drawn, so this could be the problem here. But I cannot say for sure if this was the case.

Potentially relevant: While looking at this error message, the game review continued working properly in the background, and the top card of the stacks was always visible, i.e. it showed the full-empathy version of the top card of the stacks. So I could also imagine that the client somehow went off-sync with where the game progress/cards are and that there is an indirect off-by-one in here.

kesslermaximilian avatar Dec 19 '23 11:12 kesslermaximilian

Yeah I think that is a separate issue, it looks like your internet lagged and you got an action out of order. This kind of thing isn't supposed to happen since WebSocket can't deliver messages out of order.

Zamiell avatar Dec 19 '23 14:12 Zamiell

The stack trace isn't interesting, I'd be interested in seeing what were the actions received by the server before and after the error message.

Zamiell avatar Dec 19 '23 14:12 Zamiell

should be fixed in https://github.com/Hanabi-Live/hanabi-live/commit/872253e896de578e1526ad337414d0fbe4837576

Zamiell avatar May 24 '24 19:05 Zamiell