Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] 401 Error with openweathermap as API version change #789

Closed
alucarddelta opened this issue Jul 9, 2022 · 4 comments
Closed

[BUG] 401 Error with openweathermap as API version change #789

alucarddelta opened this issue Jul 9, 2022 · 4 comments
Assignees
Labels
🐛 Bug [ISSUE] Ticket describing something that isn't working

Comments

@alucarddelta
Copy link

alucarddelta commented Jul 9, 2022

Environment

Self-Hosted (Docker)

System

Unraid version 6.10.3, Docker version 20.10.14, Firefox 102.0.1

Version

2.1.1

Describe the problem

Hey.

Setting up the Weather Widget with a new openweathermap user is returning a 401 (unauth) error code being returned form openweathermap .

It appears that new accounts from openweathermap have changed the default API version adm the API key that gets generated is the 3.0 type. As per https://openweathermap.org/api

This means all new openweathermap accounts created will not get the 2.5 API version creds which Dashy appears to be using according to the Sentry output.

Additional info

Config

      - type: weather
        options: null
        apiKey: XXXXXXX
        city: Brisbane, AU
        units: metric
        hideDetails: false
        id: 1_759_weather

image

image

Please tick the boxes

Simple and fast and free weather API from OpenWeatherMap you have access to current weather data, hourly, 5- and 16-day forecasts. Historical weather data for 40 years back for any coordinate. Weather maps, UV Index, air pollution and historical data
@alucarddelta alucarddelta added the 🐛 Bug [ISSUE] Ticket describing something that isn't working label Jul 9, 2022
@liss-bot
Copy link
Collaborator

liss-bot commented Jul 9, 2022

If you're enjoying Dashy, consider dropping us a ⭐
🤖 I'm a bot, and this message was automated

@alucarddelta
Copy link
Author

alucarddelta commented Jul 9, 2022

O forgot to add the raw output from the API

{"cod":401, "message": "Invalid API key. Please see http://openweathermap.org/faq#error401 for more info."}

Also I blanked out the API key in the ticket... I didn't use "XXXXXXX" :)

@liss-bot liss-bot added the 👤 Awaiting Maintainer Response [ISSUE] Response from repo author is pending label Jul 9, 2022
@Lissy93
Copy link
Owner

Lissy93 commented Jul 9, 2022

Hiya @alucarddelta
The API version refers to the schema, and won't have an effect on any credentials.

Looking at that error message, I see that it includes undefined instead of your actual details.
That's because of an error in your config - you've set options to null. Instead options should include all the options including your API key and location.

Update your config to look like this, and it should work:

- type: weather
  options:
    apiKey: XXXXXXX
    city: Brisbane, AU
    units: metric
    hideDetails: false

Have also tested the weather widget myself on a fresh instance, just to be sure, and I can confirm it works as expected.

For future reference, if possible please do try and check the docs and troubeshooting guide first, as you're question has already been covered there.

Hope that helps :)

@liss-bot liss-bot removed the 👤 Awaiting Maintainer Response [ISSUE] Response from repo author is pending label Jul 9, 2022
@Lissy93 Lissy93 closed this as completed Jul 9, 2022
@alucarddelta
Copy link
Author

Gah, That's what happens when you over look thing and dig into another area that were completely wrong >.<.

Yah that worked out @Lissy93. I don't know where I copied the original weather config from but the options: null is everywhere in my config. Weirdly, it appears that only the weather widget was the only one that had issues with it.

Cheers :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Bug [ISSUE] Ticket describing something that isn't working
Projects
None yet
Development

No branches or pull requests

3 participants