ehForwarderBot / efb-wechat-slave

A channel for EH Forwarder Bot.
GNU Affero General Public License v3.0
458 stars 62 forks source link

某个微信账号无法登陆 #25

Closed fleeto closed 5 years ago

fleeto commented 6 years ago

版本信息

EH Forwarder Bot
Version: 2.0.0b10
Python version:
3.6.3 (default, Nov 21 2017, 14:55:19)
[GCC 6.4.0]

Master channel:
    Telegram Master (blueset.telegram) 2.0.0b11 # Default profile

Slave channel:
    WeChat Slave (blueset.wechat) 2.0.0a12

Middlewares:
    No middleware is enabled.

问题描述

同时使用的另外一个账号无此故障

重现步骤

Verbose 日志

Verbose 日志 ``` ehforwarderbot -v 2018-06-07 04:03:29,345 [Level 99]: ehforwarderbot.__main__ (__main__.init; __main__.py:77) Initializing slave blueset.wechat... Traceback (most recent call last): File "/usr/bin/ehforwarderbot", line 11, in sys.exit(main()) File "/usr/lib/python3.6/site-packages/ehforwarderbot/__main__.py", line 190, in main init() File "/usr/lib/python3.6/site-packages/ehforwarderbot/__main__.py", line 82, in init coordinator.add_channel(cls(instance_id=instance_id)) File "/usr/lib/python3.6/site-packages/efb_wechat_slave/__init__.py", line 174, in __init__ self.authenticate('console_qr_code') File "/usr/lib/python3.6/site-packages/efb_wechat_slave/__init__.py", line 518, in authenticate logout_callback=self.exit_callback) File "/usr/lib/python3.6/site-packages/efb_wechat_slave/wxpy/api/bot.py", line 86, in __init__ loginCallback=login_callback, exitCallback=logout_callback File "/usr/lib/python3.6/site-packages/itchat/components/register.py", line 29, in auto_login loginCallback=loginCallback, exitCallback=exitCallback): File "/usr/lib/python3.6/site-packages/itchat/components/hotreload.py", line 54, in load_login_status self.loginInfo['User'] = templates.User(self.loginInfo['User']) KeyError: 'User' ```
fleeto commented 6 years ago

补充一下重新配置得到的错误信息

If the QR code was not shown correctly, please visit:
https://login.weixin.qq.com/qrcode/XXXX
Traceback (most recent call last):
  File "/usr/bin/ehforwarderbot", line 11, in <module>
    sys.exit(main())
  File "/usr/lib/python3.6/site-packages/ehforwarderbot/__main__.py", line 190, in main
    init()
  File "/usr/lib/python3.6/site-packages/ehforwarderbot/__main__.py", line 82, in init
    coordinator.add_channel(cls(instance_id=instance_id))
  File "/usr/lib/python3.6/site-packages/efb_wechat_slave/__init__.py", line 174, in __init__
    self.authenticate('console_qr_code')
  File "/usr/lib/python3.6/site-packages/efb_wechat_slave/__init__.py", line 518, in authenticate
    logout_callback=self.exit_callback)
  File "/usr/lib/python3.6/site-packages/efb_wechat_slave/wxpy/api/bot.py", line 96, in __init__
    enhance_webwx_request(self)
  File "/usr/lib/python3.6/site-packages/efb_wechat_slave/wxpy/utils/misc.py", line 327, in enhance_webwx_request
    '&pass_ticket={li[pass_ticket]}'.format(li=login_info)
KeyError: 'wxsid'
fleeto commented 6 years ago

login_info 我用 json.dumps 出来看了一下:

{
  "url": "https://wx2.qq.com/cgi-bin/mmwebwx-bin",
  "fileUrl": "https://file.wx2.qq.com/cgi-bin/mmwebwx-bin",
  "syncUrl": "https://webpush.wx2.qq.com/cgi-bin/mmwebwx-bin",
  "deviceid": "abcded",
  "BaseRequest": {}
}
blueset commented 5 years ago

No relevant report on this issue in the last year. Regarding this as a Web WeChat server-side glitch. Marking this issue as stale and closing as this is out of date.

dangfan commented 5 years ago

I met the same KeyError.

Traceback (most recent call last):
  File "/usr/local/bin/ehforwarderbot", line 11, in <module>
    load_entry_point('ehforwarderbot==2.0.0b20.dev6', 'console_scripts', 'ehforwarderbot')()
  File "/usr/local/lib/python3.6/site-packages/ehforwarderbot/__main__.py", line 269, in main
    init(conf)
  File "/usr/local/lib/python3.6/site-packages/ehforwarderbot/__main__.py", line 91, in init
    coordinator.add_channel(cls(instance_id=instance_id))
  File "/usr/local/lib/python3.6/site-packages/efb_wechat_slave/__init__.py", line 151, in __init__
    self.authenticate('console_qr_code')
  File "/usr/local/lib/python3.6/site-packages/efb_wechat_slave/__init__.py", line 535, in authenticate
    logout_callback=self.exit_callback)
  File "/usr/local/lib/python3.6/site-packages/efb_wechat_slave/vendor/wxpy/api/bot.py", line 97, in __init__
    enhance_webwx_request(self)
  File "/usr/local/lib/python3.6/site-packages/efb_wechat_slave/vendor/wxpy/utils/misc.py", line 327, in enhance_webwx_request
    '&pass_ticket={li[pass_ticket]}'.format(li=login_info)
KeyError: 'wxsid'
yi-ji commented 5 years ago

Same errors happened when I tried to scan WeChat login QR code


  File "/home/ec2-user/.local/bin/ehforwarderbot", line 11, in <module>
    sys.exit(main())
  File "/home/ec2-user/.local/lib/python3.7/site-packages/ehforwarderbot/__main__.py", line 267, in main
    init(conf)
  File "/home/ec2-user/.local/lib/python3.7/site-packages/ehforwarderbot/__main__.py", line 91, in init
    coordinator.add_channel(cls(instance_id=instance_id))
  File "/home/ec2-user/.local/lib/python3.7/site-packages/efb_wechat_slave/__init__.py", line 174, in __init__
    self.authenticate('console_qr_code')
  File "/home/ec2-user/.local/lib/python3.7/site-packages/efb_wechat_slave/__init__.py", line 521, in authenticate
    logout_callback=self.exit_callback)
  File "/home/ec2-user/.local/lib/python3.7/site-packages/efb_wechat_slave/wxpy/api/bot.py", line 97, in __init__
    enhance_webwx_request(self)
  File "/home/ec2-user/.local/lib/python3.7/site-packages/efb_wechat_slave/wxpy/utils/misc.py", line 327, in enhance_webwx_request
    '&pass_ticket={li[pass_ticket]}'.format(li=login_info)
KeyError: 'wxsid'```
yi-ji commented 5 years ago

It seems that all WeChat account registered by non-CN phone number without ID verified will encounter this problem. Damn Tencent

blueset commented 5 years ago

Please check if you can use Web WeChat before logging in to EWS. Any login-time error could be due to denial of service from the server.