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.

    Default Weather Module (Weathergov) stuck on loading

    Scheduled Pinned Locked Moved Unsolved Troubleshooting
    7 Posts 2 Posters 1.5k 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.
    • A Offline
      angeliKITTYx
      last edited by

      I’ve tried looking at other forum posts and I can’t seem to get mine working.
      The city shows, but both my current and forecast are stuck at “Loading …”
      I even tried to add a 2m refresh interval, but that didn’t change anything.
      I also tried “forecast” instead of “daily”

      Here’s my code

      {
      			module: "weather",
      			position: "top_left",
      			config: {
      				weatherProvider: "weathergov",
      				type: "daily",
       				apiBase: 'https://api.weather.gov/points/',
      				lat: "3xxxxx",
      				lon: "-7xxxxx",
      				showPrecipitationProbability: "true"
      			}
      		},
      		{
      			module: "weather",
      			position: "top_right",
      			config: {
      				weatherProvider: "weathergov",
      				type: "current",
       				apiBase: 'https://api.weather.gov/points/',
      				lat: "3xxxxx",
      				lon: "-7xxxxx"
      			}
      

      50b605eb-a438-4457-854b-0fb8c2e174ec-image.png

      karsten13K 1 Reply Last reply Reply Quote 0
      • karsten13K Offline
        karsten13 @angeliKITTYx
        last edited by

        @angeliKITTYx

        numeric and boolean values must be provided without " around them

        A 1 Reply Last reply Reply Quote 0
        • A Offline
          angeliKITTYx @karsten13
          last edited by

          @karsten13 is that just my lat/lon and the precipitation probability?

          karsten13K 1 Reply Last reply Reply Quote 0
          • karsten13K Offline
            karsten13 @angeliKITTYx
            last edited by

            @angeliKITTYx

            I think so

            A 1 Reply Last reply Reply Quote 0
            • A Offline
              angeliKITTYx @karsten13
              last edited by

              @karsten13 I actually just found all of the errors… and I don’t really know what they mean

              2weathergov.js:133 Forecast location is Portsmouth, VA
              localhost/:1 Access to fetch at 'https://api.weather.gov/gridpoints/AKQ/88,50/stations' from origin 'http://localhost:8080' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
              api.weather.gov/gridpoints/AKQ/88,50/stations:1 
                      
                      
                     Failed to load resource: net::ERR_FAILED
              weathergov.js:149 TypeError: Failed to fetch
                  at performWebRequest (utils.js:19:25)
                  at Class.fetchData (weatherprovider.js:129:10)
                  at weathergov.js:139:17
              (anonymous) @ weathergov.js:149
              :8080/tbd:1 
                      
                      
                     Failed to load resource: the server responded with a status of 404 (Not Found)
              weathergov.js:72 Could not load station obs data ...  SyntaxError: Unexpected token '<', "<!DOCTYPE "... is not valid JSON
                  at JSON.parse (<anonymous>)
                  at performWebRequest (utils.js:27:29)
              (anonymous) @ weathergov.js:72
              weather.js:166 New weather information available.
              localhost/:1 Access to fetch at 'https://api.weather.gov/gridpoints/AKQ/88,50/stations' from origin 'http://localhost:8080' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
              api.weather.gov/gridpoints/AKQ/88,50/stations:1 
                      
                      
                     Failed to load resource: net::ERR_FAILED
              weathergov.js:149 TypeError: Failed to fetch
                  at performWebRequest (utils.js:19:25)
                  at Class.fetchData (weatherprovider.js:129:10)
                  at weathergov.js:139:17
              (anonymous) @ weathergov.js:149
              :8080/tbd:1 
                      
                      
                     Failed to load resource: the server responded with a status of 404 (Not Found)
              weathergov.js:72 Could not load station obs data ...  SyntaxError: Unexpected token '<', "<!DOCTYPE "... is not valid JSON
                  at JSON.parse (<anonymous>)
                  at performWebRequest (utils.js:27:29)
              (anonymous) @ weathergov.js:72
              weather.js:166 New weather information available.
              localhost/:1 Refused to apply style from 'http://localhost:8080/css/custom.css' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.
              

              97e5ef03-bb3f-4f59-b48b-37a2b3288bc8-image.png

              karsten13K 1 Reply Last reply Reply Quote 0
              • karsten13K Offline
                karsten13 @angeliKITTYx
                last edited by

                @angeliKITTYx said in Default Weather Module (Weathergov) stuck on loading:

                https://api.weather.gov/gridpoints/AKQ/88,50/stations

                if I use the above url in the browser I get

                d569a817-abfd-41f4-88e5-64bb03fe50d3-grafik.png

                so you can wait or use another weather provider …

                A 1 Reply Last reply Reply Quote 1
                • A Offline
                  angeliKITTYx @karsten13
                  last edited by

                  @karsten13 oh! i didn’t know you could look at the URLs like that. Thanks!

                  1 Reply Last reply Reply Quote 0

                  Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                  Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                  With your input, this post could be even better 💗

                  Register Login
                  • 1 / 1
                  • 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