MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    1. Home
    2. jthirasilpa
    3. Posts
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.
    J
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 1
    • Posts 29
    • Groups 0

    Posts

    Recent Best Controversial
    • RE: MMM-NetworkScanner-loading...indefinitely

      Thanks - see error log below

      [22:23:34.736] [ERROR] ReferenceError: options is not defined
      at Class.scanNetworkMAC (/home/jojo/MagicMirror/modules/MMM-NetworkScanner/node_helper.js:42:54)
      at Class.socketNotificationReceived (/home/jojo/MagicMirror/modules/MMM-NetworkScanner/node_helper.js:29:18)
      at Socket. (/home/jojo/MagicMirror/js/node_helper.js:113:11)
      at Socket.emit (events.js:198:13)
      at /home/jojo/MagicMirror/node_modules/socket.io/lib/socket.js:528:12
      at process._tickCallback (internal/process/next_tick.js:61:11)
      [22:24:03.590] [ERROR] TypeError: Cannot read property ‘network’ of undefined
      at Class.scanNetworkMAC (/home/jojo/MagicMirror/modules/MMM-NetworkScanner/node_helper.js:45:36)
      at Class.socketNotificationReceived (/home/jojo/MagicMirror/modules/MMM-NetworkScanner/node_helper.js:29:18)
      at Socket. (/home/jojo/MagicMirror/js/node_helper.js:113:11)
      at Socket.emit (events.js:198:13)
      at /home/jojo/MagicMirror/node_modules/socket.io/lib/socket.js:528:12
      at process._tickCallback (internal/process/next_tick.js:61:11)
      [22:24:05.534] [ERROR] TypeError: Cannot read property ‘network’ of undefined
      at Class.scanNetworkMAC (/home/jojo/MagicMirror/modules/MMM-NetworkScanner/node_helper.js:45:36)
      at Class.socketNotificationReceived (/home/jojo/MagicMirror/modules/MMM-NetworkScanner/node_helper.js:29:18)
      at Socket. (/home/jojo/MagicMirror/js/node_helper.js:113:11)
      at Socket.emit (events.js:198:13)
      at /home/jojo/MagicMirror/node_modules/socket.io/lib/socket.js:528:12
      at process._tickCallback (internal/process/next_tick.js:61:11)

      posted in Troubleshooting
      J
      jthirasilpa
    • RE: MMM-NetworkScanner-loading...indefinitely

      @sdetweil said in MMM-NetworkScanner-loading...indefinitely:

      var options = {
      cachePassword: true,
      prompt: 'Password, ??? '; // put your password where ??? are (notice the quotes around)
      }

      Thanks - tried that. Got the following log:

      0|mm  | WARNING! Could not validate config file. Starting with default configuration. Please correct syntax errors at or above this line: /home/jojo/MagicMirror/modules/MMM-NetworkScanner/node_helper.js:43
      0|mm  |     prompt: 'Password, mypassword';     // put your password where ???? are (notice the quotes around)
      0|mm  |                               ^
      0|mm  | SyntaxError: Unexpected token ;
      0|mm  |     at Module._compile (internal/modules/cjs/loader.js:723:23)
      0|mm  |     at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
      0|mm  |     at Module.load (internal/modules/cjs/loader.js:653:32)
      0|mm  |     at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
      0|mm  |     at Function.Module._load (internal/modules/cjs/loader.js:585:3)
      0|mm  |     at Module.require (internal/modules/cjs/loader.js:692:17)
      0|mm  |     at require (internal/modules/cjs/helpers.js:25:18)
      0|mm  |     at loadModule (/home/jojo/MagicMirror/js/app.js:132:17)
      0|mm  |     at loadNextModule (/home/jojo/MagicMirror/js/app.js:166:5)
      0|mm  |     at /home/jojo/MagicMirror/js/app.js:168:6
      
      posted in Troubleshooting
      J
      jthirasilpa
    • RE: MMM-NetworkScanner-loading...indefinitely

      Maybe some progress?

      So I amended the insertion as follows:

      sudo.setPassword = ('your-password');      // add this line, edit to use your password
      

      Config loads, but NetworkScanner module still shows “loading…”

      Error logs as follows:

      0|mm       |     at Socket.emit (events.js:198:13)
      0|mm       |     at /home/jojo/MagicMirror/node_modules/socket.io/lib/socket.js:528:12
      0|mm       |     at process._tickCallback (internal/process/next_tick.js:61:11)
      0|mm       | [21:26:17.270] [ERROR]  (node:1940) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 error listeners added. Use emitter.setMaxListeners() to increase limit
      0|mm       | [21:26:17.271] [ERROR]  (node:1940) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 end listeners added. Use emitter.setMaxListeners() to increase limit
      0|mm       | [21:26:17.272] [ERROR]  (node:1940) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 drain listeners added. Use emitter.setMaxListeners() to increase limit
      0|mm       | [21:26:17.272] [ERROR]  (node:1940) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 close listeners added. Use emitter.setMaxListeners() to increase limit
      0|mm       | [21:26:17.272] [ERROR]  (node:1940) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 data listeners added. Use emitter.setMaxListeners() to increase limit
      0|mm       | [21:26:26.569] [ERROR]  TypeError: Cannot read property 'network' of undefined
      0|mm       |     at Class.scanNetworkMAC (/home/jojo/MagicMirror/modules/MMM-NetworkScanner/node_helper.js:42:36)
      0|mm       |     at Class.socketNotificationReceived (/home/jojo/MagicMirror/modules/MMM-NetworkScanner/node_helper.js:30:18)
      0|mm       |     at Socket.<anonymous> (/home/jojo/MagicMirror/js/node_helper.js:113:11)
      0|mm       |     at Socket.emit (events.js:198:13)
      0|mm       |     at /home/jojo/MagicMirror/node_modules/socket.io/lib/socket.js:528:12
      0|mm       |     at process._tickCallback (internal/process/next_tick.js:61:11)
      
      /home/jojo/.pm2/logs/mm-out.log last 15 lines:
      0|mm       | [21:26:18.772] [LOG]    Connecting socket for: MMM-UKNationalRail
      0|mm       | [21:26:18.772] [LOG]    MMM-UKNationalRail helper started ...
      0|mm       | [21:26:18.773] [LOG]    Connecting socket for: MMM-NetworkScanner
      0|mm       | [21:26:18.773] [LOG]    Starting module: MMM-NetworkScanner
      0|mm       | [21:26:18.773] [LOG]    Sockets connected & modules started ...
      0|mm       | [21:26:18.774] [LOG]
      0|mm       | Ready to go! Please point your browser to: http://0.0.0.0:8080
      0|mm       | [21:26:26.567] [LOG]    MMM-NetworkScanner received SCAN_NETWORK
      0|mm       | [21:26:26.568] [LOG]    MMM-NetworkScanner is performing arp-scan
      0|mm       | [21:26:26.569] [LOG]    Whoops! There was an uncaught exception...
      0|mm       | [21:26:26.575] [LOG]    MagicMirror will not quit, but it might be a good idea to check why this happened. Maybe no internet connection?
      0|mm       | [21:26:26.576] [LOG]    If you think this really is an issue, please open an issue on GitHub: https://github.com/MichMich/MagicMirror/issues
      0|mm       | [21:26:29.340] [LOG]    Create new news fetcher for url: http://www.nytimes.com/services/xml/rss/nyt/HomePage.xml - Interval: 300000
      0|mm       | [21:26:29.375] [LOG]    Create new news fetcher for url: http://rss.cnn.com/rss/edition.rss - Interval: 300000
      0|mm       | [21:26:29.441] [LOG]    MMM-NetworkScanner received CONFIG
      posted in Troubleshooting
      J
      jthirasilpa
    • RE: MMM-NetworkScanner-loading...indefinitely

      Thanks Sam - I made that modification in node_helper.js in the module’s directory with my password.

      I get the following errors from the logs:

      0|mm  | [21:06:46.210] [ERROR]  WARNING! Could not load config file. Starting with default configuration. Error found: TypeError: sudo.setPassword is not a function
      
        0|mm  | [21:06:46.216] [ERROR]
      0|mm  | TypeError: sudo.setPassword is not a function
      0|mm  |     at Object.<anonymous> (/home/jojo/MagicMirror/modules/MMM-NetworkScanner/node_helper.js:13:6)
      0|mm  |     at Module._compile (internal/modules/cjs/loader.js:778:30)
      0|mm  |     at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
      0|mm  |     at Module.load (internal/modules/cjs/loader.js:653:32)
      0|mm  |     at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
      0|mm  |     at Function.Module._load (internal/modules/cjs/loader.js:585:3)
      0|mm  |     at Module.require (internal/modules/cjs/loader.js:692:17)
      0|mm  |     at require (internal/modules/cjs/helpers.js:25:18)
      0|mm  |     at loadModule (/home/jojo/MagicMirror/js/app.js:132:17)
      0|mm  |     at loadNextModule (/home/jojo/MagicMirror/js/app.js:166:5)
      
      posted in Troubleshooting
      J
      jthirasilpa
    • RE: MMM-NetworkScanner-loading...indefinitely

      Thanks.

      Whenever it shows up, it is contiguous to the MMM-NetworkScanner received CONFIG reading in the log. When this module is added, npm install adds the “sudo” dependency - I assume that this is what is sending the message, but do not know how to confirm?

      posted in Troubleshooting
      J
      jthirasilpa
    • MMM-NetworkScanner-loading...indefinitely

      Re: MMM-NetWorkScanner

      I have run config:check and indicates no issue with the config.js syntax, but cannot get the networkscanner module to load.

      Here is the code from config.js: (note there is a missing { that dropped off code below)

                              module:                 "MMM-NetworkScanner",
                              position:               "bottom_center",
                              header:                 "Devices Online",
                              config: {
                                      devices: [
                                      { ipAddress: "192.168.1.11", name: "ABC", icon: "server"},
                                      { ipAddress:  "192.168.1.17", name:  "DEF", icon:  "server"},
                                      { ipAddress:  "192.168.1.133", name: "GHI,", icon: "mobile" },
                                      ],
                                      showUnknown: false,
                                      showOffline:  true,
                                      keepAlive:  600,
                                      showLastSeen:  true,
                                      updateInterval:  30
                                      }
                      },
      
      pm2 logs mm gives the following output:
      
      ```0|mm       |     at process._tickCallback (internal/process/next_tick.js:61:11)
      0|mm       | [20:12:56.567] [ERROR]  TypeError: Cannot read property 'network' of undefined
      0|mm       |     at Class.scanNetworkMAC (/home/jojo/MagicMirror/modules/MMM-NetworkScanner/node_helper.js:42:36)
      0|mm       |     at Class.socketNotificationReceived (/home/jojo/MagicMirror/modules/MMM-NetworkScanner/node_helper.js:30:18)
      0|mm       |     at Socket.<anonymous> (/home/jojo/MagicMirror/js/node_helper.js:113:11)
      0|mm       |     at Socket.emit (events.js:198:13)
      0|mm       |     at /home/jojo/MagicMirror/node_modules/socket.io/lib/socket.js:528:12
      0|mm       |     at process._tickCallback (internal/process/next_tick.js:61:11)
      0|mm       | [20:13:26.570] [ERROR]  TypeError: Cannot read property 'network' of undefined
      0|mm       |     at Class.scanNetworkMAC (/home/jojo/MagicMirror/modules/MMM-NetworkScanner/node_helper.js:42:36)
      0|mm       |     at Class.socketNotificationReceived (/home/jojo/MagicMirror/modules/MMM-NetworkScanner/node_helper.js:30:18)
      0|mm       |     at Socket.<anonymous> (/home/jojo/MagicMirror/js/node_helper.js:113:11)
      0|mm       |     at Socket.emit (events.js:198:13)
      0|mm       |     at /home/jojo/MagicMirror/node_modules/socket.io/lib/socket.js:528:12
      0|mm       |     at process._tickCallback (internal/process/next_tick.js:61:11)
      
      /home/jojo/.pm2/logs/mm-out.log last 15 lines:
      0|mm       | [20:15:28.523] [LOG]    Connecting socket for: updatenotification
      0|mm       | [20:15:28.524] [LOG]    Connecting socket for: newsfeed
      0|mm       | [20:15:28.525] [LOG]    Starting module: newsfeed
      0|mm       | [20:15:28.525] [LOG]    Connecting socket for: MMM-UKNationalRail
      0|mm       | [20:15:28.525] [LOG]    MMM-UKNationalRail helper started ...
      0|mm       | [20:15:28.526] [LOG]    Connecting socket for: MMM-NetworkScanner
      0|mm       | [20:15:28.526] [LOG]    Starting module: MMM-NetworkScanner
      0|mm       | [20:15:28.527] [LOG]    Sockets connected & modules started ...
      0|mm       | [20:15:28.527] [LOG]
      0|mm       | Ready to go! Please point your browser to: http://0.0.0.0:8080
      0|mm       | [20:15:37.883] [LOG]    Create new news fetcher for url: http://www.nytimes.com/services/xml/rss/nyt/HomePage.xml - Interval: 300000
      0|mm       | [20:15:37.917] [LOG]    Create new news fetcher for url: http://rss.cnn.com/rss/edition.rss - Interval: 300000
      0|mm       | [20:15:37.985] [LOG]    MMM-NetworkScanner received CONFIG
      0|mm       | sudo requires your password: [20:18:51.080] [LOG]    Use existing news fetcher for url: http://www.nytimes.com/services/xml/rss/nyt/HomePage.xml
      0|mm       | [20:18:51.087] [LOG]    Use existing news fetcher for url: http://rss.cnn.com/rss/edition.rss
      

      Suggestions appreciated.

      posted in Troubleshooting
      J
      jthirasilpa
    • RE: updated installer script available for testing

      @sdetweil Thanks for your help in getting my installation sorted out Sam.

      posted in Troubleshooting
      J
      jthirasilpa
    • RE: updated installer script available for testing

      @sdetweil Thanks. The RP is running a full desktop - if I run npm start directly from the RP, the debug log gives the following output:

      0 info it worked if it ends with ok
      1 verbose cli [ ‘/usr/bin/node’, ‘/usr/bin/npm’, ‘start’ ]
      2 info using npm@6.13.4
      3 info using node@v10.18.1
      4 verbose run-script [ ‘prestart’, ‘start’, ‘poststart’ ]
      5 info lifecycle magicmirror@2.10.1~prestart: magicmirror@2.10.1
      6 info lifecycle magicmirror@2.10.1~start: magicmirror@2.10.1
      7 verbose lifecycle magicmirror@2.10.1~start: unsafe-perm in lifecycle true
      8 verbose lifecycle magicmirror@2.10.1~start: PATH: /usr/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/home/jojo/MagicMirror/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games
      9 verbose lifecycle magicmirror@2.10.1~start: CWD: /home/jojo/MagicMirror
      10 silly lifecycle magicmirror@2.10.1~start: Args: [ ‘-c’, ‘./run-start.sh’ ]
      11 silly lifecycle magicmirror@2.10.1~start: Returned: code: 1 signal: null
      12 info lifecycle magicmirror@2.10.1~start: Failed to exec start script
      13 verbose stack Error: magicmirror@2.10.1 start: ./run-start.sh
      13 verbose stack Exit status 1
      13 verbose stack at EventEmitter. (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:332:16)
      13 verbose stack at EventEmitter.emit (events.js:198:13)
      13 verbose stack at ChildProcess. (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
      13 verbose stack at ChildProcess.emit (events.js:198:13)
      13 verbose stack at maybeClose (internal/child_process.js:982:16)
      13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
      14 verbose pkgid magicmirror@2.10.1
      15 verbose cwd /home/jojo/MagicMirror
      16 verbose Linux 4.19.75-v7+
      17 verbose argv “/usr/bin/node” “/usr/bin/npm” “start”
      18 verbose node v10.18.1
      19 verbose npm v6.13.4
      20 error code ELIFECYCLE
      21 error errno 1
      22 error magicmirror@2.10.1 start: ./run-start.sh
      22 error Exit status 1
      23 error Failed at the magicmirror@2.10.1 start script.
      23 error This is probably not a problem with npm. There is likely additional logging output above.
      24 verbose exit [ 1, true ]

      posted in Troubleshooting
      J
      jthirasilpa
    • RE: updated installer script available for testing

      Hi - firstly thanks for putting together this installer!

      I am running Raspbian on RP3b+ as a fresh install using the command

      curl -sL https://raw.githubusercontent.com/sdetweil/MagicMirror_scripts/master/raspberry.sh | bash

      Installer indicated successful install of MagicMirror.

      Using SSH DISPLAY=:0 npm start gives the following error:

      magicmirror@2.10.1 start /home/jojo/MagicMirror
      ./run-start.sh

      No protocol specified

      (electron:17801): Gtk-WARNING **: 18:36:26.218: cannot open display: :0
      npm ERR! code ELIFECYCLE
      npm ERR! errno 1
      npm ERR! magicmirror@2.10.1 start: ./run-start.sh
      npm ERR! Exit status 1
      npm ERR!
      npm ERR! Failed at the magicmirror@2.10.1 start script.
      npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

      npm ERR! A complete log of this run can be found in:
      npm ERR! /home/jojo/.npm/_logs/2020-01-25T18_36_26_308Z-debug.log

      Debug log contents are as follows:

      0 info it worked if it ends with ok
      1 verbose cli [ ‘/usr/bin/node’, ‘/usr/bin/npm’, ‘start’ ]
      2 info using npm@6.13.4
      3 info using node@v10.18.1
      4 verbose run-script [ ‘prestart’, ‘start’, ‘poststart’ ]
      5 info lifecycle magicmirror@2.10.1~prestart: magicmirror@2.10.1
      6 info lifecycle magicmirror@2.10.1~start: magicmirror@2.10.1
      7 verbose lifecycle magicmirror@2.10.1~start: unsafe-perm in lifecycle true
      8 verbose lifecycle magicmirror@2.10.1~start: PATH: /usr/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/home/jojo/MagicMirror/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games
      9 verbose lifecycle magicmirror@2.10.1~start: CWD: /home/jojo/MagicMirror
      10 silly lifecycle magicmirror@2.10.1~start: Args: [ ‘-c’, ‘./run-start.sh’ ]
      11 silly lifecycle magicmirror@2.10.1~start: Returned: code: 1 signal: null
      12 info lifecycle magicmirror@2.10.1~start: Failed to exec start script
      13 verbose stack Error: magicmirror@2.10.1 start: ./run-start.sh
      13 verbose stack Exit status 1
      13 verbose stack at EventEmitter. (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:332:16)
      13 verbose stack at EventEmitter.emit (events.js:198:13)
      13 verbose stack at ChildProcess. (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
      13 verbose stack at ChildProcess.emit (events.js:198:13)
      13 verbose stack at maybeClose (internal/child_process.js:982:16)
      13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
      14 verbose pkgid magicmirror@2.10.1
      15 verbose cwd /home/jojo/MagicMirror
      16 verbose Linux 4.19.75-v7+
      17 verbose argv “/usr/bin/node” “/usr/bin/npm” “start”
      18 verbose node v10.18.1
      19 verbose npm v6.13.4
      20 error code ELIFECYCLE
      21 error errno 1
      22 error magicmirror@2.10.1 start: ./run-start.sh
      22 error Exit status 1
      23 error Failed at the magicmirror@2.10.1 start script.
      23 error This is probably not a problem with npm. There is likely additional logging output above.
      24 verbose exit [ 1, true ]

      Any thoughts on how to troubleshoot? Many thanks.

      posted in Troubleshooting
      J
      jthirasilpa
    • 1
    • 2
    • 3
    • 3 / 3