DarkSky Api is not being called [Weather App]


#1

I need help with my weather app. The JSON is not being called. It was working previously but then I changed the design of my app and added the hourly functionality. Now the javascript broke.


#2

Looks like your JavaScript is working fine. I see the temperature, weather conditions, and humidity. Did you get it fixed, or is there a more specific example of something that isn’t working for you?


#3

I’m looking too–specifically, you know your API call is working because the current data is showing up, although the hourly data is not getting assigned to the DOM as you intend. Still trying to figure out why…


#4

There it is: in js line 95 you’re setting up an ID selector, but you put the hour1 etc on the divs as classes.


#5

its not working for me here. maybe its my browser


#6

i see the problem. Im using firefox and it didn’t work in that. When I used Vivaldi browser the app worked.


#7

does anyone know why that is?


#8

Perhaps an ad blocker installed with that browser is blocking freegeoip.net? We could only guess without seeing more debug information. You can investigate further by opening Firefox’s Debug Console. Ctrl+Shift+J on Windows/Linux. Command+Option+J on Mac OS.


#9

May be CROS issue ,change your URL .

" https://cors-anywhere.herokuapp.com/ " + yourURL .