vicmora / MMM-GoogleMapsTraffic

A raspberry pi MagicMirror module that displays a map, centered at provided coordinates, with Google Maps Traffic information.
MIT License
88 stars 32 forks source link

Socket io issue #36

Open MMValue opened 4 years ago

MMValue commented 4 years ago

Hi Team, Question from a newbie :). My GoogleMapsTraffic was working fine. I have just install the MMM-Remote-Control module. There was an issue that I solve doing this: I replaced

// Private Methods
self.socket = io("/" + self.moduleName, {
    path: window.location.pathname + "socket.io"
});

with

// Private Methods
    self.socket = io("/" + self.moduleName);

in js/socketclient.js

My remote module now works well but my GoogleMapsTraffic module is not displayed anymore (I can run my MM and see the other modules). I have the following message in the console:

[2020-06-13 15:49:39.810] [ERROR] SyntaxError: Unexpected end of JSON input at JSON.parse () at Class.getStyleMap (/home/pi/MagicMirror/modules/MMM-GoogleMapsTraffic/node_helper.js:37:46) at Class.socketNotificationReceived (/home/pi/MagicMirror/modules/MMM-GoogleMapsTraffic/node_helper.js:22:52) at Socket. (/home/pi/MagicMirror/js/node_helper.js:113:11) at Socket.emit (events.js:200:13) at /home/pi/MagicMirror/node_modules/socket.io/lib/socket.js:528:12 at processTicksAndRejections (internal/process/task_queues.js:82:9) [2020-06-13 15:49:39.823] [LOG] MagicMirror will not quit, but it might be a good idea to check why this happened. Maybe no internet connection? [2020-06-13 15:49:39.825] [LOG] If you think this really is an issue, please open an issue o.

Any help appreciated !! Thanks !

MMValue commented 4 years ago

Still can't find the solution ... Please help me !!

MMValue commented 4 years ago

Guys ... HELPPPP