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

`cannot get user_name from raw payload: {} [object Promise]` Error #1399

Closed
lijiarui opened this Issue Jun 27, 2018 · 1 comment

Comments

Projects
None yet
2 participants
@lijiarui
Copy link
Member

lijiarui commented Jun 27, 2018

Wechaty version:

docker v0.17.24

Issue

When call contact.ready() get the following error:

Log

09:51:10 VERB PuppetPadChat messageRawPayloadParser({msg_id="5685138802960902879"})
09:51:10 SILL PuppetPadchat messagePayload({"id":"5685138802960902879","timestamp":1530064249,"type":6,"fromId":"wxid_koa5mg04di4722","roomId":"6972854623@chatroom","toId":"wxid_6rmhz4j1mb6622","text":"为啥我会不计日夜的疯狂发话费充值卡广告?\n是爱吗?\n是责任吗?\n错,是穷,是穷,是穷。\n\n\n各位老板,请支持下我的事业,支持下我的梦想。为我加油[Fist]\n谢谢你陌生人。面值100元话费充值卡。10元左右批发。适合教育机构招生,学校招生,培训班招生,幼儿园招生等做教育招生活动。提高招生率。联系方式15133124713备注:滴,滴滴"})
09:51:10 SILL Puppet messagePayload(5685138802960902879) cache SET
09:51:10 SILL Accessory #1545<Contact> constructor()
09:51:10 SILL Contact constructor(wxid_koa5mg04di4722)
09:51:10 SILL Contact ready() @ Puppet#0<PuppetPadchat>(5971b42fe9f4ce44d62786a5)/PuppetPadchat#0
09:51:10 SILL Puppet contactPayload(wxid_koa5mg04di4722) cache MISS
09:51:10 SILL Puppet contactPayload(wxid_koa5mg04di4722) cache MISS
09:51:10 SILL PuppetPadchat contactRawPayload(wxid_koa5mg04di4722)
09:51:10 SILL PuppetPadchatManager contactRawPayload(wxid_koa5mg04di4722)
09:51:10 SILL PuppetPadchatManager contactRawPayload(wxid_koa5mg04di4722) retry() attempt=1
09:51:10 SILL PuppetPadchat contactRawPayloadParser({user_name="undefined"})
09:51:10 SILL Puppet contactPayload(wxid_koa5mg04di4722) cache MISS
09:51:10 ERR Contact ready() this.puppet.contactPayload(Contact) exception: cannot get user_name from raw payload: {}
09:51:10 ERR Config ###########################
09:51:10 ERR Config unhandledRejection: Error: cannot get user_name from raw payload: {} [object Promise]
09:51:10 ERR Config ###########################
09:51:10 ERR Config ###########################
09:51:10 ERR Config unhandledRejection: Error: cannot get user_name from raw payload: {} [object Promise]
09:51:10 ERR Config ###########################
09:51:10 ERR Config process.on(unhandledRejection) promise.catch(cannot get user_name from raw payload: {})
Config Error: cannot get user_name from raw payload: {}
    at Object.contactRawPayloadParser (/wechaty/src/puppet-padchat/pure-function-helpers/contact-raw-payload-parser.ts:42:11)
    at PuppetPadchat.<anonymous> (/wechaty/src/puppet-padchat/puppet-padchat.ts:697:37)
    at Generator.next (<anonymous>)
    at /wechaty/dist/src/puppet-padchat/puppet-padchat.js:25:71
    at new Promise (<anonymous>)
    at __awaiter (/wechaty/dist/src/puppet-padchat/puppet-padchat.js:21:12)
    at PuppetPadchat.contactRawPayloadParser (/wechaty/dist/src/puppet-padchat/puppet-padchat.js:519:16)
    at PuppetPadchat.<anonymous> (/wechaty/src/puppet/puppet.ts:511:35)
    at Generator.next (<anonymous>)
    at fulfilled (/wechaty/dist/src/puppet/puppet.js:4:58)
    at process._tickCallback (internal/process/next_tick.js:68:7)
09:51:10 ERR Config process.on(unhandledRejection) promise.catch(cannot get user_name from raw payload: {})
Config Error: cannot get user_name from raw payload: {}
    at Object.contactRawPayloadParser (/wechaty/src/puppet-padchat/pure-function-helpers/contact-raw-payload-parser.ts:42:11)
    at PuppetPadchat.<anonymous> (/wechaty/src/puppet-padchat/puppet-padchat.ts:697:37)
    at Generator.next (<anonymous>)
    at /wechaty/dist/src/puppet-padchat/puppet-padchat.js:25:71
    at new Promise (<anonymous>)
    at __awaiter (/wechaty/dist/src/puppet-padchat/puppet-padchat.js:21:12)
    at PuppetPadchat.contactRawPayloadParser (/wechaty/dist/src/puppet-padchat/puppet-padchat.js:519:16)
    at PuppetPadchat.<anonymous> (/wechaty/src/puppet/puppet.ts:511:35)
    at Generator.next (<anonymous>)
    at fulfilled (/wechaty/dist/src/puppet/puppet.js:4:58)
    at process._tickCallback (internal/process/next_tick.js:68:7)
(node:21) PromiseRejectionHandledWarning: Promise rejection was handled asynchronously (rejection id: 536)
09:51:12 SILL PadchatRpc onSocketTencent() discard empty message msg_id payoad: {"continue":0,"msg_type":32768,"status":1,"uin":3351766292}
09:51:17 SILL Pupp

@lijiarui lijiarui changed the title `annot get user_name from raw payload: {} [object Promise]` Error `cannot get user_name from raw payload: {} [object Promise]` Error Jun 27, 2018

@huan

This comment has been minimized.

Copy link
Member

huan commented Jun 27, 2018

Need More Information

Sorry, you did not follow the ISSUE Template, and there's not enough information about your problem.

In order to help us to find the problem out, you should provide all the detail information about the issue. Please make sure you are following the ISSUE Template, answer all the question, and the more important: provide the steps to reproduce the problem.

I'll close this issue. Please re-submit a new issue to provide the information that needed.

@huan huan closed this Jun 27, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment