• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
MagicMirror Forum
  • Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.

MMM-DBF does not work, no error messages

Scheduled Pinned Locked Moved Unsolved Troubleshooting
12 Posts 3 Posters 473 Views 3 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    sletrabf @sletrabf
    last edited by 20 days ago

    @KristjanESPERANTO:

    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

    S 1 Reply Last reply 20 days ago Reply Quote 0
    • S Offline
      sdetweil @sletrabf
      last edited by sdetweil 20 days ago 20 days ago

      @sletrabf open the developers window

      ctrl-shift-i
      select the console tab
      enter a unique part of the module name in the filter field, dbf

      and see what you see

      Sam

      How to add modules

      learning how to use browser developers window for css changes

      1 Reply Last reply Reply Quote 0
      • 1
      • 2
      • 2 / 2
      2 / 2
      • First post
        12/12
        Last post
      Enjoying MagicMirror? Please consider a donation!
      MagicMirror created by Michael Teeuw.
      Forum managed by Sam, technical setup by Karsten.
      This forum is using NodeBB as its core | Contributors
      Contact | Privacy Policy