Skip to content
This repository has been archived by the owner on Jan 10, 2025. It is now read-only.

RECVD_MSG_API 连续收到1328次AssertionError #160

Closed
4 tasks done
Tracked by #144
ShiFangJuMie opened this issue Feb 19, 2024 · 1 comment · Fixed by #144
Closed
4 tasks done
Tracked by #144

RECVD_MSG_API 连续收到1328次AssertionError #160

ShiFangJuMie opened this issue Feb 19, 2024 · 1 comment · Fixed by #144
Labels
bug Something isn't working

Comments

@ShiFangJuMie
Copy link

ShiFangJuMie commented Feb 19, 2024

提bug前先检查以下是否已经执行

  • 我已更新了最新版本的代码
  • 我已经仔细地阅读了readme 文档
  • 我已在FAQ里查找了可能寻找的答案
  • 我已经尝试搜索过历史关闭issue寻找可能的答案

bug描述
我无法确定是否与 #140 属于相同问题,如果是因为掉线原因引发的话,我有2个补充信息
1、凌晨2点我有收到过机器人发的通知(截图中记录的时间有时区问题~)
2、我对healthz接口做了每60秒一次健康检查,如果失败会用另一个通道(企业微信的群聊机器人)告警,但我没有收到

我无法判断是不是因为wechatbot是健康的,但“wechaty 一直没登出所以一直报错”,如果是相同问题请close~

主要报错确实是集中在3和1205,穿插了极少数几条其他的

image
...省略...
image

提供有用的信息

{"event":"error","error":{"code":2,"details":"AssertionError [ERR_ASSERTION]: 400 != 400
    at Object.notEqual (/app/node_modules/.pnpm/wechat4u@0.7.14_patch_hash=mmirz2kximouh53sl2jk76abxe/node_modules/wechat4u/lib/util/global.js:79:24)
    at /app/node_modules/.pnpm/wechat4u@0.7.14_patch_hash=mmirz2kximouh53sl2jk76abxe/node_modules/wechat4u/lib/core.js:139:24
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)","message":"400 != 400","name":"AssertionError","stack":"AssertionError [ERR_ASSERTION]: 400 != 400
    at Object.notEqual (/app/node_modules/.pnpm/wechat4u@0.7.14_patch_hash=mmirz2kximouh53sl2jk76abxe/node_modules/wechat4u/lib/util/global.js:79:24)
    at /app/node_modules/.pnpm/wechat4u@0.7.14_patch_hash=mmirz2kximouh53sl2jk76abxe/node_modules/wechat4u/lib/core.js:139:24
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)"},"user":null}
{"event":"error","error":{"code":2,"details":"Error: getaddrinfo EAI_AGAIN wx.qq.com
    at AxiosError.from (/app/node_modules/.pnpm/axios@1.6.2_debug@2.6.9/node_modules/axios/dist/node/axios.cjs:837:14)
    at RedirectableRequest.handleRequestError (/app/node_modules/.pnpm/axios@1.6.2_debug@2.6.9/node_modules/axios/dist/node/axios.cjs:3083:25)
    at RedirectableRequest.emit (node:events:529:35)
    at eventHandlers.<computed> (/app/node_modules/.pnpm/follow-redirects@1.15.3_debug@2.6.9/node_modules/follow-redirects/index.js:14:24)
    at ClientRequest.emit (node:events:517:28)
    at TLSSocket.socketErrorListener (node:_http_client:501:9)
    at TLSSocket.emit (node:events:517:28)
    at emitErrorNT (node:internal/streams/destroy:151:8)
    at emitErrorCloseNT (node:internal/streams/destroy:116:3)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21)","message":"getaddrinfo EAI_AGAIN wx.qq.com","name":"Error","stack":"Error: getaddrinfo EAI_AGAIN wx.qq.com
    at AxiosError.from (/app/node_modules/.pnpm/axios@1.6.2_debug@2.6.9/node_modules/axios/dist/node/axios.cjs:837:14)
    at RedirectableRequest.handleRequestError (/app/node_modules/.pnpm/axios@1.6.2_debug@2.6.9/node_modules/axios/dist/node/axios.cjs:3083:25)
    at RedirectableRequest.emit (node:events:529:35)
    at eventHandlers.<computed> (/app/node_modules/.pnpm/follow-redirects@1.15.3_debug@2.6.9/node_modules/follow-redirects/index.js:14:24)
    at ClientRequest.emit (node:events:517:28)
    at TLSSocket.socketErrorListener (node:_http_client:501:9)
    at TLSSocket.emit (node:events:517:28)
    at emitErrorNT (node:internal/streams/destroy:151:8)
    at emitErrorCloseNT (node:internal/streams/destroy:116:3)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21)"},"user":{"_events":{},"_eventsCount":0,"id":"@7726d23b06f50dfb04869a80489fc9cfb75857511c2d80b1194a7bec9e9b0fdb","payload":{"alias":"","avatar":"/cgi-bin/mmwebwx-bin/webwxgeticon?seq=979771654&username=@7726d23b06f50dfb04869a80489fc9cfb75857511c2d80b1194a7bec9e9b0fdb&skey=@crypt_f7795e3d_b89cf6a8830ed9d37197536d619fb76d","friend":false,"gender":0,"id":"@7726d23b06f50dfb04869a80489fc9cfb75857511c2d80b1194a7bec9e9b0fdb","name":"NotifyBot & RSS","phone":[],"signature":"","star":false,"type":1}}}
@danni-cool
Copy link
Owner

danni-cool commented Feb 19, 2024

这个问题我也一直在测试,掉线wechaty层面不会提示掉线,目前还是在通过特定的assert错误去手动触发登出事件,

'400 != 400' /** 场景:微信服务器踢出登录 重建登录失败*/,

代码测试完后发布,还需要一定的时间在测试环境跑一下看登出的这个问题

@danni-cool danni-cool linked a pull request Feb 19, 2024 that will close this issue
16 tasks
@danni-cool danni-cool added the bug Something isn't working label Feb 19, 2024
@danni-cool danni-cool mentioned this issue Feb 19, 2024
16 tasks
danni-cool added a commit that referenced this issue Mar 2, 2024
- [x] #165
暂时只用文本展示
  - [x] 代码提交 @Daydaylw3 
  - [x] 文档增加说明
- [x] #159
    - [x] 增加有条件开启是否转发自己消息
    - [x] 消息增加标识自己
    - [x] 设备上自己发送消息上报recvd-api
    - [x] 通过推消息api自己发送的消息上报recvd-api
- [x] #140
  - [x] 系统消息单独定义类型 
  - [x] 根据特定的错误标识,提前触发logout 事件,并且屏蔽上报请求
  - [x] 完善readme
- [x] #160
  - [x] 尝试根据wechaty的通用错误手动触发 logout 事件,并且登出当前账号
  - [x] 版本部署测试环境,观测掉线事件中
  - [x] 优化代码,确保登出事件只触发一次
danni-cool added a commit that referenced this issue Mar 2, 2024
🤖 I have created a release *beep* *boop*
---


##
[2.6.1](v2.6.0...v2.6.1)
(2024-03-02)

### Feature

🎸 收消息API支持配置接受自己发的消,可配置开启close:#159
🎸 增加 收消息API 对 unKnown类型的 #165 
🎸 增加服务稳定性,针对web协议连续登录和登出场景优化,登出后报错至多上报一次 recvd_api, 登出消息通知更加及时。错误类型单独定义
#140, #160

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants