MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    1. Home
    2. WallysWellies
    3. Posts
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.
    W
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 6
    • Posts 38
    • Groups 0

    Posts

    Recent Best Controversial
    • RE: MMM-MealieMenu Fetch Error
      • I have found the part of Mealie that allows creation of an API key so I could switch to that method for authentication.
      • I also see I am a couple of versions behind the Mealie master branch (I use version 1.5.1 - current version is 1.7.0). That looks drastic but it’s only 2 releases behind.

      I don’t think either of these things are causing my issue necessarily but it’s a couple of things I can change soon.

      posted in Troubleshooting
      W
      WallysWellies
    • RE: MMM-MealieMenu Fetch Error

      @zanix The mealie module has been in an error since yesterday and I wonder if you might be able to help me troubleshoot?

      I have run the following command:

      tail -100 .pm2/logs/mm-error.log
      

      And at the end I see the following:

      [2024-05-31 16:47:51.577] [ERROR] [MMM-MealieMenu] Fetch error: "Unauthorized"
      [2024-05-31 17:47:51.580] [ERROR] [MMM-MealieMenu] Fetch error: "Unauthorized"
      [2024-05-31 18:47:51.581] [ERROR] [MMM-MealieMenu] Fetch error: "Unauthorized"
      [2024-05-31 19:47:51.590] [ERROR] [MMM-MealieMenu] Fetch error: "Unauthorized"
      [2024-05-31 20:47:51.571] [ERROR] [MMM-MealieMenu] Fetch error: "Unauthorized"
      [2024-05-31 21:47:51.575] [ERROR] [MMM-MealieMenu] Fetch error: "Unauthorized"
      [2024-05-31 22:47:51.582] [ERROR] [MMM-MealieMenu] Fetch error: "Unauthorized"
      [2024-05-31 23:47:51.574] [ERROR] [MMM-MealieMenu] Fetch error: "Unauthorized"
      [2024-06-01 00:47:51.604] [ERROR] [MMM-MealieMenu] Fetch error: "Unauthorized"
      [2024-06-01 01:47:51.601] [ERROR] [MMM-MealieMenu] Fetch error: "Unauthorized"
      [2024-06-01 02:47:51.576] [ERROR] [MMM-MealieMenu] Fetch error: "Unauthorized"
      [2024-06-01 03:47:51.576] [ERROR] [MMM-MealieMenu] Fetch error: "Unauthorized"
      [2024-06-01 04:47:51.577] [ERROR] [MMM-MealieMenu] Fetch error: "Unauthorized"
      [2024-06-01 05:47:51.575] [ERROR] [MMM-MealieMenu] Fetch error: "Unauthorized"
      [2024-06-01 06:47:51.580] [ERROR] [MMM-MealieMenu] Fetch error: "Unauthorized"
      [2024-06-01 07:47:51.571] [ERROR] [MMM-MealieMenu] Fetch error: "Unauthorized"
      [2024-06-01 08:47:51.577] [ERROR] [MMM-MealieMenu] Fetch error: "Unauthorized"
      [2024-06-01 09:47:51.572] [ERROR] [MMM-MealieMenu] Fetch error: "Unauthorized"
      [2024-06-01 10:47:51.577] [ERROR] [MMM-MealieMenu] Fetch error: "Unauthorized"
      [2024-06-01 11:47:51.576] [ERROR] [MMM-MealieMenu] Fetch error: "Unauthorized"
      [2024-06-01 12:47:51.568] [ERROR] [MMM-MealieMenu] Fetch error: "Unauthorized"
      [2024-06-01 13:47:51.580] [ERROR] [MMM-MealieMenu] Fetch error: "Unauthorized"
      

      I have confirmed that the correct username / password is in my config.js file (and it has worked previously) - I can login via my laptop using http://raspberrypi:9925/ using these credentials.

      The config.js file is using the following line for the connection:

      host: "http://localhost:9925"
      

      I use browser / terminal / SSH etc. to access the Pi but if necessary I can connect a keyboard / mouse if that would aid in narrowing down the issue.

      Do you have any thoughts? I can probably just restart the mirror service but I haven’t yet in case that deletes any valuable information. Any advice would be appreciated.

      posted in Troubleshooting
      W
      WallysWellies
    • RE: MMM-MealieMenu Fetch Error

      @zanix Thanks for your input :)

      I made the change after posting and it certainly doesn’t break anything but I have been playing with some other modules too so have restarted the software several times meaning I haven’t given it a chance to error but based on my understanding it probably shouldn’t anymore. I don’t know why it was in the first place though - the Mealie container is on the Pi so it’s using localhost to retrieve data. Who knows.

      I did make one other change because I wanted to see the next week of meals, rather than the remaining meals this week. So I changed this line:

      const startOfWeek = this.getFirstDayOfWeek(config.weekStartsOnMonday);
      

      to this:

      const startOfWeek = moment();
      

      It’s pretty crude but if you’re taking suggestions it might be nice to have the option to show x number of days in the future rather than until the end of the week. I don’t believe that’s currently possible natively?

      Thanks for the module though, it’s great!

      posted in Troubleshooting
      W
      WallysWellies
    • RE: MMM-MealieMenu Fetch Error

      @sdetweil Done!

      I shall try and remember to report back if it seems to have worked - if I do not then we can assume I am a happy customer.

      Cheers for your time.

      posted in Troubleshooting
      W
      WallysWellies
    • RE: MMM-MealieMenu Fetch Error

      @sdetweil I’m looking at the node_helper.js file and reading your comments and I’m a little unsure what you are suggesting.

      Are you saying I could edit this code block:

      .catch((error) => {
              this.sendSocketNotification("MEALIE_ERROR", {
                error: "FETCH_ERROR",
                details: error,
                identifier: config.identifier
              });
            })
      

      to this:

      .catch((error) => {
              this.outstandingRequest = false; 
              this.sendSocketNotification("MEALIE_ERROR", {
                error: "FETCH_ERROR",
                details: error,
                identifier: config.identifier
              });
            })
      

      ?

      Sorry, I can fumble my way around code but I’m far from a programmer!

      posted in Troubleshooting
      W
      WallysWellies
    • RE: MMM-MealieMenu Fetch Error

      @sdetweil Thank you for your advice and apologies for the delayed response - I need to enable email notifications or something…

      I will try your suggestion. Much appreciated.

      posted in Troubleshooting
      W
      WallysWellies
    • RE: MMM-MealieMenu Fetch Error

      @sdetweil

      Thanks Sam. Any pointers would be good. It’s a fairly minor thing but it just seems a bit odd that after a single fetch error it just gives up forever (until restarted).

      I’ve discovered the pm2 log so I will try and remember to have a look at that next time it throws the error.

      I changed the config to update once every hour when I initially set it up:

      updateInterval: 60 * 60
      
      posted in Troubleshooting
      W
      WallysWellies
    • MMM-MealieMenu Fetch Error

      Hello. I have the MMM-MealieMenu module configured and working on an RPi5 but I run into a recurring issue where it will display a fetch error periodically.

      I’m not sure what causes it to be briefly unable to get the meal plan but the “bug” in my mind is that once the module hits that error it will just stop trying to refreshing the data forever, until I restart the Magic Mirror service. Once I restart the service it will get the meal plan and be happy for a few more days.

      I’m wondering if someone with more coding skills than myself can suggest a tweak to (presumably) the node_helper.js file so that it will allow the module to either try again at the next configured refresh cycle, or wait a period of time and retry repeatedly. Lines 120 to 126 seem to be the code block that deals with this particular error.

      I’m not sure where I might find log information to troubleshoot why the fetch error occurs in the first place but it appears to just be temporary as the meal planner remains accessible at it’s URL when using a browser, despite the error on screen. It’s all hosted on the Pi using the docker image.

      posted in Troubleshooting
      W
      WallysWellies
    • 1 / 1