wechatbot-webhook icon indicating copy to clipboard operation
wechatbot-webhook copied to clipboard

FAQ 遇到问题可先自查

Open danni-cool opened this issue 1 year ago • 6 comments

1. 登陆问题

1.1 微信个人信息合规问题 (新号请:实名+绑定手机号+绑定银行卡)

  • 因为微信未实名导致登陆不了。see https://github.com/danni-cool/docker-wechatbot-webhook/issues/39
  • 因为未开通微信支付登陆不了 see https://github.com/danni-cool/docker-wechatbot-webhook/issues/5
  • 因为未绑定银行卡导致登陆不了 see #88

1.2 登录时 AssertionError: 1205 == 0

  • 尝试手机上退出重新登录。see https://github.com/danni-cool/wechatbot-webhook/issues/188

1.3 触发了微信风控机制被限制登录

  • 等数个小时 or 天后 or 换个账号尝试。see https://github.com/danni-cool/wechatbot-webhook/issues/210

2. 掉线问题

2.1 登陆一段时间后掉线问题,web协议受微信风控策略控制,固定2天一掉。

  • reference:
    • https://github.com/danni-cool/docker-wechatbot-webhook/issues/37
    • https://github.com/danni-cool/docker-wechatbot-webhook/issues/9
    • https://github.com/danni-cool/docker-wechatbot-webhook/issues/204

2. 发送消息问题

2.2 文字没法换行,请使用 \n 转义字符

  • #208

2.3发送消息 1205 == 0 || 1204==0

  • 有可能是发送太频繁 https://github.com/danni-cool/wechatbot-webhook/issues/194
  • 尝试降低发送频率或者间隔一段时间 https://github.com/danni-cool/wechatbot-webhook/issues/216
  • https://github.com/danni-cool/wechatbot-webhook/issues/218

2.4 字符编码问题

  • windows bash 因为字符编码问题 see https://github.com/danni-cool/docker-wechatbot-webhook/issues/21

2.5 无法给文件传输助手发消息 User is not found

  • 大概率是被微信风控了,微信爸爸把文件传输助手从你的通讯录里摘除了,所以不要乱搞文件传输助手 (比如1小时发一条消息给文件传输助手)https://github.com/danni-cool/wechatbot-webhook/issues/21#issuecomment-1869188053

2.6无法艾特人

  • Web协议不支持@人
    • https://github.com/danni-cool/wechatbot-webhook/issues/57
    • https://github.com/danni-cool/wechatbot-webhook/issues/100

2.7发送昵称重复时会发给谁

  • 发给第一个匹配到的人
    • #135
    • #137

2.8发送消息时 {"success":false,"message":"Unauthorized: Access is denied due to invalid credentials."}

  • #182

2.9 发送给备注名时格式错误

  • https://github.com/danni-cool/wechatbot-webhook/issues/207

2.10 发送消息提示成功,但是实际未收到消息

  • https://github.com/danni-cool/wechatbot-webhook/issues/237

3. 联系人or群成员信息不是最新的

3.1 wechaty 信息同步问题:暂时不修复,重启容器解决(欢迎贡献PR)

  • https://github.com/danni-cool/docker-wechatbot-webhook/issues/64
  • https://github.com/danni-cool/wechatbot-webhook/issues/176

4. 收消息问题

4.1 无法区分是否是真 @,Wechaty 也是不区分的,有一原则上真 @ 和 @+手打你的昵称都算

  • https://github.com/danni-cool/wechatbot-webhook/issues/38

4.2 如何判断消息是否是引用消息

  • 如果你想类似web版本微信一样回复可以用以下结构 https://github.com/danni-cool/wechatbot-webhook/issues/38#issuecomment-1774336597)
  • https://github.com/danni-cool/wechatbot-webhook/issues/107

danni-cool avatar Dec 05 '23 03:12 danni-cool

请问下发送的文件URL,是否支持外网地址呢。 "data": { "type": "fileUrl" , "content": "https://pbs.twimg.com/media/GP6jidHbQAEN_Lv.jpg" }

gaoyaqiu avatar Jun 13 '24 02:06 gaoyaqiu

请问下发送的文件URL,是否支持外网地址呢。 "data": { "type": "fileUrl" , "content": "https://pbs.twimg.com/media/GP6jidHbQAEN_Lv.jpg" }

不解决墙的问题

danni-cool avatar Jun 13 '24 02:06 danni-cool

请问下 发送文件的接口,改成 python 的写法如何编写的,一直提示 "request body is not a valid json! checkout please."

curl --location --request POST 'http://localhost:3001/webhook/msg?token=[YOUR_PERSONAL_TOKEN]'
--form 'to=testGroup'
--form content=@"$HOME/demo.jpg"
--form 'isRoom=1'

python 代码如下: headers = {} files = { 'content': (file_name, open(_wx_bot_file_path, 'rb'), mime_type), } data = { 'to': 'test', 'isRoom': '1' # 确保值为字符串,避免可能的数据类型问题 } params = { 'token': '123456' } r = requests.post(self.send_message_api_url, headers=headers, files=files, data=data, params=params) print(f'respone: {r.text}')

gaoyaqiu avatar Jun 13 '24 13:06 gaoyaqiu

不应该是json=data嘛,不是data=data吧

---原始邮件--- 发件人: @.> 发送时间: 2024年6月13日(周四) 晚上9:01 收件人: @.>; 抄送: @.***>; 主题: Re: [danni-cool/wechatbot-webhook] FAQ 遇到问题可先自查 (Issue #72)

请问下 发送文件的接口,改成 python 的写法如何编写的,一直提示 "request body is not a valid json! checkout please."

curl --location --request POST 'http://localhost:3001/webhook/msg?token=[YOUR_PERSONAL_TOKEN]' --form 'to=testGroup' --form content=@"$HOME/demo.jpg" --form 'isRoom=1'

python 代码如下: headers = {} files = { 'content': (file_name, open(_wx_bot_file_path, 'rb'), mime_type), } data = { 'to': 'test', 'isRoom': '1' # 确保值为字符串,避免可能的数据类型问题 } params = { 'token': '123456' } r = requests.post(self.send_message_api_url, headers=headers, files=files, data=data, params=params) print(f'respone: {r.text}')

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.Message ID: @.***>

hhhhhge avatar Jun 13 '24 13:06 hhhhhge

不应该是json=data嘛,不是data=data吧 ---原始邮件--- 发件人: @.> 发送时间: 2024年6月13日(周四) 晚上9:01 收件人: @.>; 抄送: @.>; 主题: Re: [danni-cool/wechatbot-webhook] FAQ 遇到问题可先自查 (Issue #72) 请问下 发送文件的接口,改成 python 的写法如何编写的,一直提示 "request body is not a valid json! checkout please." curl --location --request POST 'http://localhost:3001/webhook/msg?token=[YOUR_PERSONAL_TOKEN]' --form 'to=testGroup' --form content=@"$HOME/demo.jpg" --form 'isRoom=1' python 代码如下: headers = {} files = { 'content': (file_name, open(_wx_bot_file_path, 'rb'), mime_type), } data = { 'to': 'test', 'isRoom': '1' # 确保值为字符串,避免可能的数据类型问题 } params = { 'token': '123456' } r = requests.post(self.send_message_api_url, headers=headers, files=files, data=data, params=params) print(f'respone: {r.text}') — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.Message ID: @.>

改成 json=data 还是提示 request body is not a valid json! checkout please. r = requests.post(self.send_message_api_url, headers=headers, files=files, json=data, params=params)

image

gaoyaqiu avatar Jun 13 '24 13:06 gaoyaqiu

files = {'content': open(_wx_bot_file_path, 'rb')} data = { 'to': "test", 'isRoom': "1" }

r = requests.post(self.send_message_api_url, files=files, data=data)

这样可以了!

gaoyaqiu avatar Jun 13 '24 13:06 gaoyaqiu