Skip to content
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

Not fully working with wechaty@next #22

Closed
suntong opened this issue Jul 4, 2018 · 7 comments
Closed

Not fully working with wechaty@next #22

suntong opened this issue Jul 4, 2018 · 7 comments

Comments

@suntong
Copy link
Contributor

suntong commented Jul 4, 2018

Following from wechaty/wechaty#1440,
I ran and saw the qrcode in terminal previously, then stopped and thought AOK. But,

Today, when I try it out with qrcode scan and login,

  • I found so many error logged onto the terminal, is that normal?

  • Moreover, less than 1 minute after logging in, I see a warning:

    WARN PuppetPuppeteer initWatchdogForPuppet() dog.on(reset) last food:[object Object], timeout:60000
    

And after that, no more messages were able to be processed. I.e., it was able to print the following,

Message#Text(👥Room<rm1>🗣Contact<me>)<hello>

but after the above warning, such Message#Text printing will no longer be there, no matter how many test messages I sent afterwards.

Provide Your Network Information

  1. Where is the location of your server? (i.e. City, or In/Out China) Out China
  2. Which cloud platform(AliYun/Qcloud/DigitalOcean/etc) are you using? None. My Home Internet.

Problem

I'm still unable to make the new v0.17 wechaty fully working for me. See above.

Full Output Logs

$ node -v
v10.5.0

$ npm -v
6.1.0

$ node examples/starter-bot.js
. . . See "Show Logs" for details . . .
Show Logs

The full output logs

$ apt-cache policy nodejs
nodejs:
  Installed: 10.5.0-1nodesource1
  Candidate: 10.5.0-1nodesource1
  Version table:
 *** 10.5.0-1nodesource1 500
        500 https://deb.nodesource.com/node_10.x bionic/main amd64 Packages
        100 /var/lib/dpkg/status
     8.10.0~dfsg-2 500
        500 http://archive.ubuntu.com/ubuntu bionic/universe amd64 Packages

# PASTE FULL LOG OUTPUT AT HERE:
$ $ node examples/starter-bot.js 
22:41:23 INFO Wechaty start() v0.17.75 is starting...
22:41:23 INFO Wechaty initPuppet() using puppet: puppeteer
... qrcode scan ...
https://api.qrserver.com/v1/create-qr-code/?data=https%3A%2F%2Flogin.weixin.qq.com%2Fl%2FQedfpTkz_g%3D%3D&size=220x220&margin=20
Contact<me> login
22:41:57 ERR PuppetPuppeteerEvent onLogin() exception: Error: must logout first before login again!
(node:29598) UnhandledPromiseRejectionWarning: Error: must logout first before login again!
    at PuppetPuppeteer.<anonymous> (/path/to/wechaty-getting-started/node_modules/wechaty-puppet/dist/src/puppet.js:183:23)
    at Generator.next (<anonymous>)
    at /path/to/wechaty-getting-started/node_modules/wechaty-puppet/dist/src/puppet.js:25:71
    at new Promise (<anonymous>)
    at __awaiter (/path/to/wechaty-getting-started/node_modules/wechaty-puppet/dist/src/puppet.js:21:12)
    at PuppetPuppeteer.login (/path/to/wechaty-getting-started/node_modules/wechaty-puppet/dist/src/puppet.js:180:16)
    at PuppetPuppeteer.<anonymous> (/path/to/wechaty-getting-started/node_modules/wechaty-puppet-puppeteer/dist/src/puppet-puppeteer.js:396:36)
    at Generator.next (<anonymous>)
    at /path/to/wechaty-getting-started/node_modules/wechaty-puppet-puppeteer/dist/src/puppet-puppeteer.js:25:71
    at new Promise (<anonymous>)
    at __awaiter (/path/to/wechaty-getting-started/node_modules/wechaty-puppet-puppeteer/dist/src/puppet-puppeteer.js:21:12)
    at PuppetPuppeteer.login (/path/to/wechaty-getting-started/node_modules/wechaty-puppet-puppeteer/dist/src/puppet-puppeteer.js:395:16)
    at PuppetPuppeteer.<anonymous> (/path/to/wechaty-getting-started/node_modules/wechaty-puppet-puppeteer/dist/src/event.js:111:24)
    at Generator.next (<anonymous>)
    at fulfilled (/path/to/wechaty-getting-started/node_modules/wechaty-puppet-puppeteer/dist/src/event.js:4:58)
    at process._tickCallback (internal/process/next_tick.js:68:7)
(node:29598) 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: 2)
(node:29598) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Message#Text(👥Room<rm1>🗣Contact<me>)<hello>
Message#Text(👥Room<rm1>🗣Contact<me>)<hello>
22:42:49 WARN PuppetPuppeteer initWatchdogForPuppet() dog.on(reset) last food:[object Object], timeout:60000
22:44:56 WARN PuppetPuppeteer initWatchdogForPuppet() dog.on(reset) last food:inited, timeout:120000
22:47:04 WARN PuppetPuppeteer initWatchdogForPuppet() dog.on(reset) last food:inited, timeout:120000
22:49:11 WARN PuppetPuppeteer initWatchdogForPuppet() dog.on(reset) last food:inited, timeout:120000
22:51:19 WARN PuppetPuppeteer initWatchdogForPuppet() dog.on(reset) last food:inited, timeout:120000
22:53:26 WARN PuppetPuppeteer initWatchdogForPuppet() dog.on(reset) last food:inited, timeout:120000
^C


@huan huan added the duplicate label Jul 4, 2018
@huan
Copy link
Member

huan commented Jul 4, 2018

It seems you are running into wechaty/wechaty#1439 too.

Please note that the latest stable Wechaty is v0.14 right now.

  • The version v0.15 & v0.17 is Developing Version and should be treated as Alpha Stage
  • The version v0.16(and the coming v0.18) is Beta Version, with huge refactoring on the Wechaty Framework code, and we can expect that there's also lots of BUGS.

Your problem seems like the PuppetPuppeteer when Wechaty@0.17 has bug when we refactoring it, however I'm working on PuppetPadchat those days, have no time to take care of PuppetPuppeteer yet.

So my suggestion will be:

  1. You can apply to join the Padchat Tester, then you will be able to use Pad Protocol instead of the Web API. You can find the application at Wechaty v0.20 & Puppet Padchat v0.14 Released. Padchat Alpha Testing Closed. wechaty#1296
  2. Downgrade your Wechaty dependency from the @0.,17 to v0.14, which is the stable version and I believe you will not meet the bug above.

Please let me know if you have any new questions, and I'll merge this issue to wechaty/wechaty#1439 because they seem are duplicated.

@huan
Copy link
Member

huan commented Jul 4, 2018

One more thing: do you think we should use the STABLE version of Wechaty in this starter repo?

I feel that could be better for the new developers and protect them from bugs.

@huan huan changed the title Not fully working Not fully working with wechaty@next Jul 4, 2018
@huan
Copy link
Member

huan commented Jul 6, 2018

This issue should be fixed on Wechaty v0.17.116 or above.

@huan
Copy link
Member

huan commented Jul 9, 2018

@suntong could you please confirm whether this bug had been fixed and close this issue if there's no other problem?

@suntong
Copy link
Contributor Author

suntong commented Jul 9, 2018

Sorry, when I saw "should be fixed", I thought I should be waiting for Wechaty v0.17.116 or above.

Will find sometime tonight to check it.

@huan
Copy link
Member

huan commented Jul 9, 2018

"should have already been fixed" will be better. 0.17.116 had already been published.

@suntong
Copy link
Contributor Author

suntong commented Jul 10, 2018

Let me close this, and continue at wechaty/wechaty#1440, as this example is suppose to work with the stable Wechaty, v0.14.

@suntong suntong closed this as completed Jul 10, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants