Weather app tweaking

Hi there again!

Some time ago I made WeatherAPP for FCC challenge and now I decided to revisit it for polishing purpose (an addition to my portfolio). The day I made the APP it ran smoothly but at unknown point in the time it became “semi-broken”. Mainly, I believe it fails to communicate properly with either OpenWeatherAPI or geolocation.

I grabbed now api link and inserted random long and lat numbers and my browser gets JSON response so my guess is that geolocation is somehow messed up ( my weather app works usually in the morning; tested crossbrowser and by refreshing).

Is my code somehow messed up or is it geolocation moody by default ?

Here is my pen:

I have tested it on Chrome 61 and all weather information loads just fine.

Maybe you blocked location access in your browser and you need to unblock it?

1 Like

Ok, I went down this rabbit hole and discovered that Chrome’s variants like Chromodo or Chromium have trouble with geolocation APP. “Clean” Chrome and FF (on other machine) are working just fine.
At the top of that I went on StackOverflow and learned that at large Chrome by design have some difficulties with geo APP (will work “out of the box” only with secure http).

To sum up:

  • I did a reset to my Chromium’s location settings and re-allowed codepen to access my location: my app failed
  • I tested it on the other machine: Chromodo nok, Chrome & FF ok
  • I also replaced OpenWeatherApp with fcc weatherApp and results are the same as in example #2