Read the statement by Michael Teeuw here.
PM2 status online, but mirror doesn't start
-
Fresh install on a Pi 3 B+ using Sam’s install script (thank you - I particularly like the boot splash screen).
pm2 status shows the MagicMirror application as online, however no mirror appears on the screen. Browsing from another machine to http://ip:8080 gives connection_refused.
pm2 (red coloured) logs below:
0|MagicMirror | [06.10.2023 09:53.38.255] [ERROR] (node:1992) UnhandledPromiseRejectionWarning: /home/pi/MagicMirror/modules/MMM-MyCommute/node_modules/jsbn/index.js:647 0|MagicMirror | function 0|MagicMirror | 0|MagicMirror | SyntaxError: Unexpected end of input 0|MagicMirror | at internalCompileFunction (node:internal/vm:73:18) 0|MagicMirror | at wrapSafe (node:internal/modules/cjs/loader:1185:20) 0|MagicMirror | at Module._compile (node:internal/modules/cjs/loader:1227:27) 0|MagicMirror | at Object..js (node:internal/modules/cjs/loader:1326:10) 0|MagicMirror | at Module.load (node:internal/modules/cjs/loader:1126:32) 0|MagicMirror | at node:internal/modules/cjs/loader:967:12 0|MagicMirror | at Function._load (node:electron/js2c/asar_bundle:2:13327) 0|MagicMirror | at Module.require (node:internal/modules/cjs/loader:1150:19) 0|MagicMirror | at require (node:internal/modules/cjs/helpers:110:18) 0|MagicMirror | at Object.<anonymous> (/home/pi/MagicMirror/modules/MMM-MyCommute/node_modules/ecc-jsbn/lib/ec.js:6:18) 0|MagicMirror | at Module._compile (node:internal/modules/cjs/loader:1271:14) 0|MagicMirror | at Object..js (node:internal/modules/cjs/loader:1326:10) 0|MagicMirror | at Module.load (node:internal/modules/cjs/loader:1126:32) 0|MagicMirror | at node:internal/modules/cjs/loader:967:12 0|MagicMirror | at Function._load (node:electron/js2c/asar_bundle:2:13327) 0|MagicMirror | at Module.require (node:internal/modules/cjs/loader:1150:19) 0|MagicMirror | (Use `electron --trace-warnings ...` to show where the warning was created) 0|MagicMirror | [06.10.2023 09:53.38.256] [ERROR] (node:1992) 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(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1) 0|MagicMirror | [1992:1006/095338.666307:ERROR:object_proxy.cc(590)] Failed to call method: org.freedesktop.portal.Settings.Read: object_path= /org/freedesktop/portal/desktop: org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.portal.Desktop was not provided by any .service files 0|MagicMirror | MESA-LOADER: failed to retrieve device information
Anyone spot anything obvious I can look in to?
The pi has been acting odd since the fresh install - SSH tunnel freezing and not even responding to pings. :worried_face:
Thanks in advance,
Matt -
Solution:
pm2 stop all
cd ~/MagicMirror
npm startPay attention to logs. In my case one of the modules was throwing an error. I removed the module folder, re-cloned it (including required npm install within the module folder) and then restarted the application with pm2 start MagicMirror.
-
@matt216 do this
pm2 stop all cd ~/MagicMirror npm start
I suspect this
https://forum.magicmirror.builders/topic/15778/fix-for-black-screen-in-2-16-and-later
-
@sdetweil ok and we’re back in and working :)
the npm start generated a few errors relating to a particular module…
[06.10.2023 14:10.39.752] [ERROR] (node:2973) UnhandledPromiseRejectionWarning: /home/pi/MagicMirror/modules/MMM-MyCommute/node_modules/jsbn/index.js:647 function
So I removed and re-added that. pm2 start MagicMirror got it going again.
Thank you again!
Matt
-
Solution:
pm2 stop all
cd ~/MagicMirror
npm startPay attention to logs. In my case one of the modules was throwing an error. I removed the module folder, re-cloned it (including required npm install within the module folder) and then restarted the application with pm2 start MagicMirror.
-
@matt216 Yes there are a bunch of modules impacted by us removing libraries from the base so you have to carefully look at the error messages to see what libraries were missing and which modules were impacted as well
see this for general process of fixing missing libs
https://forum.magicmirror.builders/topic/15778/fix-for-black-screen-in-2-16-and-later