-
Notifications
You must be signed in to change notification settings - Fork 64
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
UnhandledPromiseRejectionWarning: Error: cannot get user_name from raw payload #309
Comments
Do you know what's this Can you reproduce it always? It seem that |
Yeah, it is reproducible to me -- I'm getting it all the times. And in deed that
where can I find the API for the |
You can get detail from the source code. |
The exception of
I.e., the # 1 reason I hate Anyway, I believe the
will probe further to see if I can trigger that call myself... thx! |
No! Find a group info that is perfectly valid (passed through the strict validation perfectly), but I'm still getting the So there is still something wrong with the |
Thanks a lot working towards fixing it. Thanks again! |
0. Report Issue Guide
Not fixed.
Not reported before.
1. Versions
What is your node version? (run
node --version
)Answer: v10.21.0
What os are you using
Answer:
2. Describe the bug
Recently I'm getting the following errors when running with
wechaty-puppet-padplus
:(node:69429) UnhandledPromiseRejectionWarning: Error: cannot get user_name from raw payload: {"alias":"","bigHeadUrl":"http://wx.qlogo.cn/mmcrhead/.../0","chatRoomOwner":"wxid_5j...w12","chatroomId":"60..940@chatroom","chatroomVersion":700003494,"contactType":"","memberCount":498,"members":[{"UserName":"wxid_5j..lw12","Wxid":"wxid_5j..lw12","Tag8":0,"MemberContactFlag":1,"NickName":"xxx"},{"UserName":"wxid_81er...c22","Wxid":...,{"UserName":"wxid_8k...m22","Wxid":"wxid_8k...m22","Tag8":0,"MemberContactFlag":1,"NickName":"xx."},{"UserName":"xx","Wxid":"xx","Tag8":0,"MemberContactFlag":1,"NickName":"xx"}],"nickName":"xx️"ÿ,"smallHeadUrl":"http://wx.qlogo.cn/mmcrhead/.../0","stranger":"v1_...@stranger","tagList":"","ticket":""} at Object.contactRawPayloadParser (/path/to/node_modules/wechaty-puppet-padplus/dist/src/pure-function-helpers/contact-raw-payload-parser.js:31:15) at PuppetPadplus.<anonymous> (/path/to/node_modules/wechaty-puppet-padplus/dist/src/puppet-padplus.js:379:58) at Generator.next (<anonymous>) at /path/to/node_modules/wechaty-puppet-padplus/dist/src/puppet-padplus.js:8:71 at new Promise (<anonymous>) at __awaiter (/path/to/node_modules/wechaty-puppet-padplus/dist/src/puppet-padplus.js:4:12) at PuppetPadplus.contactRawPayloadParser (/path/to/node_modules/wechaty-puppet-padplus/dist/src/puppet-padplus.js:377:16) at PuppetPadplus.<anonymous> (/path/to/node_modules/wechaty-puppet/dist/src/puppet.js:473:40) at Generator.next (<anonymous>) at fulfilled (/path/to/node_modules/wechaty-puppet/dist/src/pupp at Page.goto (/path/to/node_modules/puppeteer/lib/Page.js:553:53) at Page.<anonymous> (/path/to/node_modules/puppeteer/lib/helper.remote: Total 5 (delta 3), reused 0 (delta 0) Unpacking objects: 100% (5/5), done. et.js:5:58) (node:69429) 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(). (rejection id: 9)
It has happened several times now, and it seems to be all happening to big groups that I joined, like the one above. I.e., all of them are around 500 users.
3. To Reproduce
Steps to reproduce the behavior:
ding-dong-bot.js
from https://github.com/wechaty/wechaty-getting-started/ withwechaty-puppet-padplus
as the puppetPuppetPadplus.contactRawPayloadParser
is somehow invoked. Seewechaty-puppet-padplus/dist/src/pure-function-helpers/contact-raw-payload-parser.js:31:15
andwechaty-puppet-padplus/dist/src/puppet-padplus.js:377:16
, andGenerator.next
atpuppet-padplus.js:8:71
.4. Expected behavior
Not seeing such error, as it had been before.
5. Actual behavior
I'm getting such errors recently.
6. Full Output Logs
As above.
7. Additional context
If you take a closer look at the json string, there is an extra "ÿ" before
"smallHeadUrl":
that is outside of string quote:{"UserName":"xx","Wxid":"xx","Tag8":0,"MemberContactFlag":1,"NickName":"xx"}],"nickName":"xx️"ÿ,"smallHeadUrl":"http://wx.qlogo.cn/mmcrhead/.../0","stranger":"v1_...@stranger","tagList":"","ticket":""}
This might be the reason for the parser to fail, as that extra "ÿ" should not be there, or at least within the quote
"
. However, this might well just be an output glitch, so I'm only pointing it out here, in hope it might help.[bug]
The text was updated successfully, but these errors were encountered: