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-AVStock not loading quotes

    Scheduled Pinned Locked Moved Solved Troubleshooting
    11 Posts 3 Posters 121 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
      scottwalsh
      last edited by

      I’m using the MMM-AVStock module, and it stopped loading quotes a couple of days ago and investigated it today.

      It looks like the module might be no longer compatible with yahoo finance?

      Found in the mm container logs the following for every stock I have configured (using mm containerised from the magic mirror os install).

      [2026-01-06 10:42:02.943] [ERROR] [MMM-AVStock] Error in loading quote data for Symbol ^NZ50
      

      Added to the try/catch that pulls the stock the following so can see the actual error:

      console.error(error);
      

      The stack trace logged:

      [2026-01-06 10:42:02.943] [ERROR] [MMM-AVStock] Error in loading quote data for Symbol ^NZ50 
      [2026-01-06 10:42:02.945] [ERROR] [MMM-AVStock] SyntaxError: Unexpected token 'T', "Too Many Requests
      " is not valid JSON
          at JSON.parse (<anonymous>)
          at parseJSONFromBytes (node:internal/deps/undici/undici:5852:19)
          at successSteps (node:internal/deps/undici/undici:5833:27)
          at fullyReadBody (node:internal/deps/undici/undici:4725:9)
          at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
          at async consumeBody (node:internal/deps/undici/undici:5842:7)
      

      I did have a play with adding a 15 sec pause for each pull of a stock in case some simple rate limiting would resolve it, but did not resolve the issue.

      Have noted the module uses an older version of yahoo-finance2, so wondering if that needs upgraded - gets beyond my basic js skills.

      S 1 Reply Last reply Reply Quote 0
      • S Do not disturb
        sdetweil @scottwalsh
        last edited by

        @scottwalsh I think there is an issue open on the module GitHub that describes a work around

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        S 1 Reply Last reply Reply Quote 0
        • S Offline
          scottwalsh @sdetweil
          last edited by

          @sdetweil
          On the MMM-AVStock GitHub page? I don’t find an issue there that seemed to match.

          Have found issue report for the yahoo-finance2 api, and that is resolved in the latest version by being able to set the user agent. However, looks like yf2 would need upgraded in MMM-AVStock, and then set the user agent.

          https://github.com/gadicc/yahoo-finance2/issues/977

          S 1 Reply Last reply Reply Quote 0
          • S Do not disturb
            sdetweil @scottwalsh
            last edited by

            @scottwalsh but there is a pull request
            https://github.com/lavolp3/MMM-AVStock/pull/87

            Sam

            How to add modules

            learning how to use browser developers window for css changes

            A 1 Reply Last reply Reply Quote 0
            • A Offline
              ArnoldoB @sdetweil
              last edited by

              @sdetweil That was my pull request. It needed to be updated to work with yahoo-finance2 v3. I got that working on my pi5. Have a look at the fix in my repo:
              https://github.com/sonnyb9/MMM-AVStock/tree/fix-yahoo-finance-v3

              Thanks
              SB

              S S 2 Replies Last reply Reply Quote 0
              • S Do not disturb
                sdetweil @ArnoldoB
                last edited by

                @ArnoldoB I am not a user on the module, I’m just trying to help users make it thru the troubles that keep on coming

                Sam

                How to add modules

                learning how to use browser developers window for css changes

                1 Reply Last reply Reply Quote 0
                • S Offline
                  scottwalsh @ArnoldoB
                  last edited by

                  @ArnoldoB
                  Is it still working? I see your pull request is before the version of yahoofinance that made the user agent changes a couple of days ago.

                  A 1 Reply Last reply Reply Quote 0
                  • A Offline
                    ArnoldoB @scottwalsh
                    last edited by

                    @scottwalsh I’m not sure. I haven’t tried since last month. Yahoo_finance API is a moving target. I’ve been busy writing my own stock, crypto and forex module after yahoo_finance2 last annoyed me.

                    S 1 Reply Last reply Reply Quote 0
                    • S Offline
                      scottwalsh @ArnoldoB
                      last edited by

                      @ArnoldoB

                      The fork you created doesn’t resolve it, also needed to use the new function to set the user agent.

                      Was able to build on the branch you created for v3 support and get it working.

                      In summary:
                      Forked your branch
                      Upgraded yahoo finance to the latest version (3.11.2).
                      Update MMM-AVStock to use the new user agent function (^3.11.2)

                      Looks like all fixed.

                      Will give it a day or two and it looks fine will submit a pull request.

                      A 1 Reply Last reply Reply Quote 1
                      • A Offline
                        ArnoldoB @scottwalsh
                        last edited by

                        @scottwalsh I’m glad my little fix was helpful in finding a solution.

                        S 1 Reply Last reply Reply Quote 0
                        • 1
                        • 2
                        • 1 / 2
                        • First post
                          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