Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

启动后,发现两个未捕获异常 #56

Open
sinajia opened this issue Apr 26, 2023 · 1 comment
Open

启动后,发现两个未捕获异常 #56

sinajia opened this issue Apr 26, 2023 · 1 comment

Comments

@sinajia
Copy link

sinajia commented Apr 26, 2023

2023-04-26 11:56: GError: query must provide at least one key. current query is empty.
2023-04-26 11:56:     at PuppetWechat4u.contactQueryFilterFactory (file:///yj/prj/wechatbot/node_modules/wechaty-puppet/dist/esm/src/mixins/contact-mixin.js:117:23)
2023-04-26 11:56:     at PuppetWechat4u.contactSearch (file:///yj/prj/wechatbot/node_modules/wechaty-puppet/dist/esm/src/mixins/contact-mixin.js:64:41)
2023-04-26 11:56:     at async Function.findAll (file:///yj/prj/wechatbot/node_modules/wechaty/dist/esm/src/user-modules/contact.js:129:35)
2023-04-26 11:56:     at async Function.find (file:///yj/prj/wechatbot/node_modules/wechaty/dist/esm/src/user-modules/contact.js:84:29)
2023-04-26 11:56:     at async Promise.all (index 0)
2023-04-26 11:56:     at async PuppetWechat4u.<anonymous> (file:///yj/prj/wechatbot/node_modules/wechaty/dist/esm/src/wechaty-mixins/puppet-mixin.js:273:56) {
2023-04-26 11:56:   code: 2,
2023-04-26 14:10: AssertionError [ERR_ASSERTION]: 1205 == 0
2023-04-26 14:10:     at Object.equal (/yj/prj/wechatbot/node_modules/wechat4u/lib/util/global.js:69:24)
2023-04-26 14:10:     at /yj/prj/wechatbot/node_modules/wechat4u/lib/core.js:324:24
2023-04-26 14:10:     at runMicrotasks (<anonymous>)
2023-04-26 14:10:     at processTicksAndRejections (node:internal/process/task_queues:96:5)
2023-04-26 14:10:     at async Promise.all (index 0) {
2023-04-26 14:10:   code: 2,
2023-04-26 14:10:   details: 'AssertionError [ERR_ASSERTION]: 1205 == 0\n' +
2023-04-26 14:10:     '    at Object.equal (/yj/prj/wechatbot/node_modules/wechat4u/lib/util/global.js:69:24)\n' +
2023-04-26 14:10:     '    at /yj/prj/wechatbot/node_modules/wechat4u/lib/core.js:324:24\n' +
2023-04-26 14:10:     '    at runMicrotasks (<anonymous>)\n' +
2023-04-26 14:10:     '    at processTicksAndRejections (node:internal/process/task_queues:96:5)\n' +
2023-04-26 14:10:     '    at async Promise.all (index 0)'
2023-04-26 14:10: }
@bestK
Copy link

bestK commented Jul 4, 2023

我也遇到了

2023-04-26 11:56: GError: query must provide at least one key. current query is empty.

测试发现当触发 room-jon 事件时必现,debug 跟踪到
image

this.emit('room-join', room, inviteeList, inviter, date);

这行代码执行完没有问题,而自己定义的 room-jon 只有 3 个参数

 .on('room-join', async (room, inviteeList, inviter,// 这里少了个 date) => {
    console.log('received room-join event ');
  })

修改成

 .on('room-join', async (room, inviteeList, inviter, date) => {
    console.log('received room-join event ');
  })

image

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

No branches or pull requests

2 participants