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

有时候在某些情况下,比如场景一:用户进群提醒这块会报错,等一些其他情况下也会报这个错 #2679

Open
aqpmzngldh opened this issue Apr 28, 2024 · 1 comment

Comments

@aqpmzngldh
Copy link

Caught exception: Error: query must provide at least one key. current query is empty.
uncaughtException GError: query must provide at least one key. current query is empty.
at PuppetWechat4u.contactQueryFilterFactory (file:///www/wwwroot/wxq/node_modules/wechaty-puppet/dist/esm/src/mixins/contact-mixin.js:117:23)
at PuppetWechat4u.contactSearch (file:///www/wwwroot/wxq/node_modules/wechaty-puppet/dist/esm/src/mixins/contact-mixin.js:64:41)
at async Function.findAll (file:///www/wwwroot/wxq/node_modules/wechaty/dist/esm/src/user-modules/contact.js:129:35)
at async Function.find (file:///www/wwwroot/wxq/node_modules/wechaty/dist/esm/src/user-modules/contact.js:84:29)
at async Promise.all (index 0)
at async PuppetWechat4u. (file:///www/wwwroot/wxq/node_modules/wechaty/dist/esm/src/wechaty-mixins/puppet-mixin.js:273:56) {
code: 2,
details: 'Error: query must provide at least one key. current query is empty.\n' +
' at PuppetWechat4u.contactQueryFilterFactory (file:///www/wwwroot/wxq/node_modules/wechaty-puppet/dist/esm/src/mixins/contact-mixin.js:117:23)\n' +
' at PuppetWechat4u.contactSearch (file:///www/wwwroot/wxq/node_modules/wechaty-puppet/dist/esm/src/mixins/contact-mixin.js:64:41)\n' +
' at async Function.findAll (file:///www/wwwroot/wxq/node_modules/wechaty/dist/esm/src/user-modules/contact.js:129:35)\n' +
' at async Function.find (file:///www/wwwroot/wxq/node_modules/wechaty/dist/esm/src/user-modules/contact.js:84:29)\n' +
' at async Promise.all (index 0)\n' +
' at async PuppetWechat4u. (file:///www/wwwroot/wxq/node_modules/wechaty/dist/esm/src/wechaty-mixins/puppet-mixin.js:273:56)'
}

Copy link

dosubot bot commented Apr 28, 2024

The error "query must provide at least one key. current query is empty" indicates that a query operation was attempted without specifying any key or criteria. This is common in operations like fetching user or group information where at least one identifying parameter is required.

To fix this, ensure every query operation in your code specifies valid and non-empty keys or criteria. For instance, when looking for user information or group details, confirm that identifiers like user ID or group ID are correctly provided and not left empty.

In the context of wechaty-puppet and wechaty, this error might occur if the code tries to perform operations without necessary identifiers. Review the sections of your code where you're fetching contacts or groups to ensure identifiers are properly included in your queries.

If you're still facing issues, checking the implementation and usage of wechaty-puppet and wechaty in your application might help identify the cause. Also, consider looking into similar issues reported in the community, such as query must provide at least one key. current query is empty., for additional insights or solutions.

Details

Sources


About Dosu
This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research.

Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.

To continue the conversation, mention @dosu.

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

1 participant