efb-wechat-slave
efb-wechat-slave copied to clipboard
[BUG] KeyError: 'webwx_data_ticket' , wechat can't receive some messages
Describe the bug
wechat logout and error log showed:

To Reproduce
Error Logs:
ret = func(*args, **kwargs)
May 30 19:37:28 oracle-centos-2 ehforwarderbot[30474]: File "/usr/local/lib/python3.6/site-packages/efb_wechat_slave/vendor/wxpy/api/chats/chat.py", line 52, in do_send
May 30 19:37:28 oracle-centos-2 ehforwarderbot[30474]: return itchat_partial_func(**itchat_call_or_ret)
May 30 19:37:28 oracle-centos-2 ehforwarderbot[30474]: File "/usr/local/lib/python3.6/site-packages/efb_wechat_slave/vendor/itchat/components/messages.py", line 441, in send_image
May 30 19:37:28 oracle-centos-2 ehforwarderbot[30474]: r = self.upload_file(fileDir, isPicture=not fileDir[-4:] == '.gif', file_=file_)
May 30 19:37:28 oracle-centos-2 ehforwarderbot[30474]: File "/usr/local/lib/python3.6/site-packages/efb_wechat_slave/vendor/itchat/components/messages.py", line 347, in upload_file
May 30 19:37:28 oracle-centos-2 ehforwarderbot[30474]: file_, chunk, chunks, uploadMediaRequest)
May 30 19:37:28 oracle-centos-2 ehforwarderbot[30474]: File "/usr/local/lib/python3.6/site-packages/efb_wechat_slave/vendor/itchat/components/messages.py", line 372, in upload_chunk_file
May 30 19:37:28 oracle-centos-2 ehforwarderbot[30474]: ('webwx_data_ticket', (None, cookiesList['webwx_data_ticket'])),
May 30 19:37:28 oracle-centos-2 ehforwarderbot[30474]: KeyError: 'webwx_data_ticket'
Screenshots
Version information (please complete the following information):
- OS: CentOS 7.6 EH Forwarder Bot
EH Forwarder Bot Version: 2.1.1 Python version: 3.6.8 (default, Nov 16 2020, 16:55:22) [GCC 4.8.5 20150623 (Red Hat 4.8.5-44)] Running on profile "default".
Master channel: Telegram Master (blueset.telegram) 2.3.1 # Default instance
Slave channel: WeChat Slave (blueset.wechat) 2.0.7 # Default instance
Middlewares: MP InstantView Middleware (catbaron.mp_instantview) 0.3.2 # Default instance Patch Middleware (patch.PatchMiddleware) 2.0.23 # Default instance
Seems like a change from Web WC server. Can you confirm if you can access Web WC via a browser?
Yes, web wechat is ok, and It is normal to scan the code again to log in. Can any middleware cause this problem?
Patch Middleware might be relevant, as it directly modifies the code of EWS. Maybe try disable it temporarily to see if it helps?
I will try to disable it and see if it helps, (but the Patch Middleware is useful...)