Elaniobro / MMM-nyc-transit

MTA transit module for Magic Mirror
MIT License
21 stars 14 forks source link

UnhandledPromiseRejectionWarning and no data loads #45

Closed apiontek closed 3 years ago

apiontek commented 3 years ago

MagicMirror version: v2.13.0 MMM-nyc-transit version: master commit c61dd818d249dd4e9fe7f35a2b49b96f3448fdd0

Due to pandemic, haven't noticed til today the Next Transit part of my MagicMirror setup isn't loading. I've been on node 12, tried moving to node 14, but getting the same errors (I assume one for each station I have configured) when running & loading the MM site in the browser:

[2020-11-15 10:40:40.001] [ERROR]  (node:59936) UnhandledPromiseRejectionWarning: Error: RangeError: Illegal offset: 0 <= 112 (+1) <= 23
    at /opt/MagicMirror/modules/MMM-nyc-transit/node_helper.js:106:15
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
[2020-11-15 10:40:40.002] [ERROR]  (node:59936) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
[2020-11-15 10:40:40.002] [ERROR]  (node:59936) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
[2020-11-15 10:40:40.680] [LOG]    [SPOTIFY] MMM-Spotify Version: 1.6.3
[2020-11-15 10:40:52.547] [LOG]    [SPOTIFY] MMM-Spotify Version: 1.6.3
[2020-11-15 10:40:52.593] [ERROR]  (node:59936) UnhandledPromiseRejectionWarning: Error: RangeError: Illegal offset: 0 <= 112 (+1) <= 23
    at /opt/MagicMirror/modules/MMM-nyc-transit/node_helper.js:106:15
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
[2020-11-15 10:40:52.594] [ERROR]  (node:59936) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)

I'm familiar with some javascript so I'm happy to help with debugging this but not sure I know enough to figure this one out on y own.

github-actions[bot] commented 3 years ago

Thank you for your feedback!' first issue

Elaniobro commented 3 years ago

@apiontek, Please post your MM config as well as which version of the MMM-nyc-transit module you have installed. Thanks!

apiontek commented 3 years ago

Hi, I'm sorry for wasting your time. I had posted my version but in looking again to make sure I hadn't missed something, I saw in git log the mention of the updated API system, so I went and got a new API key.

New API key -> all working again!

Closing this non-issue. Thanks

Elaniobro commented 3 years ago

@apiontek I thought so, hence my question for which version :P Glad you got it sorted! Please free free to post new issues/feature requests etc..