zhayujie / chatgpt-on-wechat

基于大模型搭建的聊天机器人,同时支持 微信公众号、企业微信应用、飞书、钉钉 等接入,可选择GPT3.5/GPT-4o/GPT-o1/ Claude/文心一言/讯飞星火/通义千问/ Gemini/GLM-4/Claude/Kimi/LinkAI,能处理文本、语音和图片,访问操作系统和互联网,支持基于自有知识库进行定制企业智能客服。
https://docs.link-ai.tech/cow
MIT License
31.59k stars 8.22k forks source link

扫码登录后报错 #1176

Open nebidun opened 1 year ago

nebidun commented 1 year ago

前置确认

⚠️ 搜索issues中是否已存在类似问题

操作系统类型?

Linux

运行的python版本是?

python 3.9

使用的chatgpt-on-wechat版本是?

Latest Release

运行的channel类型是?

wx(个人微信, itchat)

复现步骤 🕹

之前程序运行一直正常,这周发现已经无法正常登录,运行app.py后正常显示二维码;扫码后报错

问题描述 😯

之前程序运行一直正常,这周发现已经无法正常登录,运行app.py后正常显示二维码;扫码后报错

终端日志 📒

Please press confirm on your phone.
[ERROR][2023-05-30 19:03:18][app.py:52] - App startup failed!
[ERROR][2023-05-30 19:03:18][app.py:53] - HTTPSConnectionPool(host='wx8.qq.com', port=443): Max retries exceeded with url: /cgi-bin/mmwebwx-bin/webwxnewloginpage?ticket=CFUHHgndGi0iMlTDRWkmViP6@qrticket_0&uuid=Iawakgl1Lw==&lang=zh_CN&scan=1685444583 (Caused by SSLError(SSLCertVerificationError("hostname 'wx8.qq.com' doesn't match either of 'wx.qq.com', '*.web.wechat.com', '*.web1.wechat.com', '*.web2.wechat.com', '*.wechat.com', '*.weixin.qq.com', '*.wx.qq.com', '*.wx1.qq.com', '*.wx2.qq.com', 'wechat.com', 'weixin.qq.com', 'wx1.qq.com', 'wx2.qq.com'")))
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 699, in urlopen
    httplib_response = self._make_request(
  File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 382, in _make_request
    self._validate_conn(conn)
  File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 1012, in _validate_conn
    conn.connect()
  File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 464, in connect
    _match_hostname(cert, self.assert_hostname or server_hostname)
  File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 512, in _match_hostname
    match_hostname(cert, asserted_hostname)
  File "/usr/lib/python3.9/ssl.py", line 416, in match_hostname
    raise CertificateError("hostname %r "
ssl.SSLCertVerificationError: ("hostname 'wx8.qq.com' doesn't match either of 'wx.qq.com', '*.web.wechat.com', '*.web1.wechat.com', '*.web2.wechat.com', '*.wechat.com', '*.weixin.qq.com', '*.wx.qq.com', '*.wx1.qq.com', '*.wx2.qq.com', 'wechat.com', 'weixin.qq.com', 'wx1.qq.com', 'wx2.qq.com'",)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.9/dist-packages/requests/adapters.py", line 489, in send
    resp = conn.urlopen(
  File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 755, in urlopen
    retries = retries.increment(
  File "/usr/lib/python3/dist-packages/urllib3/util/retry.py", line 574, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='wx8.qq.com', port=443): Max retries exceeded with url: /cgi-bin/mmwebwx-bin/webwxnewloginpage?ticket=CFUHHgndGi0iMlTDRWkmViP6@qrticket_0&uuid=Iawakgl1Lw==&lang=zh_CN&scan=1685444583 (Caused by SSLError(SSLCertVerificationError("hostname 'wx8.qq.com' doesn't match either of 'wx.qq.com', '*.web.wechat.com', '*.web1.wechat.com', '*.web2.wechat.com', '*.wechat.com', '*.weixin.qq.com', '*.wx.qq.com', '*.wx1.qq.com', '*.wx2.qq.com', 'wechat.com', 'weixin.qq.com', 'wx1.qq.com', 'wx2.qq.com'")))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/root/chatgpt-on-wechat/app.py", line 50, in run
    channel.startup()
  File "/root/chatgpt-on-wechat/channel/wechat/wechat_channel.py", line 115, in startup
    itchat.auto_login(
  File "/root/chatgpt-on-wechat/lib/itchat/components/register.py", line 38, in auto_login
    self.login(enableCmdQR=enableCmdQR, picDir=picDir, qrCallback=qrCallback,
  File "/root/chatgpt-on-wechat/lib/itchat/components/login.py", line 61, in login
    status = self.check_login()
  File "/root/chatgpt-on-wechat/lib/itchat/components/login.py", line 154, in check_login
    if process_login_info(self, r.text):
  File "/root/chatgpt-on-wechat/lib/itchat/components/login.py", line 177, in process_login_info
    r = core.s.get(core.loginInfo['url'],
  File "/usr/local/lib/python3.9/dist-packages/requests/sessions.py", line 600, in get
    return self.request("GET", url, **kwargs)
  File "/usr/local/lib/python3.9/dist-packages/requests/sessions.py", line 587, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/local/lib/python3.9/dist-packages/requests/sessions.py", line 701, in send
    r = adapter.send(request, **kwargs)
  File "/usr/local/lib/python3.9/dist-packages/requests/adapters.py", line 563, in send
    raise SSLError(e, request=request)
requests.exceptions.SSLError: HTTPSConnectionPool(host='wx8.qq.com', port=443): Max retries exceeded with url: /cgi-bin/mmwebwx-bin/webwxnewloginpage?ticket=CFUHHgndGi0iMlTDRWkmViP6@qrticket_0&uuid=Iawakgl1Lw==&lang=zh_CN&scan=1685444583 (Caused by SSLError(SSLCertVerificationError("hostname 'wx8.qq.com' doesn't match either of 'wx.qq.com', '*.web.wechat.com', '*.web1.wechat.com', '*.web2.wechat.com', '*.wechat.com', '*.weixin.qq.com', '*.wx.qq.com', '*.wx1.qq.com', '*.wx2.qq.com', 'wechat.com', 'weixin.qq.com', 'wx1.qq.com', 'wx2.qq.com'")))
Chowhound-G commented 1 year ago

同,扫码登录之后就出现SSLError,然后终止