librelink icon indicating copy to clipboard operation
librelink copied to clipboard

Issue identified : Abbot apparently changed required Header Information

Open jschwarz88 opened this issue 1 year ago • 16 comments

** Which country are you from ** Germany

Describe the bug "Error setting up entry [email protected] for librelink" When trying manually the new required version is 4.12.0. When setting header version to 4.12.0 I get the following error: message: "RequiredHeaderMissing"

Log file 2024-11-15 16:16:27.150 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry [email protected] 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 1157, 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 635, in __async_setup_with_context 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

Additional context I couldn't figure out what the new required header field might be....

jschwarz88 avatar Nov 15 '24 17:11 jschwarz88

account-id https://github.com/TA2k/ioBroker.libre/commit/e29c214919ae493d8b2ef92ae395e98435b03179

TA2k avatar Nov 15 '24 21:11 TA2k

account-id TA2k/ioBroker.libre@e29c214

Thanks! This helped me fix it!

jschwarz88 avatar Nov 15 '24 22:11 jschwarz88

account-id TA2k/ioBroker.libre@e29c214

Thanks! This helped me fix it!

How did you fix it?

SirVolkie avatar Nov 16 '24 14:11 SirVolkie

also ich weiss leider auch nicht mehr weiter seit 2 tgen kommt nix mehr es kommt nur noch Einrichtungsfehler, wird erneut versucht: Something really wrong happened!

LaFamilia-Radio avatar Nov 16 '24 15:11 LaFamilia-Radio

My protokol

Logger: homeassistant.config_entries Quelle: config_entries.py:635 Erstmals aufgetreten: 16:44:05 (1 Vorkommnisse) Zuletzt protokolliert: 16:44:05 Error setting up entry .....@..... 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 1158, in raise_for_status raise ClientResponseError( aiohttp.client_exceptions.ClientResponseError: 430, message='', url='https://api-de.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 635, in __async_setup_with_context 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

LaFamilia-Radio avatar Nov 16 '24 15:11 LaFamilia-Radio

account-id TA2k/ioBroker.libre@e29c214

Thanks! This helped me fix it!

How did you fix it?

I implemented the pulling of values in node red myself (so not using this integration atm). Here's the interesting part in case you're interested: [{"id":"a829231dab71d93b","type":"http request","z":"235fb433abc206d9","name":"Werte abfragen","method":"GET","ret":"obj","paytoqs":"ignore","url":"https://api-de.libreview.io/llu/connections/<<put the patient-id here!>>/graph","tls":"4774e118649211b7","persist":true,"proxy":"","insecureHTTPParser":false,"authType":"bearer","senderr":false,"headers":[{"keyType":"other","keyValue":"version","valueType":"other","valueValue":"4.12.0"},{"keyType":"other","keyValue":"product","valueType":"other","valueValue":"llu.android"},{"keyType":"other","keyValue":"cache-control","valueType":"other","valueValue":"no-cache"},{"keyType":"other","keyValue":"connection","valueType":"other","valueValue":"Keep-Alive"},{"keyType":"other","keyValue":"account-id","valueType":"other","valueValue":"<<put the sha256-hash of your user-id here!!>>"}],"x":260,"y":360,"wires":[["f15307f4369c8cd6","4cc165ea3aefc6b8"]]},{"id":"4774e118649211b7","type":"tls-config","name":"","cert":"","key":"","ca":"","certname":"","keyname":"","caname":"","servername":"","verifyservercert":true,"alpnprotocol":""}]

jschwarz88 avatar Nov 16 '24 16:11 jschwarz88

Not sure if this is similar to my issue, but having trouble for 2 or three days now too, while it worked flawlessly before.

2024-11-17 10:09:17.344 DEBUG (MainThread) [custom_components.librelink] Appel de async_setup_entry entry: entry_id= 01JCWP3XFY3S2GDEJRV3HDV88G, data= {'username': 'EDITusername', 'password': 'EDITpassword', 'Country': 'Germany', 'unit_of_measurement': 'mmol/L'}, user = EDIT username BaseUrl = https://api-de.libreview.io

2024-11-17 10:09:17.572 DEBUG (MainThread) [custom_components.librelink.api] response.status: 200

2024-11-17 10:09:17.573 DEBUG (MainThread) [custom_components.librelink.api] Login status : 0

2024-11-17 10:09:17.643 DEBUG (MainThread) [custom_components.librelink.api] response.status: 403

2024-11-17 10:09:17.643 DEBUG (MainThread) [custom_components.librelink.coordinator] Exception: general API error during coordinator update

2024-11-17 10:09:17.644 DEBUG (MainThread) [custom_components.librelink] Finished fetching librelink data in 0.070 seconds (success: False)

(I replaced username and password in the protocoll for obvious reasons).

It seems the authentication is not working anymore. I neither changed my username nor password, but the authentication seems to fail.

Hope this helps in a way. If it is a seperate issue, please give me an info and I can create one here.

André

riegera2412 avatar Nov 17 '24 09:11 riegera2412

FIY: I can confirm the login problem since afternoon last friday. Also a developer of an alternative App for iOS confirmed that there is a problem because of a change by LibreLinkUp for it's german users.

bootix avatar Nov 18 '24 10:11 bootix

Hi, would this be why my values aren't showing up anymore within HomeAssistant? 

Not sure if this is just German related

MuckyRat avatar Nov 18 '24 11:11 MuckyRat

I tried to understand the way how the ioBroker sample was changed and what to do in the Python code we have here, but I don't understand where I can steal the user.id from yet. I think that my way to go is in api_wrapper, but not sure yet... As soon as this is in my sorry brain, the rest is fixed easily. Sadly I have not that much skills in JS and Python.

dreimer1986 avatar Nov 20 '24 14:11 dreimer1986

<<put the sha256-hash of your user-id here!!>>

Well... What is this User ID? Where is it seen and where did you find it? Is it the defined username or what else?? This makes me go crazy here.

dreimer1986 avatar Nov 20 '24 22:11 dreimer1986

Hello, Is there anyone who solved the Freestyle new header issue in the librelinkup german login? Thank you BR Gino

Ginocar avatar Dec 07 '24 18:12 Ginocar

Hello, Is there anyone who solved the Freestyle new header issue in the librelinkup german login? Thank you BR Gino

switched to libreview integration, at this moment it`s only possible way to install it is to manually download from git and place in custom_components.

dashernln avatar Dec 07 '24 18:12 dashernln

Hello, Is there anyone who solved the Freestyle new header issue in the librelinkup german login? Thank you BR Gino

switched to libreview integration, at this moment it`s only possible way to install it is to manually download from git and place in custom_components.

Unfortunately I am beginer in the home assistant system so I would be thankful if I get a description from Libreview install. Should I only copy the libreview's folders/files in my custom components folder? Sorry I am not an IT professional. I am only simple end user. Thank you BR Gino

Ginocar avatar Dec 07 '24 19:12 Ginocar

Just add this GitHub repository in your HACS as custom repository in the settings menu above right. No need for any manual copying.

dreimer1986 avatar Dec 07 '24 19:12 dreimer1986

Just add this GitHub repository in your HACS as custom repository in the settings menu above right. No need for any manual copying.

I do not see the LibreView repo in HACS. I only find the LibreLink repo. Edit: I found it and works perfect. Thank you so much I added the custom mini graph card also :-) Thank you so much again

Ginocar avatar Dec 07 '24 19:12 Ginocar