paaatrick / playball

Watch MLB games from the comfort of your own terminal
MIT License
528 stars 26 forks source link

playball crashing while attempting to view Standings #34

Closed kevinbowen777 closed 6 months ago

kevinbowen777 commented 6 months ago

When attempting to view Standings(by pressing S), the application crashes with 4 sets of the following messages to the console:

Consider adding an error boundary to your tree to customize error handling behavior.                                                               
Visit https://reactjs.org/link/error-boundaries to learn more about error boundaries.
The above error occurred in the <Division> component:

    at Division (file:///home/kbowen/.config/nvm/versions/node/v21.7.1/lib/node_modules/playball/dist/components/Standings.js:15:3)                
    at element                                                                                                                                     
    at Standings (file:///home/kbowen/.config/nvm/versions/node/v21.7.1/lib/node_modules/playball/dist/components/Standings.js:49:20)
    at element
    at element                                                                                  
    at App (file:///home/kbowen/.config/nvm/versions/node/v21.7.1/lib/node_modules/playball/dist/components/App.js:13:27)
    at Provider (/home/kbowen/.config/nvm/versions/node/v21.7.1/lib/node_modules/playball/node_modules/react-redux/lib/components/Provider.js:21:20)

Additionally, in the playball.log are the following entries that appear to be generated at the same time:

[2024-03-29T02:40:22.028Z] error: UNCAUGHT EXCEPTION
{}
TypeError: Cannot read properties of undefined (reading 'streakCode')
    at formatTeamRow (file:///home/kbowen/.config/nvm/versions/node/v21.7.1/lib/node_modules/playball/dist/components/Standings.js:12:312)
    at Array.map (<anonymous>)
    at Division (file:///home/kbowen/.config/nvm/versions/node/v21.7.1/lib/node_modules/playball/dist/components/Standings.js:37:33)
    at renderWithHooks (/home/kbowen/.config/nvm/versions/node/v21.7.1/lib/node_modules/playball/node_modules/react-reconciler/cjs/react-reconciler.development.js:6412:18)
    at mountIndeterminateComponent (/home/kbowen/.config/nvm/versions/node/v21.7.1/lib/node_modules/playball/node_modules/react-reconciler/cjs/react-reconciler.development.js:9238:13)
    at beginWork (/home/kbowen/.config/nvm/versions/node/v21.7.1/lib/node_modules/playball/node_modules/react-reconciler/cjs/react-reconciler.development.js:10476:16)
    at Object.invokeGuardedCallbackProd (/home/kbowen/.config/nvm/versions/node/v21.7.1/lib/node_modules/playball/node_modules/react-reconciler/cjs/react-reconciler.development.js:12101:10)
    at invokeGuardedCallback (/home/kbowen/.config/nvm/versions/node/v21.7.1/lib/node_modules/playball/node_modules/react-reconciler/cjs/react-reconciler.development.js:12292:31)
    at beginWork$1 (/home/kbowen/.config/nvm/versions/node/v21.7.1/lib/node_modules/playball/node_modules/react-reconciler/cjs/react-reconciler.development.js:16531:7)
    at performUnitOfWork (/home/kbowen/.config/nvm/versions/node/v21.7.1/lib/node_modules/playball/node_modules/react-reconciler/cjs/react-reconciler.development.js:15340:12)

Please let me know if you have any questions or need additional information from me. Thank you.

paaatrick commented 6 months ago

Thanks for taking the time to report that! It was one of those weird edge cases that only comes up at the beginning of the season. But it's fixed now in version 3.1.2.

kevinbowen777 commented 6 months ago

Looks good now. Thanks for the quick fix! I appreciate it.