set up donut.js in package.json. "donut": "cross-env WECHATY_LOG=verbose nodemon -w examples/ examples/donut.ts"
run 'npm run donut'
set ONLY ONE message to the bot.
4. Expected behavior
Give a clear and concise description of what you expected to happen.
The test message shall only trigger on('message', ...) function only once and print only once in the log
5. Actual behavior
If applicable, add screenshots to help explain your problem. But do not paste log screenshots here.
The same message print out twice and with exact same time and contents
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!
Add any other context about the problem here.
The similar behavior can be reproduce in java project as well. no other logic and plugin involved. it is just the simplest get-started project with donut token. Does anyone have similar issue as this?
0. Report Issue Guide
Please run the following command and check whether the problem has been fixed: Tried, but same issie.
Please search in FAQ List first, and make sure your problem has not been solved before. Done.
Please search in the issue first, and make sure your problem had not been reported before Done.
1. Versions
What is your wechaty version? Answer: npm install wechaty@next. current version in package-lock : "version": "0.51.10",
What is your wechaty-puppet-donut version? (how to check?) Answer:
What is your node version? (run
node --version
) Answer: v10.17.0What os are you using Answer: MacOS Mojave
2. Describe the bug
Give a clear and concise description of what the bug is.
When ONE message send to the bot, the same message triggered on('message', ...) function twice.
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.
Steps to reproduce the behavior:
Follow the example in https://github.com/juzibot/donut-tester README.md. and use token puppet_donut_xxxxx
4. Expected behavior
Give a clear and concise description of what you expected to happen.
The test message shall only trigger on('message', ...) function only once and print only once in the log
5. Actual behavior
If applicable, add screenshots to help explain your problem. But do not paste log screenshots here. The same message print out twice and with exact same time and contents
15:31:22 VERB PuppetHostie contactRawPayload(wxid_1194601945911) 15:31:22 VERB PuppetHostie contactRawPayload(wxid_1194601945911) message: {"domain":null,"_events":{},"_eventsCount":0,"id":"1638160247976197174","payload":{"filename":"","fromId":"wxid_1194601945911","id":"1638160247976197174","mentionIdList":[],"roomId":"","text":"test","timestamp":1607747481000,"toId":"wxid_37gn4v1xgwvf22","type":7}} 15:31:22 VERB Puppet selfId() message: {"domain":null,"_events":{},"_eventsCount":0,"id":"1638160247976197174","payload":{"filename":"","fromId":"wxid_1194601945911","id":"1638160247976197174","mentionIdList":[],"roomId":"","text":"test","timestamp":1607747481000,"toId":"wxid_37gn4v1xgwvf22","type":7}} 15:31:22 VERB Puppet selfId()
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
```shell $ WECHATY_LOG=silly node yourbot.js Question: Paste your FULL(DO NOT ONLY PROVIDE FRAGMENTS) log messages Answer: 15:30:07 VERB PuppetManager resolveName(wechaty-puppet-hostie) 15:30:07 VERB PuppetManager checkModule(wechaty-puppet-hostie) 15:30:07 VERB Puppet constructor({"token":"xxxxx"}) #0 15:30:07 VERB StateSwitch constructor(PuppetHostie, "{"log":{"enableTimestamp":true,"logLevel":4,"prefixFilter":{}}}") 15:30:07 VERB MemoryCard constructor(undefined) 15:30:07 VERB MemoryCard getStorage() for storage type: N/A 15:30:07 VERB MemoryCard load() from storage: N/A 15:30:07 VERB MemoryCard load() no storage 15:30:07 VERB Puppet constructor() watchdog timeout set to 60 seconds 15:30:07 VERB HotImport callerResolve(., /Users/wuc/nodejsproject/wechaty-getting-started/node_modules/wechaty-puppet/dist/src/puppet.js) 15:30:07 VERB Puppet constructor() childClassPath=/Users/wuc/nodejsproject/wechaty-getting-started/node_modules/wechaty-puppet-hostie/dist/src/client 15:30:07 VERB Puppet setMemory() 15:30:07 VERB Wechaty initPuppetEventBridge(Puppet#07. Additional context
Add any other context about the problem here. The similar behavior can be reproduce in java project as well. no other logic and plugin involved. it is just the simplest get-started project with donut token. Does anyone have similar issue as this?
[bug]