Elaniobro / MMM-nyc-transit

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

Repeated error for nyc-transit #60

Closed Nneuland closed 2 years ago

Nneuland commented 2 years ago

@Elaniobro

Hi there. I’ve had your great module working in the past, and I’ve been having some issues since a fresh install. Getting error repeated over and over,

socketNotificationReceived: “TRAIN_TABLE”: Array(2) MMM-nyc-transit.js:332 Uncaught TypeError: Cannot read property ‘fadeSpeed’ of undefined at Class.socketNotificationReceived (:8080/modules/MMM-ny…-nyc-transit.js:332) at module.js:245 at Socket. (socketclient.js:38) at Socket…/node_modules/component-emitter/index.js.Emitter.emit (socket.io.js:1915) at Socket.emit (socket.io.js:1544) at Socket.emitEvent (socket.io.js:1161) at Socket.onevent (socket.io.js:1135) at Socket.MMSocket.socket.onevent (socketclient.js:32) at Socket.onpacket (socket.io.js:1089) at Manager…/node_modules/component-emitter/index.js.Emitter.emit (socket.io.js:1915)

Any suggestions?

Thank you so much for your time and amazing module.

Nick

github-actions[bot] commented 2 years ago

Thank you for your feedback!' first issue

Elaniobro commented 2 years ago

@Nneuland; will you please post your config for the module here please?

Nneuland commented 2 years ago

I've posted this twice now.. I'm sorry

{ module: 'MMM-nyc-transit', position: "top_bar", header: "Next Train", config: { apiKey: 'xxxxxxxxxxx', displayType: 'list', mtaType: 'train', stations: [ { stationId: 629, walkingTime: 3, dir: { upTown: true, downTown: true, } }, { stationId: 177, walkingTime: 5, dir: { upTown: false, downTown: false } } ], updateInterval: 300000 } },

Elaniobro commented 2 years ago

@Nneuland, thank you. I see you were tacking on to a issue #56, is your issue the same as the one posted in there?

What version of MM are you running?

Nneuland commented 2 years ago

@Elaniobro, thanks for looking into this. Issue #56 had similar characteristics, (only header showing) but I believe the root cause was different. I was unable to determine the solution to issue #56.

I'm very new to this but started a new issue because the underlying cause appeared to be different.

Looking forward to heading from you and thanks again

Nick

Nneuland commented 2 years ago

Hi Elan

I forgot to tell you I am running Magicmirror version 2.17.1

Elaniobro commented 2 years ago

@Nneuland thanks for the update. I do not have a pi4, so I can't debug against it.

jackngai commented 2 years ago

I'm getting the exact same issue. Also on pi4. Will do some digging.

Nneuland commented 2 years ago

That would be amazing. I do not have know how to navigate. Would love to hear what you find.

On Wed, Nov 17, 2021 at 9:35 PM Jack Ngai @.***> wrote:

I'm getting the exact same issue. Also on pi4. Will do some digging.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Elaniobro/MMM-nyc-transit/issues/60#issuecomment-972461498, or unsubscribe https://github.com/notifications/unsubscribe-auth/AV4YKP4KK27RPJUJRAUFAW3UMRQ5HANCNFSM5FH6G6SQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

jackngai commented 2 years ago

Ok. I got it to work, but it's more of a hack at this point.

In line 332 of MMM-nyc-transit.js is where we reference "fadeSpeed", my search on that found it is a common property in many modules, like compliments.js (https://auth0.com/blog/dads-in-a-meeting-creating-a-smart-mirror/). Since it is not specified in this module, I tried adding it to the config file but it didn't work. So for now, I just replaced that variable with hard code of "10000" and it works. So this is how that line should look:

  this.updateDom(10000)

I will continue messing with it but at least it loads now after ~10 seconds.

jackngai commented 2 years ago

It's actually just a typo. Changing "self" to "this" in line 332 fixed the issue. Created a MR.

Nneuland commented 2 years ago

Oh wow!!!! Thank you so much!!!!

On Wed, Nov 17, 2021 at 10:27 PM Jack Ngai @.***> wrote:

It's actually just a typo. Changing "self" to "this" in line 332 fixed the issue. Created a MR.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Elaniobro/MMM-nyc-transit/issues/60#issuecomment-972485626, or unsubscribe https://github.com/notifications/unsubscribe-auth/AV4YKP754IN4LFWWVXRTC6TUMRXAZANCNFSM5FH6G6SQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

Elaniobro commented 2 years ago

@jackngai, @Nneuland, did the latest release resolve your issue(s)?

jackngai commented 2 years ago

Yup. Confirmed.

On Wed, Nov 24, 2021 at 11:17 AM Elan Trybuch @.***> wrote:

@jackngai https://github.com/jackngai, @Nneuland https://github.com/Nneuland, did the latest release resolve your issue(s)?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Elaniobro/MMM-nyc-transit/issues/60#issuecomment-978026482, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEATOF6NLUDJW522D5YS45DUNUF2JANCNFSM5FH6G6SQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

-- Jack C. Ngai www.jackngai.com

Nneuland commented 2 years ago

Yes! Thank you so much!

On Wed, Nov 24, 2021 at 11:17 AM Elan Trybuch @.***> wrote:

@jackngai https://github.com/jackngai, @Nneuland https://github.com/Nneuland, did the latest release resolve your issue(s)?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Elaniobro/MMM-nyc-transit/issues/60#issuecomment-978026482, or unsubscribe https://github.com/notifications/unsubscribe-auth/AV4YKP5HBUATX4DJY4RPL6DUNUF2JANCNFSM5FH6G6SQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

Elaniobro commented 2 years ago

61 fixed