stream-box icon indicating copy to clipboard operation
stream-box copied to clipboard

Error "Cannot read property 'map' of undefined" when selecting a show

Open hexaclue opened this issue 6 years ago • 2 comments

Error Cannot read property 'map' of undefined in the console when selecting a show without a seasonDetails.genre_ids property, causing an app softlock (the loading animation cannot be dismissed). Stream Box version: c989568276a15a3c8c6b3d3ca9d4f66153cfb970

Full error:

Unhandled Rejection at: Promise Promise {
  <rejected> TypeError: Cannot read property 'map' of undefined
      at EventEmitter.<anonymous> (C:\[...]\stream-box\index.js:258:35)
      at processTicksAndRejections (internal/process/task_queues.js:89:5)
} reason: TypeError: Cannot read property 'map' of undefined
    at EventEmitter.<anonymous> (C:\[...]\stream-box\index.js:258:35)
    at processTicksAndRejections (internal/process/task_queues.js:89:5)

hexaclue avatar Aug 16 '19 17:08 hexaclue

I have never come across a series or movie without that property, can you provide the name of the media so I can check it out further?

jonbarrow avatar Aug 17 '19 02:08 jonbarrow

Series I encountered this issue with is Disney's Amphibia.

An easy fix would be creating an empty array variable, then wrapping the map function in a try/catch block. Then, when sending the update, send the variable created earlier.

hexaclue avatar Aug 17 '19 10:08 hexaclue