Elaniobro / MMM-nyc-transit

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

[🐛 BUG] - Data fetch erroring out #106

Open rakeshavi opened 1 month ago

rakeshavi commented 1 month ago

Describe the bug Loading the MTA module on the Mirror seems to throw the following error and the MTA block on the mirror stays black.

To Reproduce Steps to reproduce the behavior:

  1. Go to 'MagicMirror Module'
  2. Start Server
  3. Wait a couples of mins (update interval) for the Module to talk to the MTA API / Feed (This seems to be happening
  4. See error

Expected behavior Get the update of the train timing

Actual behavior

[ERROR] (node:88236) UnhandledPromiseRejectionWarning: Error: Error: invalid wire type 4 at offset 1
    at /Users/avirakesh/Programming/MagicMirror/modules/MMM-nyc-transit/node_helper.js:187:15
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5) 
[2024-09-13 16:25:03.876] [ERROR] (node:88236) 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) 
[2024-09-13 16:26:03.856] [ERROR] (node:88236) UnhandledPromiseRejectionWarning: Error: Error: invalid wire type 4 at offset 1
    at /Users/avirakesh/Programming/MagicMirror/modules/MMM-nyc-transit/node_helper.js:187:15
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5) 
[2024-09-13 16:26:03.856] [ERROR] (node:88236) 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: 3) 
[2024-09-13 16:27:03.866] [ERROR] (node:88236) UnhandledPromiseRejectionWarning: Error: Error: invalid wire type 4 at offset 1
    at /Users/avirakesh/Programming/MagicMirror/modules/MMM-nyc-transit/node_helper.js:187:15
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5) 
[2024-09-13 16:27:03.866] [ERROR] (node:88236) 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: 4) 
[2024-09-13 16:28:03.850] [ERROR] (node:88236) UnhandledPromiseRejectionWarning: Error: Error: invalid wire type 4 at offset 1
    at /Users/avirakesh/Programming/MagicMirror/modules/MMM-nyc-transit/node_helper.js:187:15
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5) 
[2024-09-13 16:28:03.850] [ERROR] (node:88236) 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: 5) 

Screenshots If applicable, add screenshots to help explain your problem. image

Platform (please complete the following information):

Configuration What does the used config.js file look like? Don't forget to remove any sensitive information!

{
            module: 'MMM-nyc-transit',
            position: "top_right",
            header: "Next Train",
            config: {
            //   apiKey: 'YOUR_KEY_HERE',
            //   displayType: 'list',
              mtaType: 'train',
              stations: [
                {
                  stationId: 223,
                  walkingTime: 5,
                  dir: {
                      upTown: false,
                      downTown: true
                  }
                },
                {
                    // 59th
                    stationId: 613,
                    walkingTime: 10,
                    dir: {
                        upTown: true,
                        downTown: true
                    }
                }
              ],
              updateInterval: 300000
            }
        },

Additional context Add any other context about the problem here.