-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Module stops with error message "userAgent must be a string" #71
Comments
I really don't know what the problem was. Thanks for coding it. |
Author of
The |
Hi.
I just installed a clean new version of MagicMirror, added this module (from the greenkeeper/hafas-client-5.1.1 branch) modified the example configuration with my own station ID and started MM.
But the module crashes with the following message:
[17:46:00.564] [ERROR] TypeError: userAgent must be a string
at createClient (/home/pi/MagicMirror/modules/MMM-PublicTransportHafas/node_modules/hafas-client/index.js:31:9)
at new HafasFetcher (/home/pi/MagicMirror/modules/MMM-PublicTransportHafas/core/HafasFetcher.js:29:24)
at Class.createFetcher (/home/pi/MagicMirror/modules/MMM-PublicTransportHafas/node_helper.js:31:17)
at Class.socketNotificationReceived (/home/pi/MagicMirror/modules/MMM-PublicTransportHafas/node_helper.js:17:14)
at Socket. (/home/pi/MagicMirror/js/node_helper.js:113:11)
at Socket.emit (events.js:198:13)
at /home/pi/MagicMirror/node_modules/socket.io/lib/socket.js:528:12
at process._tickCallback (internal/process/next_tick.js:61:11)
^Cevents.js:174
throw er; // Unhandled 'error' event
^
A can find the reason. The code seems to be ok. (hands over a static string to the method)
My configuration:
{
module: "MMM-PublicTransportHafas",
position: "bottom_right",
config: {
stationID: "00903736", // Replace with your stationID!
stationName: "Holzwickede Bahnhof", // Replace with your station name
direction: "", // Show only departures heading to this station. (A station ID.)
ignoredLines: [], // Which lines should be ignored? (comma-separated list of line names)
excludedTransportationTypes: ["bus"], // (comma-separated list of types) possible values: StN for tram, BuN for bus, s for suburban
timeToStation: 8, // How long do you need to walk to the next Station?
timeInFuture: 60,
showColoredLineSymbols: true, // Want colored line symbols?
useColorForRealtimeInfo: true, // Want colored real time information (timeToStation, early)?
showTableHeadersAsSymbols: true, // Table Headers as symbols or text?
maxUnreachableDepartures: 0, // How many unreachable departures should be shown?
maxReachableDepartures: 7, // How many reachable departures should be shown?
customLineStyles: "", // Prefix for the name of the custom css file. ex: Leipzig-lines.css (case sensitive)
showOnlyLineNumbers: false // Display only the line number instead of the complete name, i. e. "11" instead of "STR 11"
}
},
I did the following:
git clone ....
git checkout greenkeeper/hafas-client-5.1.1
npm install
Master didn't compile with version conflicts.
When i disable the module MM starts and runs normally.
Any idea?
Thanks in advance.
The text was updated successfully, but these errors were encountered: