-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Description
Important:Please file the issue follow the template, or we won't help you to solve the problem.
0. Report Issue Guide
- Please run the following command and check whether the problem has been fixed:
rm -rf package-lock.json
rm -rf node_modules
npm install
Nope.
- Please search in FAQ List first, and make sure your problem has not been solved before.
Nope.
- Please search in the issue first, and make sure your problem had not been reported before
Nope.
1. Versions
-
What is your wechaty version?
Answer: 0.26.1 (and also 0.27.x) -
Which puppet are you using for wechaty? (padchat/puppeteer/padpro/...)
Answer: puppeteer -
What is your wechaty-puppet-XXX(padchat/puppeteer/) version?
Answer: 0.16.1 -
What is your node version? (run
node --version
)
Answer: 12.6.0 -
What os are you using
Answer: OS X 10.14.5
2. Describe the bug
When name
is undefined
during runtime,
bot.Contact.find({name})
alerts the following error message
ERR Contact this.puppet.contactFindAll() rejected: query only support one key. multi key support is not availble now.
Which is misleading and confusing.
3. To Reproduce
This part is very important: if you can not provide any reproduce steps, then the problem will be very hard to be recognized.
I have made a minimal reproducible GitHub repo
Steps to reproduce the behavior:
- Clone the repo
- Run
yarn install
- Run
yarn start
4. Expected behavior
The error message tells the user that query key is undefined, or invalid.
5. Actual behavior
The error message tells the user that multi key is not available, which is confusing.
6. Full Output Logs
Set env WECHATY_LOG=silly
in order to set log level to silly, then we can get the full log (If you dosen't set log env, log level is info as default, we cannot get the full log)
We need full log instead of log screenshot or log fragments!
Show Logs
$ WECHATY_LOG=silly yarn start
21:14:52 VERB Contact find({})
21:14:52 VERB Contact findAll({})
21:14:52 VERB Puppet contactSearch(query={}, )
21:14:52 SILL Puppet contactSearch() searchIdList.length = 10
21:14:52 VERB Puppet contactQueryFilterFactory({})
21:14:52 ERR Contact this.puppet.contactFindAll() rejected: query only support one key. multi key support is not availble now.