Skip to content
This repository has been archived by the owner on Jun 3, 2023. It is now read-only.

Error: ERR_INVALID_CONTACT_ID all ids should be number, R:107805(省略) is not a number #79

Open
xuwancheng opened this issue Sep 20, 2022 · 6 comments

Comments

@xuwancheng
Copy link

其中的一个wechaty(新购)企业微信在接收到图片处理后,发送回复消息成功后,系统收到如下的错误后,企业微信被强制退出,貌似服务器端出现了Exception,从提示的路径来看,是juzi服务器上的,麻烦协助处理,谢谢(比较着急)

(node:104784) UnhandledPromiseRejectionWarning: Error: 2 UNKNOWN: Error: ERR_INVALID_CONTACT_ID all ids should be number, R:107805(省略) is not a number.
at DataManager. (C:\juzi\node_modules@juzibot\wechaty-puppet-wxwork\dist\src\work\data\data-manager.js:995:23)
at Generator.next ()
at C:\juzi\node_modules@juzibot\wechaty-puppet-wxwork\dist\src\work\data\data-manager.js:31:71
at new Promise ()
at __awaiter (C:\juzi\node_modules@juzibot\wechaty-puppet-wxwork\dist\src\work\data\data-manager.js:27:12)
at DataManager.getContact (C:\juzi\node_modules@juzibot\wechaty-puppet-wxwork\dist\src\work\data\data-manager.js:993:16)
at DataManager. (C:\juzi\node_modules@juzibot\wechaty-puppet-wxwork\dist\src\work\data\data-manager.js:986:40)
at Generator.next ()
at C:\juzi\node_modules@juzibot\wechaty-puppet-wxwork\dist\src\work\data\data-manager.js:31:71
at new Promise ()
at Object.callErrorFromStatus (C:\Tools\WeRobot_V3.1\node_modules@grpc\grpc-js\build\src\call.js:31:26)
at Object.onReceiveStatus (C:\Tools\WeRobot_V3.1\node_modules@grpc\grpc-js\build\src\client.js:179:52)
at Object.onReceiveStatus (C:\Tools\WeRobot_V3.1\node_modules@grpc\grpc-js\build\src\client-interceptors.js:336:141)
at Object.onReceiveStatus (C:\Tools\WeRobot_V3.1\node_modules@grpc\grpc-js\build\src\client-interceptors.js:299:181)
at C:\Tools\WeRobot_V3.1\node_modules@grpc\grpc-js\build\src\call-stream.js:145:78
at processTicksAndRejections (internal/process/task_queues.js:75:11)
(node:104784) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 15596)

@xuwancheng
Copy link
Author

补充一下,我这边用的wechaty的版本是:[email protected],我这边一共有几个wechaty,新购的这个总是报错之后掉线(需要手机端退出Windows登录再次扫描二维码),其他的几个wechaty虽然报错,但是没有退出。很奇怪

@xuwancheng
Copy link
Author

wechaty升级到最新的版本(1.20.2)之后暂时没有报这个错误了,看来是版本的问题,希望以后版本兼容可以做得更好一些,如果其他人也遇到这个问题,可以尝试一下升级

@1334310385
Copy link

大佬,我也碰到这个问题,升级了wechat版本以后启动不起来,可以看下你其他依赖的版本吗

@xuwancheng
Copy link
Author

我观察了两天,其实问题还是存在的,只是机器人还是可以启动能用,暂时没有管他了

大佬,我也碰到这个问题,升级了wechat版本以后启动不起来,可以看下你其他依赖的版本吗

@wilson921108
Copy link

补充这个问题的另一场景,本地运行正常,正常接收信息和发送,
在手机端新建群聊后就报这个错误;
版本依赖信息: 用的wechaty 没用juzi/wechaty
"dependencies": {
"@juzi/wechaty": "^1.0.32",
"@juzi/wechaty-puppet-service": "^1.0.24",
"qrcode-terminal": "^0.12.0",
"wechaty": "^1.20.2",
"wechaty-puppet-service": "^1.19.8",
"wechaty-puppet-wechat": "^1.18.4"
},
"devDependencies": {
"@types/express": "^4.17.13",
"@types/node": "^18.6.3",
"@wecom/crypto": "^1.0.1",
"express": "^4.18.1",
"xml-js": "^1.6.11"
}

@hcfw007
Copy link
Member

hcfw007 commented Nov 25, 2022

这个问题应该不会影响运行吧。请参考juzibot/wechaty#12 。这个报错应该是由这个问题引起的。这个报错在wxwork内部应该是包住了的,不会影响运行。
可以考虑实现errorListener来handle错误,或者使用@juzi scope的wechaty,修复了此问题。

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants