Read the statement by Michael Teeuw here.
MMM-Fuel black screen
-
@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?
-
@Arzeg eh?
can’t be
should be this
grep version ~/MagicMirror/node_modules/electron/package.json "version": "19.0.15",
the release upgrade moved us from 17 to 19 (I am incorrect here, see later posts)
hm… how did u upgrade?
manual or my script?
lets check the package.json requested version
grep \"electron\": ~/MagicMirror/package.json "electron": "^19.0.15"