Repository: odota/web

Issue #3126: Match page not loading after being parsed
Created: 2023-12-02T10:09:38Z
Current Behavior
Before parsing a match, the match page is fine. But after parsing a match, the match page cannot be loaded. Tried both Chrome and Firefox, with no extensions, same issue, so it is not a browser problem.
Expected behavior/code
The match page should be loaded without error.
Console Output
TypeError: e.tower_status_radiant is null
    she https://www.opendota.com/assets/index-408ab163.js:4250
    Z8 https://www.opendota.com/assets/index-408ab163.js:30
    Uee https://www.opendota.com/assets/index-408ab163.js:34
    Hee https://www.opendota.com/assets/index-408ab163.js:34
    f_e https://www.opendota.com/assets/index-408ab163.js:34
    f_ https://www.opendota.com/assets/index-408ab163.js:34
    WA https://www.opendota.com/assets/index-408ab163.js:32
    mee https://www.opendota.com/assets/index-408ab163.js:30
    unstable_runWithPriority https://www.opendota.com/assets/index-408ab163.js:19
    ap https://www.opendota.com/assets/index-408ab163.js:30
    mee https://www.opendota.com/assets/index-408ab163.js:30
    tl https://www.opendota.com/assets/index-408ab163.js:30
    pu https://www.opendota.com/assets/index-408ab163.js:32
    enqueueSetState https://www.opendota.com/assets/index-408ab163.js:30
    setState https://www.opendota.com/assets/index-408ab163.js:12
    componentDidMount https://www.opendota.com/assets/index-408ab163.js:4278
    componentDidMount https://www.opendota.com/assets/index-408ab163.js:4278
    u_e https://www.opendota.com/assets/index-408ab163.js:32
    g_e https://www.opendota.com/assets/index-408ab163.js:34
    unstable_runWithPriority https://www.opendota.com/assets/index-408ab163.js:19
    ap https://www.opendota.com/assets/index-408ab163.js:30
    yd https://www.opendota.com/assets/index-408ab163.js:34
    WA https://www.opendota.com/assets/index-408ab163.js:32
    mee https://www.opendota.com/assets/index-408ab163.js:30
    unstable_runWithPriority https://www.opendota.com/assets/index-408ab163.js:19
    ap https://www.opendota.com/assets/index-408ab163.js:30
    mee https://www.opendota.com/assets/index-408ab163.js:30
    tl https://www.opendota.com/assets/index-408ab163.js:30
    pu https://www.opendota.com/assets/index-408ab163.js:32
    enqueueSetState https://www.opendota.com/assets/index-408ab163.js:30
    setState https://www.opendota.com/assets/index-408ab163.js:12
    componentDidMount https://www.opendota.com/assets/index-408ab163.js:2689
    componentDidMount https://www.opendota.com/assets/index-408ab163.js:2689
    componentDidMount https://www.opendota.com/assets/index-408ab163.js:2689
    u_e https://www.opendota.com/assets/index-408ab163.js:32
    g_e https://www.opendota.com/assets/index-408ab163.js:34
    unstable_runWithPriority https://www.opendota.com/assets/index-408ab163.js:19
    ap https://www.opendota.com/assets/index-408ab163.js:30
    yd https://www.opendota.com/assets/index-408ab163.js:34
    WA https://www.opendota.com/assets/index-408ab163.js:32
    mee https://www.opendota.com/assets/index-408ab163.js:30
    unstable_runWithPriority https://www.opendota.com/assets/index-408ab163.js:19
    ap https://www.opendota.com/assets/index-408ab163.js:30
    mee https://www.opendota.com/assets/index-408ab163.js:30
    tl https://www.opendota.com/assets/index-408ab163.js:30
    Bee https://www.opendota.com/assets/index-408ab163.js:32
    notify https://www.opendota.com/assets/index-408ab163.js:34
    i https://www.opendota.com/assets/index-408ab163.js:34
    o https://www.opendota.com/assets/index-408ab163.js:34
    p https://www.opendota.com/assets/index-408ab163.js:59
    t https://www.opendota.com/assets/index-408ab163.js:59
    dispatch https://www.opendota.com/assets/index-408ab163.js:59
    d https://www.opendota.com/assets/index-408ab163.js:2299
    promise callback*d https://www.opendota.com/assets/index-408ab163.js:2299
    ht https://www.opendota.com/assets/index-408ab163.js:2299
    t https://www.opendota.com/assets/index-408ab163.js:59
    getMatch https://www.opendota.com/assets/index-408ab163.js:4558
    componentDidMount https://www.opendota.com/assets/index-408ab163.js:4558
    u_e https://www.opendota.com/assets/index-408ab163.js:32
    g_e https://www.opendota.com/assets/index-408ab163.js:34
    unstable_runWithPriority https://www.opendota.com/assets/index-408ab163.js:19
    ap https://www.opendota.com/assets/index-408ab163.js:30
    yd https://www.opendota.com/assets/index-408ab163.js:34
    WA https://www.opendota.com/assets/index-408ab163.js:32
    mee https://www.opendota.com/assets/index-408ab163.js:30
    unstable_runWithPriority https://www.opendota.com/assets/index-408ab163.js:19
    ap https://www.opendota.com/assets/index-408ab163.js:30
    mee https://www.opendota.com/assets/index-408ab163.js:30
    tl https://www.opendota.com/assets/index-408ab163.js:30
    RQ https://www.opendota.com/assets/index-408ab163.js:34
    cge https://www.opendota.com/assets/index-408ab163.js:30
    iee https://www.opendota.com/assets/index-408ab163.js:30
    wF https://www.opendota.com/assets/index-408ab163.js:30
    nee https://www.opendota.com/assets/index-408ab163.js:30
    nee https://www.opendota.com/assets/index-408ab163.js:30
    c6 https://www.opendota.com/assets/index-408ab163.js:34
    C_e https://www.opendota.com/assets/index-408ab163.js:34
    Kw https://www.opendota.com/assets/index-408ab163.js:34
    render https://www.opendota.com/assets/index-408ab163.js:34
    <anonymous> https://www.opendota.com/assets/index-408ab163.js:7311

Environment

Browser Version: Firefox 120.0.1 and Chrome 119.0.6045.200
OS: Windows 11

Possible Solution
Try looking at e.tower_status_radiant, and e.tower_status_dire too because probably radiant error triggered first
Additional context/Screenshots
Example 1, Dire won (https://www.opendota.com/matches/7468052914)
Example 2, Radiant won (https://www.opendota.com/matches/7467104474)

Duplicate issue #3127: Page not loading due to unhandled null value in match metadata
Created: 2023-12-02T10:27:52Z
Current Behavior
React frontend error trying to cast null toString
Expected behavior/code
Code should handle null values
Console Output
Uncaught TypeError: Cannot read properties of null (reading 'toString')
Possible Solution
Compiled code source, line that's erroring out: let r = E_(e.tower_status_radiant.toString(2), 16).slice(5);
Metadata json loaded via network call has "tower_status_radiant": null,
Actual code: https://github.com/odota/web/blob/master/src/components/Match/BuildingMap/BuildingMap.jsx#L283
Above, we see a patch handler where it handles when tower_status_radiant is undefined, but not when it's null
https://github.com/odota/web/blob/master/src/components/Match/BuildingMap/BuildingMap.jsx#L276-L278
Possible solution: return empty section when information is unavailable?
Although this also hints at the API possibly returning bad data (tower status should never be null?)
Match ID: https://www.opendota.com/matches/7468445438

Closing comment (2023-12-02T10:36:33Z): Seems like it's a dupe of #3126