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

micli list 提示登录 ssl证书有误 #41

Closed
zlc000190 opened this issue Mar 2, 2023 · 20 comments
Closed

micli list 提示登录 ssl证书有误 #41

zlc000190 opened this issue Mar 2, 2023 · 20 comments

Comments

@zlc000190
Copy link

Cannot connect to host account.xiaomi.com:443 ssl:True [SSLCertVerificationError: (1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:997)')]

@yihong0618
Copy link
Owner

check your network it should not include proxy

@zlc000190
Copy link
Author

vpn关闭了 还是不行

@zlc000190
Copy link
Author

代理都关闭也不行,查了很多,说是Charles 关闭。 我都没开Charles 还有代理检查已经 查出没用代理了。还是不行。 证书问题吗? 这个就不知道怎么弄了

@pjq
Copy link
Collaborator

pjq commented Mar 3, 2023

本地命令行能打开吗

curl -vv account.xiaomi.com

@pjq
Copy link
Collaborator

pjq commented Mar 3, 2023

这个提示就是MITM, 中间证书被拦截了, CERTIFICATE_VERIFY_FAILED, 如果Mac的, 看一下设置
image

@zlc000190
Copy link
Author

@pjq 好的,非常感谢,mac 我试一下

@zlc000190
Copy link
Author

代理设置这里我之前查看过了,都是关闭的。 curl -vv account.xiaomi.com 运行后的结果 看来,有个 TCP_NODELAY set

 curl -vv account.xiaomi.com

  •   Trying 123.125.102.21...
  • TCP_NODELAY set
  • Connected to account.xiaomi.com (123.125.102.21) port 80 (#0)

GET / HTTP/1.1
Host: account.xiaomi.com
User-Agent: curl/7.64.1
Accept: /
 
< HTTP/1.1 301 Moved Permanently
< Server: Server
< Date: Fri, 03 Mar 2023 07:36:07 GMT
< Content-Type: text/html
< Content-Length: 238
< Connection: keep-alive
< Location: https://account.xiaomi.com/

<title>301 Moved Permanently</title>

301 Moved Permanently


Powered by Server
tengine * Connection #0 to host account.xiaomi.com left intact * Closing connection 0

@zlc000190
Copy link
Author

这是代理的设置

image

@pjq
Copy link
Collaborator

pjq commented Mar 3, 2023

看你的设置好像没什么问题

@zlc000190
Copy link
Author

@pjq 是啊,我检查了但是就是一直报这个错

@joe12801
Copy link

joe12801 commented Mar 6, 2023

我根你一样,都有这个问题

@zlc000190
Copy link
Author

我解决了这个,但是ChatGPT那个又有问题

@greatbody
Copy link

我解决了这个,但是ChatGPT那个又有问题

求教如何解决的。

@Thxonly
Copy link

Thxonly commented Mar 10, 2023

我解决了这个,但是ChatGPT那个又有问题

求教如何解决的。

试试这个方法:https://github.com/Maxmudjon/Get_MiHome_devices_token

@zlc000190
Copy link
Author

@greatbody 解决ssl 997错误
您可以尝试安装 certifi 库。
你可以像这样用 pip 安装它。
pip install certifi
安装后你可以使用这个命令
/Applications/Python\ 3.10/install\ Certificates.command
只需将 python 版本更改为您在环境中使用的版本
并尝试再次运行您的程序。

这对我有用。

@zlc000190
Copy link
Author

@Thxonly 你这种思路解决了吗 运行成功没

@yihong0618
Copy link
Owner

fixed
run:

pip3 install -U git+https://github.com/yihong0618/MiService

@zs1621
Copy link

zs1621 commented Mar 18, 2023

参考这个 -> aio-libs/aiohttp#955 (comment)

@woiweb
Copy link

woiweb commented May 31, 2023

问题已经解决

Problem solved,you should reinstall the cerfificate,the comman as follow:

Navigate to
cd /Applications/Python\ 3.7/

Click on Install Certificates.command

This should solve it.

refer to:aio-libs/aiohttp#955 (comment)

@amazinghaha
Copy link

强!!!就是这个。

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