timkurvers / redota

Revisit past Dota 2 matches in the browser
https://timkurvers.github.io/redota
MIT License
51 stars 7 forks source link

Time around 47:52 crashes the site for replay 6545404223 #72

Closed vlejd closed 2 years ago

vlejd commented 2 years ago

Then I look at 6545404223, and let it play frim 47:52, after a few seconds the website crashes with

TypeError: d is undefined at 1749/la<@https://timkurvers.github.io/redota/redota-parser+viewer-4f692f0f.js:440:150 at 74/g/s/<@https://timkurvers.github.io/redota/redota-vendor-6c7c4893.js?4ef23ad1415cb61a045a:2:165175 at 74/y/<@https://timkurvers.github.io/redota/redota-vendor-6c7c4893.js?4ef23ad1415cb61a045a:2:164807 at Ie@https://timkurvers.github.io/redota/redota-vendor-6c7c4893.js?4ef23ad1415cb61a045a:2:179939 at 8949/t.track@https://timkurvers.github.io/redota/redota-vendor-6c7c4893.js?4ef23ad1415cb61a045a:2:183982 at y@https://timkurvers.github.io/redota/redota-vendor-6c7c4893.js?4ef23ad1415cb61a045a:2:164783 at s@https://timkurvers.github.io/redota/redota-vendor-6c7c4893.js?4ef23ad1415cb61a045a:2:165154 at ra@https://timkurvers.github.io/redota/redota-vendor-6c7c4893.js?4ef23ad1415cb61a045a:2:271908 at za@https://timkurvers.github.io/redota/redota-vendor-6c7c4893.js?4ef23ad1415cb61a045a:2:281426 at Ma@https://timkurvers.github.io/redota/redota-vendor-6c7c4893.js?4ef23ad1415cb61a045a:2:280760 at Ba@https://timkurvers.github.io/redota/redota-vendor-6c7c4893.js?4ef23ad1415cb61a045a:2:280418 at Ku@https://timkurvers.github.io/redota/redota-vendor-6c7c4893.js?4ef23ad1415cb61a045a:2:327344 at Ss@https://timkurvers.github.io/redota/redota-vendor-6c7c4893.js?4ef23ad1415cb61a045a:2:311322 at ks@https://timkurvers.github.io/redota/redota-vendor-6c7c4893.js?4ef23ad1415cb61a045a:2:311250 at _s@https://timkurvers.github.io/redota/redota-vendor-6c7c4893.js?4ef23ad1415cb61a045a:2:311111 at hs@https://timkurvers.github.io/redota/redota-vendor-6c7c4893.js?4ef23ad1415cb61a045a:2:308098 at 4448/Ho/<@https://timkurvers.github.io/redota/redota-vendor-6c7c4893.js?4ef23ad1415cb61a045a:2:257806 at 53/t.unstable_runWithPriority@https://timkurvers.github.io/redota/redota-vendor-6c7c4893.js?4ef23ad1415cb61a045a:2:360235 at Vo@https://timkurvers.github.io/redota/redota-vendor-6c7c4893.js?4ef23ad1415cb61a045a:2:257583 at Ho@https://timkurvers.github.io/redota/redota-vendor-6c7c4893.js?4ef23ad1415cb61a045a:2:257753 at $o@https://timkurvers.github.io/redota/redota-vendor-6c7c4893.js?4ef23ad1415cb61a045a:2:257686 at ss@https://timkurvers.github.io/redota/redota-vendor-6c7c4893.js?4ef23ad1415cb61a045a:2:305477 at Ca@https://timkurvers.github.io/redota/redota-vendor-6c7c4893.js?4ef23ad1415cb61a045a:2:277206 at 74/y/u<@https://timkurvers.github.io/redota/redota-vendor-6c7c4893.js?4ef23ad1415cb61a045a:2:164275 at 74/y/l<@https://timkurvers.github.io/redota/redota-vendor-6c7c4893.js?4ef23ad1415cb61a045a:2:164382 at 8949/t.runReaction_@https://timkurvers.github.io/redota/redota-vendor-6c7c4893.js?4ef23ad1415cb61a045a:2:183789 at Je@https://timkurvers.github.io/redota/redota-vendor-6c7c4893.js?4ef23ad1415cb61a045a:2:185472 at Ze@https://timkurvers.github.io/redota/redota-vendor-6c7c4893.js?4ef23ad1415cb61a045a:2:185258 at Qe@https://timkurvers.github.io/redota/redota-vendor-6c7c4893.js?4ef23ad1415cb61a045a:2:182381 at 8949/ve/<@https://timkurvers.github.io/redota/redota-vendor-6c7c4893.js?4ef23ad1415cb61a045a:2:172032 at ve@https://timkurvers.github.io/redota/redota-vendor-6c7c4893.js?4ef23ad1415cb61a045a:2:172104 at o@https://timkurvers.github.io/redota/redota-vendor-6c7c4893.js?4ef23ad1415cb61a045a:2:171362 at 2129/m/<@https://timkurvers.github.io/redota/redota-main-756a5da7.js?4ef23ad1415cb61a045a:213:1198 at 2129/m/</e<@https://timkurvers.github.io/redota/redota-main-756a5da7.js?4ef23ad1415cb61a045a:213:1138 at

I suspect it is because of a pause. It also looks like parser thinks that there are only 9 players (grimstroke is missing).

timkurvers commented 2 years ago

Thanks for reporting!

Non-minified stack-trace:

TypeError: player is undefined
    at ./src/ui/replay/hud/topbar/HeroListEntry.jsx/HeroListEntry<@http://localhost:8080/redota-parser+viewer-ef43f122.js:20466:19
    at ./node_modules/mobx-react-lite/es/observer.js/observer/wrappedComponent/<@http://localhost:8080/redota-vendor-1477401c.js?426f9a640bbe2a1251d2:15367:95
    at ./node_modules/mobx-react-lite/es/useObserver.js/useObserver/<@http://localhost:8080/redota-vendor-1477401c.js?426f9a640bbe2a1251d2:15556:25
    ...

My guess is this is likely related to a player disconnecting and then reconnecting (which may also explain why the game was paused). Similar to #22 in that case.

timkurvers commented 2 years ago

Fixed in a91ee0f57a569f431d7c8c94bd38232a13383407. Version 1.6.0 with this fix is available on the website.

Depending on how you reach a certain timestamp (jump vs seek) players may stay 'disconnected', but at least the viewer won't crash. Hope to address these jump issues in #13.