Read the statement by Michael Teeuw here.
MMM-Fuel black screen
-
Hey guys,
after updating to MM version 2.21.0 I had a black screen. I have previously saved the config.js file as well as the module folder and the main.css file and reinstalled after the update. The logs then showed that the module “MMM-Fuel” apparently makes problems, when I removed the inclusion from the config.js, it ran again. I then reinstalled the MMM-Fuel module, but the error remains.
Logs:
0|mm | [02.10.2022 16:21.50.820] [ERROR] 0|mm | WARNING! Could not load config file. Starting with default configuration. Error found: Error: Cannot find module 'fs/promises' 0|mm | Require stack: 0|mm | - /home/pi/MagicMirror/modules/MMM-Fuel/node_helper.js 0|mm | - /home/pi/MagicMirror/js/app.js 0|mm | - /home/pi/MagicMirror/js/electron.js 0|mm | - /home/pi/MagicMirror/node_modules/electron/dist/resources/default_app.asar/main.js 0|mm | - 0|mm | [02.10.2022 16:21.50.823] [LOG] Loading module helpers ... 0|mm | [02.10.2022 16:21.50.827] [LOG] No helper found for module: alert. 0|mm | [02.10.2022 16:21.50.831] [LOG] Initializing new module helper ... 0|mm | [02.10.2022 16:21.50.834] [LOG] Module helper loaded: updatenotification 0|mm | [02.10.2022 16:21.50.838] [LOG] No helper found for module: clock. 0|mm | [02.10.2022 16:21.50.842] [LOG] No helper found for module: weather. 0|mm | [02.10.2022 16:21.50.845] [LOG] Initializing new module helper ... 0|mm | [02.10.2022 16:21.50.848] [LOG] Module helper loaded: newsfeed 0|mm | [02.10.2022 16:21.50.857] [ERROR] 0|mm | App threw an error during load 0|mm | [02.10.2022 16:21.50.861] [ERROR] Error: Cannot find module 'fs/promises' 0|mm | Require stack: 0|mm | - /home/pi/MagicMirror/modules/MMM-Fuel/node_helper.js 0|mm | - /home/pi/MagicMirror/js/app.js 0|mm | - /home/pi/MagicMirror/js/electron.js 0|mm | - /home/pi/MagicMirror/node_modules/electron/dist/resources/default_app.asar/main.js 0|mm | - 0|mm | at Module._resolveFilename (internal/modules/cjs/loader.js:627:15) 0|mm | at Function.Module._resolveFilename (/home/pi/MagicMirror/node_modules/electron/dist/resources/electron.asar/common/reset-search-paths.js:41:16) 0|mm | at Function.Module._resolveFilename (/home/pi/MagicMirror/node_modules/module-alias/index.js:49:29) 0|mm | at Function.Module._load (internal/modules/cjs/loader.js:531:27) 0|mm | at Module.require (internal/modules/cjs/loader.js:685:19) 0|mm | at require (internal/modules/cjs/helpers.js:16:16) 0|mm | at Object.<anonymous> (/home/pi/MagicMirror/modules/MMM-Fuel/node_helper.js:26:12) 0|mm | at Module._compile (internal/modules/cjs/loader.js:786:30) 0|mm | at Object.Module._extensions..js (internal/modules/cjs/loader.js:798:10) 0|mm | at Module.load (internal/modules/cjs/loader.js:645:32) 0|mm | [02.10.2022 16:21.50.869] [ERROR] 0|mm | Whoops! There was an uncaught exception... 0|mm | [02.10.2022 16:21.50.901] [ERROR] 0|mm | Error: Cannot find module 'fs/promises' 0|mm | Require stack: 0|mm | - /home/pi/MagicMirror/modules/MMM-Fuel/node_helper.js 0|mm | - /home/pi/MagicMirror/js/app.js 0|mm | - /home/pi/MagicMirror/js/electron.js 0|mm | - /home/pi/MagicMirror/node_modules/electron/dist/resources/default_app.asar/main.js 0|mm | - 0|mm | at Module._resolveFilename (internal/modules/cjs/loader.js:627:15) 0|mm | at Function.Module._resolveFilename (/home/pi/MagicMirror/node_modules/electron/dist/resources/electron.asar/common/reset-search-paths.js:41:16) 0|mm | at Function.Module._resolveFilename (/home/pi/MagicMirror/node_modules/module-alias/index.js:49:29) 0|mm | at Function.Module._load (internal/modules/cjs/loader.js:531:27) 0|mm | at Module.require (internal/modules/cjs/loader.js:685:19) 0|mm | at require (internal/modules/cjs/helpers.js:16:16) 0|mm | at Object.<anonymous> (/home/pi/MagicMirror/modules/MMM-Fuel/node_helper.js:26:12) 0|mm | at Module._compile (internal/modules/cjs/loader.js:786:30) 0|mm | at Object.Module._extensions..js (internal/modules/cjs/loader.js:798:10) 0|mm | at Module.load (internal/modules/cjs/loader.js:645:32) { 0|mm | code: 'MODULE_NOT_FOUND', 0|mm | requireStack: [ 0|mm | '/home/pi/MagicMirror/modules/MMM-Fuel/node_helper.js', 0|mm | '/home/pi/MagicMirror/js/app.js', 0|mm | '/home/pi/MagicMirror/js/electron.js', 0|mm | '/home/pi/MagicMirror/node_modules/electron/dist/resources/default_app.asar/main.js', 0|mm | undefined 0|mm | ] 0|mm | } 0|mm | [02.10.2022 16:21.50.906] [ERROR] MagicMirror² will not quit, but it might be a good idea to check why this happened. Maybe no internet connection? 0|mm | [02.10.2022 16:21.50.909] [ERROR] If you think this really is an issue, please open an issue on GitHub: https://github.com/MichMich/MagicMirror/issues 0|mm | [02.10.2022 16:21.51.317] [LOG] 0|mm | Launching application. 0|mm | [29573:1002/162153.771840:ERROR:buffer_manager.cc(488)] [.DisplayCompositor]GL ERROR :GL_INVALID_OPERATION : glBufferData: <- error from previous GL command
what am i missing?
-
@Arzeg how did u upgrade?
can u tell me the output of
node -v
npm -van ‘attempt’ at a work around
edit the module node_helper.js
change the line
const fs = require('fs/promises')
to
const fs = require('fs').promises
I opened this issue on module github
https://github.com/fewieden/MMM-Fuel/issues/99 -
Thanks for the fast reply.
node version: 16.15.1
npm version: 8.11.0Changed the line in the node_helper.js file.
looks good now, but i need to Update my API key.
What confuses me a bit is that the other modules are not affected, since I have the node_helper.js file in each module.
Oh and thank you for opening the issue on github
-
@Arzeg I don’t know why either … the author is very careful and quite proficient
glad the workaround worked…
-
@Arzeg also, the particular library is not used in many modules, so would not affect more than 2 or 3 out of hundreds
-
@sdetweil Okay.
Unfortunately, there is still an error with the workaround. I have requested a new API key (which works by calling it from the address bar of a browser) but now I get an error message from the module that the API key has expired.
0|mm | MMM-Fuel: Failed to retrieve prices FetchError: request to https://creativecommons.tankerkoenig.de/json/list.php?lat=51.40488&lng=8.06148&rad=5&type=all&apikey=xxxxxx-xxxxx-xxxxx-xxxxx&sort=dist failed, reason: certificate has expired 0|mm | at ClientRequest.<anonymous> (/home/pi/MagicMirror/modules/MMM-Fuel/node_modules/node-fetch/lib/index.js:1491:11) 0|mm | at ClientRequest.emit (events.js:200:13) 0|mm | at TLSSocket.socketErrorListener (_http_client.js:402:9) 0|mm | at TLSSocket.emit (events.js:200:13) 0|mm | at emitErrorNT (internal/streams/destroy.js:91:8) 0|mm | at emitErrorAndCloseNT (internal/streams/destroy.js:59:3) 0|mm | at processTicksAndRejections (internal/process/task_queues.js:84:9) { 0|mm | message: 'request to ' + 0|mm | 'https://creativecommons.tankerkoenig.de/json/list.php?lat=51.40488&lng=8.06148&rad=5&type=all&apikey=xxxxxxx-xxxxx-xxxxx-xxxxx-xxxxx&sort=dist ' + 0|mm | 'failed, reason: certificate has expired', 0|mm | type: 'system', 0|mm | errno: 'CERT_HAS_EXPIRED', 0|mm | code: 'CERT_HAS_EXPIRED' 0|mm | }
-
@Arzeg said in MMM-Fuel black screen:
reason: certificate has expired
i don’t know how to fix that one
that is the server side certificate required to make https: work
there was a bug at one time (4 releases ago) where the runtime(electron) mis handled certificates, but we put a fix in for that
I opened this issue
https://github.com/fewieden/MMM-Fuel/issues/100
also opened on in MM
https://github.com/MichMich/MagicMirror/issues/2924 -
@sdetweil Thanks for your help. How can I check if electron is up to date. Possibly that is where the problem lies
-
@Arzeg we use version 19 in this release
at the commandline do
grep version ~/MagicMirror/node_modules/electron/package.json
-
@sdetweil My version is: 6.1.12 how can i update this?