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

    l0zarus

    @l0zarus

    4
    Reputation
    1
    Profile views
    15
    Posts
    0
    Followers
    0
    Following
    Joined
    Last Online

    l0zarus Unfollow Follow

    Best posts made by l0zarus

    • RE: Testing my module, it is stuck loading

      @sdetweil

      strange… I just found the following code at the top of my file. I did not add it there. Going to delete it now.

      const config = require("../../config/config");
      
      posted in Troubleshooting
      L
      l0zarus
    • RE: Testing my module, it is stuck loading

      @sdetweil

      I added let header = “” and let cors_url = jdhflrkgd. I did not add anything else at all.

      exact code below:

              let header = "";
      
              // this is the API call url
              let original_url = "http://api.seatgeek.com/2/events?lat=" + self.config.latitude + "&lon=" + self.config.longitude + "&per_page=" + self.config.eventCount + "&datetime_utc.gte=" + today + "&datetime_utc.lte=" + oneweek + "&range=" + self.config.range + "&type=concert" + "&client_id=" + self.config.clientID + "&client_secret=" + self.config.clientSecret;
              
              // this is the cors URL
              let cors_url = "http://" + config.address==="0.0.0.0"?"localhost":config.address + ":" + config.port + "/cors?" + header + "&url=" + original_url;
          
              // fetching the data from seatgeek
              fetch(cors_url)
      
      posted in Troubleshooting
      L
      l0zarus
    • RE: Testing my module, it is stuck loading

      @sdetweil I got a new console error:

      Screenshot 2023-05-07 at 10.06.40 PM.png

      posted in Troubleshooting
      L
      l0zarus
    • RE: Testing my module, it is stuck loading

      @sdetweil aha!!! This did it! It’s ugly but it is working… now to spend time improving the design of the table and make my code more effective.

      THANK YOU SO MUCH! I will probably be back with more questions, but not around this issue.

      posted in Troubleshooting
      L
      l0zarus

    Latest posts made by l0zarus

    • RE: Testing my module, it is stuck loading

      @sdetweil aha!!! This did it! It’s ugly but it is working… now to spend time improving the design of the table and make my code more effective.

      THANK YOU SO MUCH! I will probably be back with more questions, but not around this issue.

      posted in Troubleshooting
      L
      l0zarus
    • RE: Testing my module, it is stuck loading

      @sdetweil

      strange… I just found the following code at the top of my file. I did not add it there. Going to delete it now.

      const config = require("../../config/config");
      
      posted in Troubleshooting
      L
      l0zarus
    • RE: Testing my module, it is stuck loading

      @sdetweil

      I added let header = “” and let cors_url = jdhflrkgd. I did not add anything else at all.

      exact code below:

              let header = "";
      
              // this is the API call url
              let original_url = "http://api.seatgeek.com/2/events?lat=" + self.config.latitude + "&lon=" + self.config.longitude + "&per_page=" + self.config.eventCount + "&datetime_utc.gte=" + today + "&datetime_utc.lte=" + oneweek + "&range=" + self.config.range + "&type=concert" + "&client_id=" + self.config.clientID + "&client_secret=" + self.config.clientSecret;
              
              // this is the cors URL
              let cors_url = "http://" + config.address==="0.0.0.0"?"localhost":config.address + ":" + config.port + "/cors?" + header + "&url=" + original_url;
          
              // fetching the data from seatgeek
              fetch(cors_url)
      
      posted in Troubleshooting
      L
      l0zarus
    • RE: Testing my module, it is stuck loading

      @sdetweil I got a new console error:

      Screenshot 2023-05-07 at 10.06.40 PM.png

      posted in Troubleshooting
      L
      l0zarus
    • RE: Testing my module, it is stuck loading

      @sdetweil

          ```
      

      // this next block is to deal with a CORS permissions issue with the API
      let header = “”;

          // this is the API call url
          let original_url = "http://api.seatgeek.com/2/events?lat=" + self.config.latitude + "&lon=" + self.config.longitude + "&per_page=" + self.config.eventCount + "&datetime_utc.gte=" + today + "&datetime_utc.lte=" + oneweek + "&range=" + self.config.range + "&type=concert" + "&client_id=" + self.config.clientID + "&client_secret=" + self.config.clientSecret;
          
          // this is the cors URL
          let cors_url = "http://" + config.address==="0.0.0.0"?"localhost":config.address + ":" + config.port + "/cors?" + header + "&url=" + original_url;
      
      posted in Troubleshooting
      L
      l0zarus
    • RE: Testing my module, it is stuck loading

      @sdetweil I’m going to try to fill it out like a template, let me know if I’m following.

      let header = "",
      
      let original_url = "https://api.seatgeek.com/2/events?client_id=MYCLIENTID&client_secret=MYCLIENTSECRET "
      
      let cors_url = "http://" + config.address==="IP ADDRESS HERE"?"localhost":config.address + ":" + config.port + "/cors?" + header + "&url=" + original_url
      

      and then I fetch(cors_url)?

      Is this right?

      posted in Troubleshooting
      L
      l0zarus
    • RE: Testing my module, it is stuck loading

      @sdetweil I’m struggling to understand the first part. I don’t think there is any header stuff that I know of? the url is based on this format: https://api.seatgeek.com/2/events?client_id=MYCLIENTID&client_secret=MYCLIENTSECRET with other stuff added as you saw in my source code in the original post.

      honestly the whole thing is a bit confusing to me. I’m not sure where it is supposed to go… as part of where I define the URL variable?

      posted in Troubleshooting
      L
      l0zarus
    • RE: Testing my module, it is stuck loading

      @sdetweil ugh, well that did not do it unfortunately. I’m not sure what to do now. It recommends setting the requests mode to ‘no-cors’. Is that something that might work here?

      posted in Troubleshooting
      L
      l0zarus
    • RE: Testing my module, it is stuck loading

      @sdetweil ok that was an issue! I got luxon installed in the right place. Now I’m getting the following errors:
      Screenshot 2023-05-07 at 8.41.45 PM.png

      I tested the exact link from the first error “Access to fetch at…” in postman and I get a clean response

      posted in Troubleshooting
      L
      l0zarus
    • RE: Testing my module, it is stuck loading

      @sdetweil alright here are the errors:

      Screenshot 2023-05-07 at 8.25.35 PM.png

      posted in Troubleshooting
      L
      l0zarus