wechaty / wechaty-puppet-padplus

DEPRECATED: One puppet based on iPad protocal for Wechaty
https://wechaty.js.org/docs/puppet-services/
317 stars 65 forks source link

TypeError: Cannot read property 'RoomMember' of undefined #307

Closed treeguard closed 4 years ago

treeguard commented 4 years ago

Important:Please file the issue follow the template, or we won't help you to solve the problem.

0. Report Issue Guide

  1. Please run the following command and check whether the problem has been fixed:
npm install wechaty-puppet-padplus@next
  1. Please search in the issue first, and make sure your problem had not been reported before

1. Versions

2. Describe the bug

happened on the onRoomJoin trigger.

code:

bot.on('room-join', onRoomJoin)

Log:

(node:75772) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'RoomMember' of undefined

Give a clear and concise description of what the bug is.

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:

  1. run '...'
  2. ...
  3. ...

4. Expected behavior

Give a clear and concise description of what you expected to happen.

5. Actual behavior

If applicable, add screenshots to help explain your problem. But do not paste log screenshots here.

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: ```

7. Additional context

Add any other context about the problem here.

[bug]

treeguard commented 4 years ago

it's in

/wechaty-puppet-padplus/dist/src/puppet-padplus.js:1209:99
su-chang commented 4 years ago

Please upgrade wechaty@0.48.1 first.

And then check it again.

Cannot read property 'RoomMember' of undefined

BTW, which variable you use here?

treeguard commented 4 years ago

I tried to run the following command

npm install wechaty@latest
npm install wechaty-puppet@latest
npm install wechaty-puppet-padplus@latest
npm dedeupe

the result is now

├─┬ wechaty@0.48.8
│ └── UNMET PEER DEPENDENCY wechaty-puppet@0.32.3  deduped
├── UNMET PEER DEPENDENCY wechaty-puppet@0.32.3 
└─┬ wechaty-puppet-padplus@0.6.5
  └─┬ wechaty-puppet-cache@0.1.10
    └── wechaty-puppet@0.24.0 

I saw a different error

(node:52980) UnhandledPromiseRejectionWarning: TypeError: this.roomMemberPayloadDirty is not a function
    at PuppetPadplus.<anonymous> (/.../node_modules/wechaty-puppet-padplus/dist/src/puppet-padplus.js:1197:28)

I am calling function

bot.on('room-join', onRoomJoin)
su-chang commented 4 years ago

(node:52980) UnhandledPromiseRejectionWarning: TypeError: this.roomMemberPayloadDirty is not a function

Please upgrade padplus@0.6.6, thank you.