ehForwarderBot / efb-wechat-slave

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

[BUG] 在一次wechat转发tg timeout后再也无法登录wechat, efb-wechat-slave #123

Closed kvneight closed 2 years ago

kvneight commented 2 years ago

版本信息 Version Info

EH Forwarder Bot
Version: 2.1.1
Python version:
3.6.9

Master channel:
    efb-telegram-master:2.2.4

Slave channel:
    efb-wechat-slave:2.0.5

Middleware:
    none

问题描述 Describe the bug

在一次wechat信息转发失败后tg没有返回失败,wechat也无法退出, 重启efb后无法初始化wechat slave模块.

Verbose 日志 Log

Verbose 日志 ``` 请在下方贴出您的 Verbose 日志。如果您对隐私有所顾虑,您可以自行 隐去隐私信息、或 GPG 加密至 BD6B65EC00638DC9083781D5D4B65BB1A106200A。 【贴在下面】 efb启动时log如下 2021-12-16 18:18:20,793 [Level 99]: ehforwarderbot.__main__ (__main__.init; __main__.py:129) Initializing slave blueset.wechat... Traceback (most recent call last): File "/usr/local/bin/ehforwarderbot", line 11, in sys.exit(main()) File "/usr/local/lib/python3.6/dist-packages/ehforwarderbot/__main__.py", line 335, in main init(conf) File "/usr/local/lib/python3.6/dist-packages/ehforwarderbot/__main__.py", line 135, in init coordinator.add_channel(cls(instance_id=instance_id)) File "/usr/local/lib/python3.6/dist-packages/efb_wechat_slave/__init__.py", line 157, in __init__ self.authenticate('console_qr_code', first_start=True) File "/usr/local/lib/python3.6/dist-packages/efb_wechat_slave/__init__.py", line 666, in authenticate start_immediately=not first_start) File "/usr/local/lib/python3.6/dist-packages/efb_wechat_slave/vendor/wxpy/api/bot.py", line 88, in __init__ loginCallback=login_callback, exitCallback=logout_callback File "/usr/local/lib/python3.6/dist-packages/efb_wechat_slave/vendor/itchat/components/register.py", line 33, in auto_login loginCallback=loginCallback, exitCallback=exitCallback) File "/usr/local/lib/python3.6/dist-packages/efb_wechat_slave/vendor/itchat/components/login.py", line 43, in login uuid = push_login(self) File "/usr/local/lib/python3.6/dist-packages/efb_wechat_slave/vendor/itchat/components/login.py", line 95, in push_login r = core.s.get(url, headers=headers).json() File "/usr/local/lib/python3.6/dist-packages/requests/models.py", line 910, in json return complexjson.loads(self.text, **kwargs) File "/usr/lib/python3.6/json/__init__.py", line 354, in loads return _default_decoder.decode(s) File "/usr/lib/python3.6/json/decoder.py", line 339, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/usr/lib/python3.6/json/decoder.py", line 357, in raw_decode raise JSONDecodeError("Expecting value", s, err.value) from None json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0) 【贴在上面】 ```

备注 Additional context

blueset commented 2 years ago

请确认下是否能正常使用 Web Wechat。

kvneight commented 2 years ago

chrome里打开web wechat 登录正常

blueset commented 2 years ago

可以尝试备份并删除 $EFB_DATA/profiles/default/blueset.wechat/wxpy.pkl 试试?

blueset commented 2 years ago

看起来有可能是 Web WC 方面的变更导致登录失效。待调查具体原因。

kvneight commented 2 years ago

删除后可以了

yangsheng6810 commented 2 years ago

遇到了类似的报错信息并无法初始化wechat-slave模块。 @blueset 的workaround可用。网页可以登陆,但是在EFB里会显示“微信服务器已将您登出”。更新至master后解决。