Read the statement by Michael Teeuw here.
Getting strange error after upgrade with Electron
-
Using a Pi - just did a full-upgrade, and then an git pull && npm install --only=prod --omit=dev
MM starts - but there are display issues, and some modules aren’t connecting properly. I took a log at the logs, but - I’m now out of my league. I posted the debug log below and the PM2 error log below that. Any ideas?
0 info it worked if it ends with ok
1 verbose cli [ ‘/usr/bin/node’, ‘/usr/bin/npm’, ‘start’ ]
2 info using npm@6.14.12
3 info using node@v10.24.1
4 verbose run-script [ ‘prestart’, ‘start’, ‘poststart’ ]
5 info lifecycle magicmirror@2.22.0~prestart: magicmirror@2.22.0
6 info lifecycle magicmirror@2.22.0~start: magicmirror@2.22.0
7 verbose lifecycle magicmirror@2.22.0~start: unsafe-perm in lifecycle true
8 verbose lifecycle magicmirror@2.22.0~start: PATH: /usr/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/home/pi/Magic
Mirror/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.22.0~start: CWD: /home/pi/MagicMirror
10 silly lifecycle magicmirror@2.22.0~start: Args: [ ‘-c’,
10 silly lifecycle ‘DISPLAY=“${DISPLAY:=:0}” ./node_modules/.bin/electron js/electron.js’ ]
11 silly lifecycle magicmirror@2.22.0~start: Returned: code: 1 signal: null
12 info lifecycle magicmirror@2.22.0~start: Failed to exec start script
13 verbose stack Error: magicmirror@2.22.0 start:DISPLAY="${DISPLAY:=:0}" ./node_modules/.bin/electron js/electron.js
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.22.0
15 verbose cwd /home/pi/MagicMirror
16 verbose Linux 5.10.103-v7l+
17 verbose argv “/usr/bin/node” “/usr/bin/npm” “start”
18 verbose node v10.24.1
19 verbose npm v6.14.12
20 error code ELIFECYCLE
21 error errno 1
22 error magicmirror@2.22.0 start:DISPLAY="${DISPLAY:=:0}" ./node_modules/.bin/electron js/electron.js
22 error Exit status 1
23 error Failed at the magicmirror@2.22.0 start script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]/home/pi/.pm2/logs/mm-error.log last 50 lines:
0|mm | Gdk-Message: 09:29:00.091: electron: Fatal IO error 11 (Resource temporarily unavailable) on X server :0.
0|mm |
0|mm | XIO: fatal IO error 11 (Resource temporarily unavailable) on X server “:0”
0|mm | after 34753 requests (34751 known processed) with 0 events remaining.
0|mm | npm ERR! code ELIFECYCLE
0|mm | npm ERR! errno 1
0|mm | npm ERR! magicmirror@2.22.0 start:DISPLAY="${DISPLAY:=:0}" ./node_modules/.bin/electron js/electron.js
0|mm | npm ERR! Exit status 1
0|mm | npm ERR!
0|mm | npm ERR! Failed at the magicmirror@2.22.0 start script.
0|mm | npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
0|mm |
0|mm | npm ERR! A complete log of this run can be found in:
0|mm | npm ERR! /home/pi/.npm/_logs/2023-02-08T14_29_00_205Z-debug.log
0|mm | [08.02.2023 09:29.30.907] [WARN] You’re using a full whitelist configuration to allow for all IPs
0|mm | MESA-LOADER: failed to retrieve device information
0|mm | MESA-LOADER: failed to retrieve device information
0|mm | MESA-LOADER: failed to retrieve device information
0|mm | MESA-LOADER: failed to open kms_swrast (search paths /usr/lib/arm-linux-gnueabihf/dri:$${ORIGIN}/dri:/usr/lib/dri)
0|mm | failed to load driver: kms_swrast
0|mm | MESA-LOADER: failed to open swrast (search paths /usr/lib/arm-linux-gnueabihf/dri:$${ORIGIN}/dri:/usr/lib/dri)
0|mm | failed to load swrast driver -
@junkmale you have node 10, u need node 16
-
updated to node 19.6.0
Still having the following error:
/home/pi/.pm2/logs/mm-error.log last 50 lines:
0|mm | Gdk-Message: 12:52:54.219: electron: Fatal IO error 11 (Resource temporarily unavailable) on X server :0.
0|mm |
0|mm | [08.02.2023 12:53.25.900] [WARN] You’re using a full whitelist configuration to allow for all IPs
0|mm | MESA-LOADER: failed to retrieve device information
0|mm | MESA-LOADER: failed to retrieve device information
0|mm | MESA-LOADER: failed to retrieve device information
0|mm | MESA-LOADER: failed to open kms_swrast (search paths /usr/lib/arm-linux-gnueabihf/dri:$${ORIGIN}/dri:/usr/lib/dri)
0|mm | failed to load driver: kms_swrast
0|mm | MESA-LOADER: failed to open swrast (search paths /usr/lib/arm-linux-gnueabihf/dri:$${ORIGIN}/dri:/usr/lib/dri)
0|mm | failed to load swrast driverI then did a sudo apt-get update then a sudo apt-get upgrade; it upgraded a couple of xserver files. Cleared the PM2 log and rebooted. Same errors as above.
-
@junkmale ok, after upgrading node. then u need to refresh mm install
do
pm2 stop all cd ~/MagicMirror rm package-lock.json rm -rf node_modules npm install --omit=dev --no-audit --no-fund pm2 start all
-
That didn’t seem to do it. After a pm2 flush, it shows
/home/pi/.pm2/logs/mm-error.log last 50 lines:
0|mm | [1176:0208/151743.603505:ERROR:connection.cc(46)] X connection error received.
0|mm | Gdk-Message: 15:17:43.634: electron: Fatal IO error 11 (Resource temporarily unavailable) on X server :0.
0|mm |
0|mm | [08.02.2023 15:18.16.665] [WARN] You’re using a full whitelist configuration to allow for all IPs
0|mm | MESA-LOADER: failed to retrieve device information
0|mm | MESA-LOADER: failed to retrieve device information
0|mm | MESA-LOADER: failed to retrieve device information
0|mm | MESA-LOADER: failed to open kms_swrast (search paths /usr/lib/arm-linux-gnueabihf/dri:$${ORIGIN}/dri:/usr/lib/dri)
0|mm | failed to load driver: kms_swrast
0|mm | MESA-LOADER: failed to open swrast (search paths /usr/lib/arm-linux-gnueabihf/dri:$${ORIGIN}/dri:/usr/lib/dri)
0|mm | failed to load swrast driver
0|mm | [998:0208/151919.102171:ERROR:gl_surface_presentation_helper.cc(260)] GetVSyncParametersIfAvailable() failed for 1 times!
0|mm | [998:0208/151919.105457:ERROR:gl_surface_presentation_helper.cc(260)] GetVSyncParametersIfAvailable() failed for 2 times! -
@junkmale did u add that env setting to disable the gpu?
is this the 64bit os?
uname -a -
added the GPU setting to mm.sh; this is a Pi 3, ARMv71.
-
-
@junkmale but it still shows active in the pm2 output. did u create a different script for pm2, like in the root of the mm project?
my install script uses the installers version
-
@sdetweil not that I know of.
pm2 show mm says the script path is /home/pi/mm.sh;
/home/pi/mm.sh did not have the GPU command in it.
I did change the one in ~/MagicMirror/installers, but since that doesn’t seem to be the right one,
I changed the one in /home/pi and pm2 restart mm - and now we have zero errors in the pm2 log.One down.
However…MMM-RAIN-MAP still shows diddly-squat. And it’s still not showing in the right place.
npm config check comes back without errors. By the way, I thought I posted the question in the MMM-RAIN-MAP forum, but perhaps an error on my part.