Read the statement by Michael Teeuw here.
MMM-DBF does not work, no error messages
-
OK, I temporarily disabled all other modules following this advice here except for MMM-DBF.
With
showApp: false,
I now get a black (blank) screen; with “true” it is showing the timetable app but nothing else (as expected).
Is there any way to enable a (verbose) logging output to show what this module does?
-
showApp: false,
disabled: true,
is the option setting to disable modules. Where did you findshowApp
?it is showing the timetable app
So it works without the other modules and doesn’t work when you activate the other modules? Can you figure out with which module it stops working?
Is there any way to enable a (verbose) logging output to show what this module does?
Seem that this module doesn’t have debug outputs. Only errors you could see in the browser console.
Also, maybe it is important - when I start up MagicMirror, it gives the following error messages:
I’m quit sure this is unrelated to this issue. You can try using the Wayland start option (
npm run start:wayland
) instead of the default start option (npm run start
). -
@KristjanESPERANTO said in MMM-DBF does not work, no error messages:
showApp: false,
disabled: true,
is the option setting to disable modules. Where did you findshowApp
?I did use the setting
disabled: true,
to disable the other modules (as explained here). The settingshowApp: false,
tells MMM-DBF to not load the table in the iFrame but generate a HTML table from the loaded information.showApp: true,
works whereasshowApp: false,
does not.So it works without the other modules and doesn’t work when you activate the other modules? Can you figure out with which module it stops working?
No, disabling the other modules doesn’t change anything.
Is there any way to enable a (verbose) logging output to show what this module does?
Seem that this module doesn’t have debug outputs. Only errors you could see in the browser console.
OK, I’ll try to see something there!
-
I installed the module MMM-ViewNotifications and then I added several notifications to the file MMM-DBF.js, see: https://pastebin.com/YZEYgPpA
Now the outcome is as follows:
showApp: true,
- The message “MMM_DBF_LOADED” is not shown. From my understanding this means that start() is not being (fully) executed?
- The following messages are shown (in this order): MMM_DBF_GENERATING_URL, MMM_DBF_IFRAME_URL_GENERATED, MMM_DBF_ERROR_PROCESSING_DATA.
showApp: false,
- The message “MMM_DBF_LOADED” is not shown. From my understanding this means that start() is not being (fully) executed?
- Only the following message is shown: MMM_DBF_ERROR_PROCESSING_DATA
So, from my understanding, the error occurs here, possibly in the line
await fetch (urlApi)
:async getData() { const self = this; const urlApi = `${this.generateUrl()}&mode=json&version=3`; const dataRequest = await fetch(urlApi); if (!dataRequest.ok) { // Show that the data request is being processed this.sendNotification("MMM_DBF_ERROR_PROCESSING_DATA", { message: '[MMM-DBF] Data processing returned an error.'}); let message = `An error has occurred: ${dataRequest.status}`; if (dataRequest.status === 300) { message += " - Ambiguous station name."; } throw new Error(message); } else { const data = await dataRequest.json(); // Show that the data request is being processed this.sendNotification("MMM_DBF_START_PROCESSING_DATA", { message: '[MMM-DBF] Data processing started.'}); self.processData(data); } self.scheduleUpdate(self.config.retryDelay); },
I’m somehow not able to see the actual error that happened. Could you maybe please point out where I have to look for the value of
dataRequest.status
?Thanks in advance!
Best regards,
sletrabf -
@sletrabf open the developers window
ctrl-shift-i
select the console tab
enter a unique part of the module name in the filter field, dbfand see what you see