Skip to content
This repository has been archived by the owner on Aug 26, 2023. It is now read-only.

Help: Invalid API Key #290

Closed
tails618 opened this issue Apr 21, 2022 · 8 comments
Closed

Help: Invalid API Key #290

tails618 opened this issue Apr 21, 2022 · 8 comments
Labels
bug Something isn't working cannot reproduce

Comments

@tails618
Copy link

tails618 commented Apr 21, 2022

Describe the bug
When I enter my API Key, it tells me that it is invalid.

To Reproduce
Steps to reproduce the behavior:

  1. Go to settings
  2. Click on API Key
  3. Enter an API Key

Expected behavior
It should accept the API Key.

Screenshots
Screenshot_20220421-140020.png

Smartphone (please complete the following information):

  • Device: Pixel 4a
  • OS: Android 12.1
  • App version 2.0.1

Additional context
I have tested multiple keys - I believe they are in fact valid.

Sorry if this isn't the right place for this - I didn't see anywhere else for support.

@tails618 tails618 added the bug Something isn't working label Apr 21, 2022
@mdhowle
Copy link

mdhowle commented Apr 22, 2022

I had the same issue. Force stopping seemed to work around it. Similarly, after selecting the wrong city of the same name, I changed the city but the data would not update even after refreshing. Force stopping the app again fixed it.

@triallax
Copy link
Member

triallax commented Apr 23, 2022

Sorry if this isn't the right place for this - I didn't see anywhere else for support.

This is the right place, for now at least.

Anyway, I can't reproduce this bug. I'll try again when I have the time.

@triallax
Copy link
Member

@mdhowle

Similarly, after selecting the wrong city of the same name, I changed the city but the data would not update even after refreshing.

Sorry, can you maybe explain this again, or even better, upload a screen recording of the bug? I'm not able to understand what you mean.

@mdhowle
Copy link

mdhowle commented Apr 23, 2022

I tried reproducing the API bug on another phone that never had Clima installed but it didn't appear. Maybe it only occurs when the default API key is exhausted for the day (?)

Here is the reproduction of the second issue of the location not updating. Let me know if this should be its own issue.

When I enter "Darlington", it selects Darlington, UK. I then specify Darlington, South Carolina, USA and it accepts the city. However, it does not update even when refreshing. Only after force stopping the app does it switch.

n8Oo6FL.mp4

@triallax
Copy link
Member

triallax commented Apr 23, 2022

I tried reproducing the API bug on another phone that never had Clima installed but it didn't appear. Maybe it only occurs when the default API key is exhausted for the day (?)

These bugs are the bane of my existence. >:(

Regarding the city bug, I have a hunch as to what's happening, though I haven't confirmed it yet. It's most likely related to the memoization of weather data; since the two cities have the same name, when you change the city, the app thinks the new city is the same as the old one and uses the memoized weather. Feel free to open a new issue for this bug.

@mdhowle
Copy link

mdhowle commented Apr 23, 2022

I've added a new issue for the location.

Regarding the API, I vaguely recall a note from openweathermap stating there is a delay between creating an API key and it becoming valid. I'm not able to find it or maybe I'm misremembering.

I created a new API key and immediately tried it, Clima said it was invalid. After 5 minutes, I tried again and it would not even save. Clicking save did nothing: no error or anything. I force stopped the app, tried entering the key and it gave me the invalid API key error again.

Edit: found it

Do I need to activate my API key?

Your API key will be activated automatically, up to 2 hours after your successful registration. We invite you to read the API documentation that explains how to use our APIs.

https://openweathermap.org/faq

@triallax
Copy link
Member

triallax commented Apr 23, 2022

I created a new API key and immediately tried it, Clima said it was invalid. After 5 minutes, I tried again and it would not even save. Clicking save did nothing: no error or anything. I force stopped the app, tried entering the key and it gave me the invalid API key error again.

That's a separate issue, see #266.

By the way, I don't think force stopping is needed; closing Clima from the "recent apps" thing should be sufficient.

@tails618
Copy link
Author

Your API key will be activated automatically, up to 2 hours after your successful registration

I had tried an existing one and a new one - the new one obviously didn't work, as I had just created it. I know see the old is deactivated, although I didn't deactivate it, and I swear it wasn't deactivated when I tested it.
Anyway, I just tried the new (well, not new anymore) one and it worked, so I guess that was the problem. I'd recommend adding a line in the app clarifying that.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working cannot reproduce
Projects
None yet
Development

No branches or pull requests

3 participants