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

Issue identified : Error 430 during login with LibreLink API - Home Assistant #31

Open
hdmvide opened this issue Sep 29, 2024 · 15 comments
Assignees

Comments

@hdmvide
Copy link

hdmvide commented Sep 29, 2024

Which country are you from
I am located in Italy. This might help in understanding the API endpoints I am using. I have tried both the global endpoint (https://api.libreview.io/llu/auth/login) and the European endpoint (https://api-eu.libreview.io/llu/auth/login).

Describe the bug
When attempting to set up the LibreLink integration in Home Assistant, I receive an HTTP 430 error during the login process. This error occurs when the integration tries to authenticate with the LibreView API. The credentials I am using are valid and work on the official LibreView website, but the API call within Home Assistant fails.

Log file
Here’s the relevant portion of the log file (email address redacted):

2024-09-29 12:41:45.582 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry [redacted] for librelink
Traceback (most recent call last):
  File "/config/custom_components/librelink/api.py", line 200, in api_wrapper
    response.raise_for_status()
  File "/usr/local/lib/python3.12/site-packages/aiohttp/client_reqrep.py", line 1070, in raise_for_status
    raise ClientResponseError(
aiohttp.client_exceptions.ClientResponseError: 430, message='', url=URL('https://api-eu.libreview.io/llu/auth/login')

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 594, in async_setup
    result = await component.async_setup_entry(hass, self)
  File "/config/custom_components/librelink/__init__.py", line 48, in async_setup_entry
    sessionToken = await myLibrelinkLogin.async_get_token()
  File "/config/custom_components/librelink/api.py", line 148, in async_get_token
    reponseLogin = await api_wrapper(
  File "/config/custom_components/librelink/api.py", line 209, in api_wrapper
    raise LibreLinkApiCommunicationError(
custom_components.librelink.api.LibreLinkApiCommunicationError: Error fetching information

I have activated debug mode, and I am happy to provide further logs if needed. Let me know if you require the complete log file, and I’ll ensure that sensitive information is redacted.

Screenshots
N/A (Please let me know if screenshots of specific configurations or errors would be helpful).

Additional context
I am running Home Assistant Core version 2024.6.0 and Frontend version 20240605.0. The system has internet access, and I can successfully reach the API endpoints via network tools (e.g., ping). The issue may be related to a change in the LibreView API or how the integration handles API responses.

Thank you

@gillesvs
Copy link
Owner

Are you using librelinkUp account?
Not librelink

@hdmvide
Copy link
Author

hdmvide commented Sep 29, 2024

Thank you for your reply. I can confirm that I am using a LibreLink account, and it was working correctly in the past. However, it has recently stopped working. I have tried deleting the integration and reinstalling it from scratch, authenticating with the same account, but the issue persists. Despite this, the same account works fine in the LibreLink app.

@gillesvs
Copy link
Owner

You need to use librelinkUp
This integration does not work with librelink account
Maybe you had the same credentials for both accounts in the past

@hdmvide
Copy link
Author

hdmvide commented Sep 29, 2024

Sorry for the confusion. I actually have two different accounts—one for LibreLink and one for LibreLinkUp.

I've been using the same credentials for a long time and haven't changed them. In the Home Assistant integration, I use my LibreLinkUp account. If I use the same credentials to log into the official LibreLinkUp app, everything works fine. However, when I try to use these credentials in the Home Assistant integration, it fails and returns the error I mentioned earlier.

As I mentioned, I've been using this integration for several months without issues, but recently it stopped working, giving me this error. Again, I haven't changed my credentials; it simply stopped functioning.

I also tried deleting the integration from both Home Assistant and HACS, reinstalling it from scratch, and authenticating with the same (working) credentials I use in the LibreLinkUp app, but I still encounter the same issue.

@ziolopl
Copy link

ziolopl commented Sep 29, 2024

Hi, i have similar issue:

Traceback (most recent call last):
File "/config/custom_components/librelink/api.py", line 200, in api_wrapper
response.raise_for_status()
File "/usr/local/lib/python3.12/site-packages/aiohttp/client_reqrep.py", line 1093, in raise_for_status
raise ClientResponseError(
aiohttp.client_exceptions.ClientResponseError: 430, message='', url='https://api.libreview.io/llu/auth/login'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 604, in async_setup
result = await component.async_setup_entry(hass, self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/librelink/init.py", line 48, in async_setup_entry
sessionToken = await myLibrelinkLogin.async_get_token()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/librelink/api.py", line 148, in async_get_token
reponseLogin = await api_wrapper(
^^^^^^^^^^^^^^^^^^
File "/config/custom_components/librelink/api.py", line 209, in api_wrapper
raise LibreLinkApiCommunicationError(
custom_components.librelink.api.LibreLinkApiCommunicationError: Error fetching information

@ziolopl
Copy link

ziolopl commented Sep 30, 2024

Yesterday evening the librelinkup app logged me out automatically. After logging in I accepted the new terms of service and now everything works in the HA.

@WaeedHussain
Copy link

I'm not sure if it is related but I had the same issue.HA suddenly stopped picking up the entities even when I removed the integration and started again.
Used the correct credentials for LibreLinkUp but still nothing. Ended up removing the connection from LibreLinkUp and resending the invite from LibreLink to the LibreLinkUp account and HA started working again

@jhthorsen
Copy link

i had to log out of the LibreLinkUp app and log in again. After logging in, I was prompted to accept the user agreement. When I accepted it, it went back to HA and re-enabled the integration, and it started working again.

I think this issue can be closed by adding a «FAQ» or something to the README?

@hdmvide
Copy link
Author

hdmvide commented Oct 2, 2024

Yesterday evening the librelinkup app logged me out automatically. After logging in I accepted the new terms of service and now everything works in the HA.

it worked for me too. Thanks

@dashernln
Copy link

I'm not sure if it is related but I had the same issue.HA suddenly stopped picking up the entities even when I removed the integration and started again. Used the correct credentials for LibreLinkUp but still nothing. Ended up removing the connection from LibreLinkUp and resending the invite from LibreLink to the LibreLinkUp account and HA started working again

yep, i also experienced this issue several month ago.
reinviting follower can be a solution. also, along this issue, i`ve experienced problems in master application with accessing menu "connected apps". but i forgot how i managed to access this function.

@dashernln
Copy link

@gillesvs maybe it worth to add this to troubleshooting section in readme?

@barthel-eu
Copy link

I'm afraid the integration becomes unusable. I reauthorized the user recently, now I have the same problem again:
Failed setup, will retry: Something really wrong happened!
Nice red, but a useless advise. Not everyone (not me) is a programmer bothering to go into the source code.
I also enabled debugging, but can't find the logs (PEBKAS)...? Last one showing is from two days ago. I just removed the link, reauthorized, error remains. All shows nice on the LibreUp App.
It's also a temporary workaround to remove and reauthorize in LibreUp, obviously not working very long. Hope there'll be an update quickly that resolves that situation. And I'm sure it's caused by Abbott, but that doesn't make it any less frustrating.

@Techtobi83
Copy link

I'm afraid the integration becomes unusable. I reauthorized the user recently, now I have the same problem again: Failed setup, will retry: Something really wrong happened! Nice red, but a useless advise. Not everyone (not me) is a programmer bothering to go into the source code. I also enabled debugging, but can't find the logs (PEBKAS)...? Last one showing is from two days ago. I just removed the link, reauthorized, error remains. All shows nice on the LibreUp App. It's also a temporary workaround to remove and reauthorize in LibreUp, obviously not working very long. Hope there'll be an update quickly that resolves that situation. And I'm sure it's caused by Abbott, but that doesn't make it any less frustrating.

that means me as a brand new user of this integration für HA - who has this problem this evening - cant do anything to work at the moment?

@scottb721
Copy link

Mine wouldn't load either. After logging out of librelinkUp and back in I had two Terms updates to accept. Once I did that the integration loaded fine.

@barthel-eu
Copy link

Status Quo: I just uninstalled the integration and LibreLinkUp, fall back to the Android Libre 3 app.
It might be PEBKAS, but I couldn't get that integration to run for any length of time and think it's an Abbott-issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants