yihong0618 / running_page

Make your own running home page
https://running-page.vercel.app
MIT License
3.43k stars 992 forks source link

Garmin sync error #504

Closed shaonianche closed 9 months ago

shaonianche commented 10 months ago

error

app4g commented 10 months ago

same here.. :-(

yihong0618 commented 10 months ago

yes we know that issue, will try to fix it these days

naosense commented 10 months ago

今天刚出现的,昨天还是好的

app4g commented 10 months ago

yes.. it was good yesterday. Many other packages also broken from some changes at Garmin

yihong0618 commented 10 months ago

maybe need some big change, so we need to wait....

yihong0618 commented 10 months ago

修复了,按照如下步骤实验

yihong0618 commented 10 months ago

按照我的能成功么?

naosense commented 10 months ago

按照我的能成功么?

可以了

weaming commented 10 months ago

可惜是 python 版本,ts 版本怎么修

yihong0618 commented 10 months ago

一样啊,看懂代码其实是现在用 header 验证了 url 改了,不难修的

misaka9981 commented 10 months ago
  • python run_page/garmin_sync.py ${email} ${password} --is-cn

Get 403 error when obtain secret_string by following command.

 python3 scripts/garmin_sync.py xxx@gmail.com xxx --is-cn 

httpcore.ConnectError: SSL handshake is taking longer than 60.0 seconds: aborting the connection

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

httpx.ConnectError: SSL handshake is taking longer than 60.0 seconds: aborting the connection

During handling of the above exception, another exception occurred:

httpx.HTTPStatusError: 403 Client Error: Forbidden for url: https://connect.garmin.cn/proxy/activitylist-service/activities/search/activities?start=0&limit=100

/opt/homebrew/lib/python3.9/site-packages/httpx/_client.py:1778: UserWarning: Unclosed <httpx.AsyncClient object at 0x1077562b0>. See https://www.python-httpx.org/async/#opening-and-closing-clients for details.
yihong0618 commented 10 months ago

just check it work fine here, and its based on https://github.com/matin/garth you can use this to check its ssl error...please check internet, and ssl things

zerosrat commented 9 months ago

@yihong0618

image
yihong0618 commented 9 months ago

@zerosrat 确实,我这里研究下。

yihong0618 commented 9 months ago

@zerosrat 那样的话我害怕多次请求。。。。容易 ban 号,我研究下为什么 研究了一下,我觉得可以改成之前的账号密码形式。

yihong0618 commented 9 months ago

@zerosrat 修复了,拉取最新代码就行

efish2002 commented 9 months ago

requirements.txt 中添加了garth 出现下面的错误 image

yihong0618 commented 9 months ago

requirements.txt 中添加了garth 出现下面的错误 image

需要大于 3.8

efish2002 commented 9 months ago

python run_page/garmin_sync.py ${{ secrets.GARMIN_SECRET_STRING_CN }} --only-run --is-cn secrets.GARMIN_SECRET_STRING_CN 这个是要在secret中自己定义吗? 格式是什么呢? “佳明的用户名 密码” 吗? image

shaonianche commented 9 months ago

secrets.GARMIN_SECRET_STRING_CN 这个是要在secret中自己定义吗? 格式是什么呢?

是需要自己定义的,这是个使用用戶名密码获取的字符串。步骤参见下文: https://github.com/yihong0618/running_page/issues/504#issuecomment-1735815795

outcastveron commented 9 months ago

本地获取secret的时候报错,麻烦看下

PS C:\Users\limia\Downloads\running_page-master\run_page> python get_garmin_secret.py ${XXXX@hotmail.com} ${XXXX} --is-cn Traceback (most recent call last): File "C:\Users\limia\AppData\Local\Programs\Python\Python310\lib\site-packages\garth\http.py", line 127, in request self.last_resp.raise_for_status() File "C:\Users\limia\AppData\Local\Programs\Python\Python310\lib\site-packages\requests\models.py", line 960, 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 "C:\Users\limia\Downloads\running_page-master\run_page\get_garmin_secret.py", line 18, in garth.login(options.email, options.password) File "C:\Users\limia\AppData\Local\Programs\Python\Python310\lib\site-packages\garth\http.py", line 148, in login self.oauth1_token, self.oauth2_token = sso.login(args, client=self) File "C:\Users\limia\AppData\Local\Programs\Python\Python310\lib\site-packages\garth\sso.py", line 79, in login client.post( File "C:\Users\limia\AppData\Local\Programs\Python\Python310\lib\site-packages\garth\http.py", line 139, in post return self.request("POST", args, **kwargs) File "C:\Users\limia\AppData\Local\Programs\Python\Python310\lib\site-packages\garth\http.py", line 129, in request raise GarthHTTPError( 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

efish2002 commented 9 months ago

secrets.GARMIN_SECRET_STRING_CN 这个是要在secret中自己定义吗? 格式是什么呢?

是需要自己定义的,这是个使用用戶名密码获取的字符串。步骤参见下文: #504 (comment)

成功了,谢谢

shaonianche commented 9 months ago

本地获取secret的时候报错,麻烦看下

@outcastveron 检查一下您的用戶名密码是否正确,运行脚本的时候可以用引号包含一下用戶名密码 python get_garmin_secret.py "用戶名" "密码" --is-cn

outcastveron commented 9 months ago

@shaonianche 感谢回复,已经解决!