Cannot read property 'Symbol(Symbol.iterator)' of undefined
Created by: Whuhxh
1.Run npm run doctor or wechaty run doctor(for docker user), paste output here
node -v: 6.9.1 npm -v: 3.10.8
Wechaty Doctor
- Wechaty version: #git[7faecd62 0.7.32]
- uname -r: 3.10.0-327.10.1.el7.x86_64
- Docker: false
- Node version: v6.9.1
2.Expected behavior
When start bot with calling Contact.load(id) to load a contact, but the contact id is some "undefined" value, the bot should deal with id of "undefined" situation.
3.Actual behavior
ERR Room contactGetter(@@c4f424080c5f480442dfb0dd5af062b70443edf95c9d1b87c1e15ab1b212fe24) exception: Cannot read property 'Symbol(Symbol.iterator)' of undefined ERR Message ready() exception: TypeError: Cannot read property 'Symbol(Symbol.iterator)' of undefined at Room. (/bot/node_modules/wechaty/dist/src/room.js:52:32) at Generator.next () at /bot/node_modules/wechaty/dist/src/room.js:7:71 at __awaiter (/bot/node_modules/wechaty/dist/src/room.js:3:12) at Room.readyAllMembers (/bot/node_modules/wechaty/dist/src/room.js:51:16) at Room. (/bot/node_modules/wechaty/dist/src/room.js:88:28) at Generator.next () at fulfilled (/bot/node_modules/wechaty/dist/src/room.js:4:58) at process._tickDomainCallback (internal/process/next_tick.js:129:7) ERR PuppetWebEvent onServerMessage() exception: TypeError: Cannot read property 'Symbol(Symbol.iterator)' of undefined at Room. (/bot/node_modules/wechaty/dist/src/room.js:52:32) at Generator.next () at /bot/node_modules/wechaty/dist/src/room.js:7:71 at __awaiter (/bot/node_modules/wechaty/dist/src/room.js:3:12) at Room.readyAllMembers (/bot/node_modules/wechaty/dist/src/room.js:51:16) at Room. (/bot/node_modules/wechaty/dist/src/room.js:88:28) at Generator.next () at fulfilled (/bot/node_modules/wechaty/dist/src/room.js:4:58) at process._tickDomainCallback (internal/process/next_tick.js:129:7) ERR Config ########################### ERR Config unhandledRejection: TypeError: Cannot read property 'Symbol(Symbol.iterator)' of undefined [object Promise] ERR Config ########################### ERR Config unhandledRejection::catch(Cannot read property 'Symbol(Symbol.iterator)' of undefined) (node:27) PromiseRejectionHandledWarning: Promise rejection was handled asynchronously (rejection id: 3) ERR Room contactGetter(@@c4f424080c5f480442dfb0dd5af062b70443edf95c9d1b87c1e15ab1b212fe24) exception: Cannot read property 'Symbol(Symbol.iterator)' of undefined ERR Message ready() exception: TypeError: Cannot read property 'Symbol(Symbol.iterator)' of undefined at Room. (/bot/node_modules/wechaty/dist/src/room.js:52:32) at Generator.next () at /bot/node_modules/wechaty/dist/src/room.js:7:71 at __awaiter (/bot/node_modules/wechaty/dist/src/room.js:3:12) at Room.readyAllMembers (/bot/node_modules/wechaty/dist/src/room.js:51:16) at Room. (/bot/node_modules/wechaty/dist/src/room.js:88:28) at Generator.next () at fulfilled (/bot/node_modules/wechaty/dist/src/room.js:4:58) at process._tickDomainCallback (internal/process/next_tick.js:129:7) ERR PuppetWebEvent onServerMessage() exception: TypeError: Cannot read property 'Symbol(Symbol.iterator)' of undefined at Room. (/bot/node_modules/wechaty/dist/src/room.js:52:32) at Generator.next () at /bot/node_modules/wechaty/dist/src/room.js:7:71 at __awaiter (/bot/node_modules/wechaty/dist/src/room.js:3:12) at Room.readyAllMembers (/bot/node_modules/wechaty/dist/src/room.js:51:16) at Room. (/bot/node_modules/wechaty/dist/src/room.js:88:28) at Generator.next () at fulfilled (/bot/node_modules/wechaty/dist/src/room.js:4:58) at process._tickDomainCallback (internal/process/next_tick.js:129:7) ERR Config ########################### ERR Config unhandledRejection: TypeError: Cannot read property 'Symbol(Symbol.iterator)' of undefined [object Promise] ERR Config ########################### ERR Config unhandledRejection::catch(Cannot read property 'Symbol(Symbol.iterator)' of undefined) (node:27) PromiseRejectionHandledWarning: Promise rejection was handled asynchronously (rejection id: 6)
@zixia, I think this is a bug when I first start the bot, you may need consider the "undefined" situation of load of a contact by the contact id.
Is that mean I need to check the id the contact pass to me is illegal?