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 · 7 comments
Open

Unknown error occurred during Garmin Connect login request #220

E7winKamwendo opened this issue Dec 26, 2024 · 7 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

@DVSelectronics
Copy link

Mine worked fine but kicked me out today. it won't even let me delete and reinstall the integration.
but my GF's account works fine for some reason.

@cyberjunky
Copy link
Owner

@DVSelectronics weird that you cannot uninstall it, do you see anything related in the system log? Maybe it has something todo with the other errors reported, I will have a look this weekend.

@DVSelectronics
Copy link

my apologies, i am able to delete it. but i am not able to reinstall. my account.

This error originated from a custom integration.

Logger: custom_components.garmin_connect.config_flow
Source: custom_components/garmin_connect/config_flow.py:47
integration: Garmin Connect (documentation, issues)
First occurred: 12:29:38 PM (2 occurrences)
Last logged: 12:30:00 PM

Unexpected exception
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.com/sso/signin?id=gauth-widget&embedWidget=true&gauthHost=https%3A%2F%2Fsso.garmin.com%2Fsso%2Fembed&service=https%3A%2F%2Fsso.garmin.com%2Fsso%2Fembed&source=https%3A%2F%2Fsso.garmin.com%2Fsso%2Fembed&redirectAfterAccountLoginUrl=https%3A%2F%2Fsso.garmin.com%2Fsso%2Fembed&redirectAfterAccountCreationUrl=https%3A%2F%2Fsso.garmin.com%2Fsso%2Fembed

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/config/custom_components/garmin_connect/config_flow.py", line 47, in async_step_user
await self.hass.async_add_executor_job(api.login)
File "/usr/local/lib/python3.13/concurrent/futures/thread.py", line 59, 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.com/sso/signin?id=gauth-widget&embedWidget=true&gauthHost=https%3A%2F%2Fsso.garmin.com%2Fsso%2Fembed&service=https%3A%2F%2Fsso.garmin.com%2Fsso%2Fembed&source=https%3A%2F%2Fsso.garmin.com%2Fsso%2Fembed&redirectAfterAccountLoginUrl=https%3A%2F%2Fsso.garmin.com%2Fsso%2Fembed&redirectAfterAccountCreationUrl=https%3A%2F%2Fsso.garmin.com%2Fsso%2Fembed

@E7winKamwendo
Copy link
Author

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: 17:52:49 (1 occurrences)
Last logged: 17:52:49

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 59, 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

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

5 participants