Read the statement by Michael Teeuw here.
Transit module stopped working
-
Hello,
I have been successfully using the MMM-nyc-transit module the past few weeks without issue but it stopped working yesterday morning. This is the only module in my mirror that is having an issue and it seemed to start randomly. I’ve tried reinstalling the module on a fresh image of MM but the module still did not work. While config check has returned no errors, npm logs reveal this issue. Could someone please help me to decipher the error and work towards a resolution? ```
pi@raspberrypi:~ $ pm2 logs mm [TAILING] Tailing last 15 lines for [mm] process (change the value with --lines option) /home/pi/.pm2/logs/mm-error.log last 15 lines: 0|mm | [2020-06-30 09:41:59.974] [ERROR] (node:882) UnhandledPromiseRejectionWarning: Error: Error: Illegal group end indicator for Message .transit_realtime.FeedMessage: 7 (not a group) 0|mm | at /home/pi/MagicMirror/modules/MMM-nyc-transit/node_helper.js:106:15 0|mm | at processTicksAndRejections (internal/process/task_queues.js:89:5) 0|mm | [2020-06-30 09:41:59.976] [ERROR] (node:882) 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(). (rejection id: 6) 0|mm | [2020-06-30 09:41:59.977] [ERROR] (node:882) 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(). (rejection id: 6) 0|mm | [2020-06-30 19:35:25.557] [ERROR] (node:1466) UnhandledPromiseRejectionWarning: Error: Error: Illegal wire type for unknown field 13 in Message .transit_realtime.FeedMessage#decode: 6 0|mm | at /home/pi/MagicMirror/modules/MMM-nyc-transit/node_helper.js:106:15 0|mm | at processTicksAndRejections (internal/process/task_queues.js:89:5) 0|mm | [2020-06-30 19:35:25.567] [ERROR] (node:1466) UnhandledPromiseRejectionWarning: Error: Error: Illegal wire type for unknown field 13 in Message .transit_realtime.FeedMessage#decode: 6 0|mm | at /home/pi/MagicMirror/modules/MMM-nyc-transit/node_helper.js:106:15 0|mm | at processTicksAndRejections (internal/process/task_queues.js:89:5) 0|mm | [2020-06-30 19:35:25.573] [ERROR] (node:1466) 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(). (rejection id: 1) 0|mm | [2020-06-30 19:35:25.581] [ERROR] (node:1466) 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(). (rejection id: 1) 0|mm | [2020-06-30 19:35:25.584] [ERROR] (node:1466) [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. 0|mm | [2020-06-30 19:35:25.586] [ERROR] (node:1466) [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.Thank you.
-
It also doesn’t work for me either, but my logs are empty :(
You can see the “Next Train” at the top but no trains.

-
Thanks for the reply. I guess it’s nice knowing I’m not the only one having trouble. Did you just install it or were you using it beforehand?
Here’s this project’s config for whatever it’s worth.
/* Magic Mirror Config Sample * * By Michael Teeuw http://michaelteeuw.nl * MIT Licensed. * * For more information on how you can configure this file * See https://github.com/MichMich/MagicMirror#configuration * */ var config = { address: "localhost", // Address to listen on, can be: // - "localhost", "127.0.0.1", "::1" to listen on loopback interface // - another specific IPv4/6 to listen on a specific interface // - "0.0.0.0", "::" to listen on any interface // Default, when address config is left out or empty, is "localhost" port: 8080, ipWhitelist: ["127.0.0.1", "::ffff:127.0.0.1", "::1"], // Set [] to allow all IP addresses // or add a specific IPv4 of 192.168.1.5 : // ["127.0.0.1", "::ffff:127.0.0.1", "::1", "::ffff:192.168.1.5"], // or IPv4 range of 192.168.3.0 --> 192.168.3.15 use CIDR format : // ["127.0.0.1", "::ffff:127.0.0.1", "::1", "::ffff:192.168.3.0/28"], useHttps: false, // Support HTTPS or not, default "false" will use HTTP httpsPrivateKey: "", // HTTPS private key path, only require when useHttps is true httpsCertificate: "", // HTTPS Certificate path, only require when useHttps is true language: "en", timeFormat: 12, units: "imperial", // serverOnly: true/false/"local" , // local for armv6l processors, default // starts serveronly and then starts chrome browser // false, default for all NON-armv6l devices // true, force serveronly mode, because you want to.. no UI on this device modules: [ { module: "alert", }, { module: "clock", position: "top_left" }, { module: "calendar_monthly", position: "top_left", config: { // The config property is optional // Without a config, a default month view is shown // Please see the 'Configuration Options' section for more information } }, { module: "MMM-TimeTreeEvent",//Positions of *_bar and *_third are not support. position: "top_left", config: { appid: "calendarapi",//You need to get the target calender id with Get calender id api[1] calenderid: "calendarid", } }, { module: "MMM-Events", position: "top_left", config: { city: "New York",// Your City eventType: "performing_arts,conference_convention,festivals_parades,movies_film,food,fundraisers,support,book,music_alternative,music_dance,music_jazz,music_reggae,music_vocal,music_rap_hiphop,music_rock,music_pop,music_country,", when: "This Week",// "All", "Future", "Past", "Today", "Last Week", "This Week", "Next week", and months by name, e.g. "October" mode: "noFrame",// "Frame" or "noFrame" (around picture) apikey: "eventsapi", rotateInterval: 1 * 11 * 1000,// New Event Appears every 5 minutes useHeader: false,// Set to true if you want a header header: "", animationSpeed: 3000,// Event fades in and out picture: true,// true, false = no image } }, { module: "MMM-TwitterTrendsByPlace", position: "bottom_right", config: { // visit the url below for the twitter keys/tokens // https://dev.twitter.com/oauth/overview/application-owner-access-tokens consumer_key: "twitterapi", consumer_secret: "twitterapi", access_token_key: "twitterapi", access_token_secret: "twitterapi",//set the display name/title for the place placeName: "New York, NY",// set the woeid for the place, see documentation for more// http://woeid.rosselliot.co.nz/lookup/ placeWoeid: "2459115", } }, { module: "MMM-nyc-transit", position: "bottom_left", header: "Next Train", config: { apiKey: "mytransitapi", displayType: "list", mtaType: "train", stations: [ { stationId: 476, walkingTime: 0, dir: { upTown:true, downTown: false } }, ], updateInterval: 300000 } }, { module: "MMM-MTA", position: "bottom_left", header: "MTA", config: { lines: ["123", "BDFM", "456", "NQR", "ACE"], showDelaysOnly: false, delayAlertFlash: true, fetchInterval: 60000 } }, { module: "currentweather", position: "top_right", config: { location: "New York", locationID: "", //ID from http://bulk.openweathermap.org/sample/city.list.json.gz; unzip the gz file and find your city appid: "myweatherapi" } }, { module: "weatherforecast", position: "top_right", header: "Weather Forecast", config: { location: "New York", locationID: "5128581", //ID from http://bulk.openweathermap.org/sample/city.list.json.gz; unzip the gz file and find your city appid: "myweatherapi" } }, { module: "weatherforecast", position: "top_right", header: "Weather Forecast", config: { location: "Asbury Park, NJ", locationID: "5095281", //ID from http://bulk.openweathermap.org/sample/city.list.json.gz; unzip the gz file and find your city appid: "myweatherapi" } }, { module: "newsfeed", position: "lower_third", config: { feeds: [ { title: "New York Times", url: "http://www.nytimes.com/services/xml/rss/nyt/HomePage.xml" }, { title: "CNN", url: "http://rss.cnn.com/rss/cnn_topstories.rss" }, { title: "BBC", url: "http://feeds.bbci.co.uk/news/world/us_and_canada/rss.xml" }, { title: "NBC", url: "http://feeds.nbcnews.com/nbcnews/public/news" }, { title: "Time News", url: "https://time.com/newsfeed/feed/" }, ], showSourceTitle: true, showPublishDate: true, broadcastNewsFeeds: true, broadcastNewsUpdates: true } }, ] }; /*************** DO NOT EDIT THE LINE BELOW ***************/ if (typeof module !== "undefined") {module.exports = config;} -
@nipper2000h looks like a data change from the provider API
2020-06-30 09:41:59.974] [ERROR] (node:882) UnhandledPromiseRejectionWarning: Error: Error: Illegal group end indicator for Message .transit_realtime.FeedMessage: 7 (not a group) 0|mm | at /home/pi/MagicMirror/modules/MMM-nyc-transit/node_helper.js:106:15 -
@sdetweil Thank you for the info. You helped me out the first time I had an issue too, I’m very appreciative of your help once again. Does that mean the next step is too hope the contributor releases an update?
-
@nipper2000h yes, probably. I would post an issue to the module GitHub page to inform them
-
@sdetweil Thanks again.
-
@sdetweil what makes you think the API changed? ( I am the author, and am looking into it now)
-
@Elaniobro I posted a couple messages back the error info. node_helper line 106 called something which threw an error
2020-06-30 09:41:59.974] [ERROR] (node:882) UnhandledPromiseRejectionWarning: Error: Error: Illegal group end indicator for Message .transit_realtime.FeedMessage: 7 (not a group) 0|mm | at /home/pi/MagicMirror/modules/MMM-nyc-transit/node_helper.js:106:15 -
@sdetweil how did you get to error message? What’s the CLI?
-
@elliob it was in the pm2 log in the 1st post of this topic
-
@elliob I’m using pm2 to start MM so from the root directory:
pm2 logs mm -
@nipper2000h the logs are stored in the users .pm2 folder. doesn’t matter where I issue the pm2 commands
-
The module is getting the data, but its not updating with the
this.updateDommethod. I am not sure if this was deprecated or not. Looking into it. -
@Elaniobro how does it use this.updateDom()
-
@sdetweil Its called in the
socketNotificationReceived()here:
https://github.com/Elaniobro/MMM-nyc-transit/blob/master/MMM-nyc-transit.js#L358-L360 -
@Elaniobro where is self set.? and fadeSpeed?
-
@sdetweil They aren’t, they can be removed. Issue I am seeing is the payload is not populated indo the
getDom()I am setting
this.result = payloadwhich on intitial load/start of the module is undefined, which is expected, since the API promise has not been fulfilled. Later on, thesocketNotificationReceived()recieves apayloadwhich is set tothis.resultbut in thegetDom()var data = this.resultis never updated.I am unsure of where/what caused this breakdown, as last time I touched the code was Apr 30. This is leading me to believe something changed in Core, but I am unaware of what that might be.
-
@Elaniobro are u debugging w the developers window?
you can walk thru the code as it executes
ctrl-shift-i and select the sources tab, use the tree on the left to find your module, and it’s sourcethen click the left edge of a line of code u want to examine, and a stop will be added.
usually a problem like this is because the ‘this.’ pointer doesn’t point where u think it does.
sorry, I am in hospital for a few more days and cannot debug from here
-
@sdetweil Thank you for your feedback. I am/was already debugging in the manner you mentioned. I was able to resolve the bug(s), but now I am still not seeing any data. My best guess is somewhere along the fetch of the data something changed or broke. The application is returning data, but the response is empty.
payload = [{ downTown: [] }, { upTown: [] }]For some reason, just not getting any data :/
I am still digging in.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login