• 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-JsonTable - error and does not load

Scheduled Pinned Locked Moved Solved Troubleshooting
19 Posts 2 Posters 421 Views 2 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
    sankum
    last edited by 13 days ago

    Hi,

    I am trying to read and display from a local json file using this module.
    config:
    url: ‘https://localhost:8080/modules/MMM-JsonTable/myList.json’,
    arrayName: ‘items’,
    keepColumns: ‘name’

    I get following errors:
    [2025-06-29 19:01:30.116] [ERROR] (node:109589) UnhandledPromiseRejectionWarning: TypeError: fetch failed
    at node:internal/deps/undici/undici:13502:13
    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
    [2025-06-29 19:01:30.116] [ERROR] (node:109589) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)

    myList.json in module directory -from the example on github with item and name only.

    It stays at loading with those errors.
    What am I doing wrong? Please help. Thanks.

    .

    S 1 Reply Last reply 12 days ago Reply Quote 0
    • S Offline
      sankum
      last edited by 4 days ago

      Sam,

      Yes, it was the file content. I had copied it from the git example but obviously did something wrong.

      1 Reply Last reply Reply Quote 1
      • S Offline
        sdetweil @sankum
        last edited by 12 days ago

        @sankum unless you enable it and provide a certificate, MagicMirror is http only
        your url is https;//

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        1 Reply Last reply Reply Quote 0
        • S Offline
          sankum
          last edited by 12 days ago

          Thanks Sam. I changed it to http:// and even tried local IP address instead of localhost and the result is the same. Still the same error, and does not load.?

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

            @sankum if you change to a file url in a browser

            file:///home/userid/MagicMirror/modules/....
            

            does the file load? this proves the file path and character case
            remember linux is case sensitive

            then replace in front of /modules
            with

            http://localhost:8080
            

            Sam

            How to add modules

            learning how to use browser developers window for css changes

            1 Reply Last reply Reply Quote 0
            • S Offline
              sankum
              last edited by 12 days ago

              Hi Sam,
              file:/home/sankum/… loads with 1 slash in the browser. But nhttp://localhost:8080/modules/… does not, same errors as before?

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

                @sankum is MagicMirror configured to port 8080?

                not

                nhttp

                http://

                Sam

                How to add modules

                learning how to use browser developers window for css changes

                1 Reply Last reply Reply Quote 0
                • S Offline
                  sankum
                  last edited by 12 days ago

                  Sam, MagicMirror is configured to port 8080. nhtp was a typo. It is http://…
                  As I said the file path and name are correct as I can read it in browser using file:/… (single slash). So not quite sure what is going on?

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

                    @sankum what is your address: setting in config.js

                    Sam

                    How to add modules

                    learning how to use browser developers window for css changes

                    1 Reply Last reply Reply Quote 0
                    • S Offline
                      sankum
                      last edited by 12 days ago

                      Sam,
                      address: “localhost”,

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

                        @sankum I used the sample from the readme

                        {
                          "items": [
                            {
                              "name": "Watt",
                              "value": "270 Watt"
                            },
                            {
                              "name": "Today",
                              "value": "5.85 kWh"
                            },
                            {
                              "name": "ThisWeek",
                              "value": "5.83 kWh"
                            },
                            {
                              "name": "ThisMonth",
                              "value": "12.8 kWh"
                            },
                            {
                              "name": "LastMonth",
                              "value": "246.75 kWh"
                            }
                          ]
                        }
                        

                        in the module folder
                        and this config (from the readme)

                        {
                          module: 'MMM-JsonTable',
                          position: 'top_right',
                          classes:'page1',
                          header: 'HouseDB Sevensegment',
                          config: {
                            url: 'http://localhost:8090/modules/MMM-JsonTable/foobar.json', // Required
                            arrayName: 'items' // Required---
                          }
                        }  
                        

                        and it displayed as expected
                        Screenshot at 2025-07-01 06-22-52.png

                        Sam

                        How to add modules

                        learning how to use browser developers window for css changes

                        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