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

Unknown error occurred during Garmin Connect login request #220

Open
E7winKamwendo opened this issue Dec 26, 2024 · 3 comments
Open

Unknown error occurred during Garmin Connect login request #220

E7winKamwendo opened this issue Dec 26, 2024 · 3 comments

Comments

@E7winKamwendo
Copy link

Ran into this error

I have never gotten the connection working in HA. Tried a different version but still get the same error.

This error originated from a custom integration.

Logger: custom_components.garmin_connect
Source: custom_components/garmin_connect/init.py:82
integration: Garmin Connect (documentation, issues)
First occurred: 26 December 2024 at 23:59:38 (1 occurrences)
Last logged: 26 December 2024 at 23:59:38

Unknown error occurred during Garmin Connect login request
Traceback (most recent call last):
File "/usr/local/lib/python3.13/site-packages/garth/http.py", line 143, in request
self.last_resp.raise_for_status()
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/usr/local/lib/python3.13/site-packages/requests/models.py", line 1024, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 401 Client Error: Unauthorized for url: https://sso.garmin.cn/sso/signin?id=gauth-widget&embedWidget=true&gauthHost=https%3A%2F%2Fsso.garmin.cn%2Fsso%2Fembed&service=https%3A%2F%2Fsso.garmin.cn%2Fsso%2Fembed&source=https%3A%2F%2Fsso.garmin.cn%2Fsso%2Fembed&redirectAfterAccountLoginUrl=https%3A%2F%2Fsso.garmin.cn%2Fsso%2Fembed&redirectAfterAccountCreationUrl=https%3A%2F%2Fsso.garmin.cn%2Fsso%2Fembed

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/config/custom_components/garmin_connect/init.py", line 82, in async_login
await self.hass.async_add_executor_job(self._api.login)
File "/usr/local/lib/python3.13/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/local/lib/python3.13/site-packages/garminconnect/init.py", line 235, in login
self.garth.login(
~~~~~~~~~~~~~~~~^
self.username, self.password, prompt_mfa=self.prompt_mfa
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File "/usr/local/lib/python3.13/site-packages/garth/http.py", line 164, in login
self.oauth1_token, self.oauth2_token = sso.login(
~~~~~~~~~^
*args, **kwargs, client=self
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File "/usr/local/lib/python3.13/site-packages/garth/sso.py", line 127, in login
client.post(
~~~~~~~~~~~^
"sso",
^^^^^^
...<8 lines>...
),
^^
)
^
File "/usr/local/lib/python3.13/site-packages/garth/http.py", line 155, in post
return self.request("POST", *args, **kwargs)
~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/garth/http.py", line 145, in request
raise GarthHTTPError(
...<2 lines>...
)
garth.exc.GarthHTTPError: Error in request: 401 Client Error: Unauthorized for url: https://sso.garmin.cn/sso/signin?id=gauth-widget&embedWidget=true&gauthHost=https%3A%2F%2Fsso.garmin.cn%2Fsso%2Fembed&service=https%3A%2F%2Fsso.garmin.cn%2Fsso%2Fembed&source=https%3A%2F%2Fsso.garmin.cn%2Fsso%2Fembed&redirectAfterAccountLoginUrl=https%3A%2F%2Fsso.garmin.cn%2Fsso%2Fembed&redirectAfterAccountCreationUrl=https%3A%2F%2Fsso.garmin.cn%2Fsso%2Fembed

@dundas348
Copy link

Yup me to, I suspect something to do with MFA authentication pass process as I get an MFA code via email every time i try to re set up and also when i did the initial update to 0.2.26 last night

@E7winKamwendo
Copy link
Author

I have not activated my MFA authentication.

@johannes2704
Copy link

i have the same issue and also not activated the MFA authentication

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

3 participants