failed to load swrast driver
-
Bonjour Cedric!
(I hope it’s still aplicable in your local time and by the time you read this)
Thank you for doing this project and sharing with us! It’s fun to be a part of and learning some Linux and Javascript along the way, I am still just a novice, but I enjoy this very much. But with kids and work time is short and I end up with little time to update. So how my errors come, I do not know. It could be something in how or in what order I did my updates.
But this is it: PM2 doesn’t work anymore after GA V5.1.
I cd into MMM-GoogleAssistant and ran npm run refresh . Didn’t work, so also did manual updates of every EXT just to try.
cd into MagicMirror folder and ran npm run start and get this:kent@raspberrypi:~/MagicMirror $ npm run start > magicmirror@2.25.0 start > DISPLAY="${DISPLAY:=:0}" ./node_modules/.bin/electron js/electron.js [27.10.2023 10:50.16.849] [LOG] Starting MagicMirror: v2.25.0 [27.10.2023 10:50.16.860] [LOG] Loading config ... [27.10.2023 10:50.16.865] [DEBUG] config template file not exists, no envsubst [27.10.2023 10:50.16.872] [LOG] Loading module helpers ... [27.10.2023 10:50.16.886] [LOG] Initializing new module helper ... [27.10.2023 10:50.16.887] [LOG] Module helper loaded: EXT-Alert [27.10.2023 10:50.16.912] [LOG] Initializing new module helper ... [27.10.2023 10:50.16.913] [LOG] Module helper loaded: Gateway [27.10.2023 10:50.16.941] [LOG] Initializing new module helper ... [27.10.2023 10:50.16.944] [LOG] Module helper loaded: EXT-UpdateNotification [27.10.2023 10:50.16.948] [LOG] No helper found for module: clock. [27.10.2023 10:50.17.179] [LOG] Initializing new module helper ... [27.10.2023 10:50.17.179] [LOG] Module helper loaded: EXT-Screen [27.10.2023 10:50.17.197] [LOG] Initializing new module helper ... [27.10.2023 10:50.17.198] [LOG] Module helper loaded: EXT-Pir [27.10.2023 10:50.17.488] [LOG] Initializing new module helper ... [27.10.2023 10:50.17.489] [LOG] Module helper loaded: calendar [27.10.2023 10:50.17.499] [ERROR] (node:1911) UnhandledPromiseRejectionWarning: Error: Cannot find module 'node-fetch' Require stack: - /home/kent/MagicMirror/modules/MMM-Entur-tavle/node_helper.js - /home/kent/MagicMirror/js/app.js - /home/kent/MagicMirror/js/electron.js - /home/kent/MagicMirror/node_modules/electron/dist/resources/default_app.asar/main.js - at node:internal/modules/cjs/loader:1084:15 at Function.<anonymous> (node:electron/js2c/browser_init:2:117419) at Module._resolveFilename (/home/kent/MagicMirror/node_modules/module-alias/index.js:49:29) at node:internal/modules/cjs/loader:929:27 at Function._load (node:electron/js2c/asar_bundle:2:13327) at Module.require (node:internal/modules/cjs/loader:1150:19) at require (node:internal/modules/cjs/helpers:110:18) at Object.<anonymous> (/home/kent/MagicMirror/modules/MMM-Entur-tavle/node_helper.js:3:15) at Module._compile (node:internal/modules/cjs/loader:1271:14) at Object..js (node:internal/modules/cjs/loader:1326:10) at Module.load (node:internal/modules/cjs/loader:1126:32) at node:internal/modules/cjs/loader:967:12 at Function._load (node:electron/js2c/asar_bundle:2:13327) at Module.require (node:internal/modules/cjs/loader:1150:19) at require (node:internal/modules/cjs/helpers:110:18) at loadModule (/home/kent/MagicMirror/js/app.js:180:19) (Use `electron --trace-warnings ...` to show where the warning was created) [27.10.2023 10:50.17.500] [ERROR] (node:1911) 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) [1911:1027/105018.273691: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 MESA-LOADER: failed to retrieve device information MESA-LOADER: failed to retrieve device information MESA-LOADER: failed to retrieve device information MESA-LOADER: failed to open kms_swrast: /usr/lib/dri/kms_swrast_dri.so: cannot open shared object file: Ikke tilgang (search paths /usr/lib/aarch64-linux-gnu/dri:\$${ORIGIN}/dri:/usr/lib/dri) failed to load driver: kms_swrast MESA-LOADER: failed to open swrast: /usr/lib/dri/swrast_dri.so: cannot open shared object file: Ikke tilgang (search paths /usr/lib/aarch64-linux-gnu/dri:\$${ORIGIN}/dri:/usr/lib/dri) failed to load swrast driver
btw
kent@raspberrypi:~ $ cat /etc/os-release PRETTY_NAME="Debian GNU/Linux 11 (bullseye)" NAME="Debian GNU/Linux" VERSION_ID="11" VERSION="11 (bullseye)" VERSION_CODENAME=bullseye ID=debian
Let me know if there is anything more I can provide.
I believe in you!
Thanks in advance. -
Hi, with your log I can see this:
`[27.10.2023 10:50.17.499] [ERROR] (node:1911) UnhandledPromiseRejectionWarning: Error: Cannot find module ‘node-fetch’
Require stack:- /home/kent/MagicMirror/modules/MMM-Entur-tavle/node_helper.js`
It’s means
MMM-Entur-tavle
don’t findnode-fetch
library
So… let’s install it:#Enter to MMM-Entur-tavle cd ~/MagicMirror/modules/MMM-Entur-tavle # install node-fetch version 2 npm install node-fetch@2 # restart MagicMirror² cd ~/MagicMirror. npm start
See what happen and past logs content, I will analyze
Don’t worry aboutswrast
/kms_swrast
warning, there is no fix actually for this.
MagicMirror²
will make his job anyway, your problem is not related to this
Your Problem is related with a library not found and maybe you will have +/- same error in other modules (because module not maintened)npm run refresh
is implanted since GA v5.4.3, so older version have not this facilityEXT-UpdateNotification
is in end of live and replaced byEXT-Update
(see wiki)- Best way is trying
npm run update
command insideMMM-GoogleAssistant,
Gatewayand All
EXT`s
but first send me logs before updating something
-
Thank you for a fast reply!
Ok, so I checked, I am on GA v5.4.3. And I had EXT-UpdateNotification in my config, replaced it with stock updatenotification and EXT-Update (which I had installed but not placed in config)
I ran npm install node-fetch@2 in the MMM-EnTur folder and it installed perfectly.
npm start in MagicMirror now gives(...) [27.10.2023 13:51.15.289] [LOG] Module helper loaded: EXT-YouTube [27.10.2023 13:51.15.453] [LOG] Initializing new module helper ... [27.10.2023 13:51.15.453] [LOG] Module helper loaded: EXT-YouTubeCast [27.10.2023 13:51.15.574] [LOG] Initializing new module helper ... [27.10.2023 13:51.15.575] [LOG] Module helper loaded: MMM-Tibber [27.10.2023 13:51.15.579] [ERROR] (node:16925) UnhandledPromiseRejectionWarning: Error: Cannot find module 'request' Require stack: - /home/kent/MagicMirror/modules/MMM-PostDelivery-Norway/node_helper.js - /home/kent/MagicMirror/js/app.js - /home/kent/MagicMirror/js/electron.js - /home/kent/MagicMirror/node_modules/electron/dist/resources/default_app.asar/main.js - at node:internal/modules/cjs/loader:1084:15 at Function.<anonymous> (node:electron/js2c/browser_init:2:117419) at Module._resolveFilename (/home/kent/MagicMirror/node_modules/module-alias/index.js:49:29) at node:internal/modules/cjs/loader:929:27 at Function._load (node:electron/js2c/asar_bundle:2:13327) at Module.require (node:internal/modules/cjs/loader:1150:19) (...)
I tried
npm install node-fetch@2
in the MMM-PostDelivery-Norway folder but the message above is still the same.
Thanks again
-
Found I had installed node version 20.x.x so rolled back to 18.18.2 just in case. No effect.
Removed MMM-PostDelivery-Norway from my config and now everything works again.
Thank you for your time and assistance! -
If anyone shares a similar problem: in project directory
npm install request
fixed my issue. I can now use the module again