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

Scan QR Code not shown on terminal, [email protected] #1220

Closed
suntong opened this issue May 21, 2018 · 3 comments
Closed

Scan QR Code not shown on terminal, [email protected] #1220

suntong opened this issue May 21, 2018 · 3 comments

Comments

@suntong
Copy link
Contributor

suntong commented May 21, 2018

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. Home machine.

Expected behavior

See the QR Scan Code in terminal

Actual behavior

QR Scan Code not seen in terminal

Steps to reproduce the behavior

cd Chatie/wechaty

$ npm run ts-node examples/the-worlds-shortest-chatbot-code-in-6-lines.js 

> [email protected] ts-node /.../Chatie/wechaty
> ts-node "examples/the-worlds-shortest-chatbot-code-in-6-lines.js"

15:59:00 WARN Wechaty init() DEPRECATED and will be removed after Jun 2018. Use start() instead.
15:59:00 INFO Wechaty v0.13.57 starting...
Scan QR Code to login: 0
https://login.weixin.qq.com/qrcode/AcPo7_b_hw==
Scan QR Code to login: 408
https://login.weixin.qq.com/qrcode/AcPo7_b_hw==
16:01:35 WARN PuppetWeb initScanWatchdog() on(reset) lastFood: https://login.weixin.qq.com/qrcode/AcPo7_b_hw==, timePast: 120000
Scan QR Code to login: 0
https://login.weixin.qq.com/qrcode/AdjR6EryHA==
^C^C

image

Run npm run doctor or wechaty run doctor(for docker user), paste output here

$ npm run doctor

> [email protected] doctor /.../Chatie/wechaty
> npm run check-node-version && ts-node bin/doctor


> [email protected] check-node-version /.../Chatie/wechaty
> check-node-version --node ">= 8.5"

Error: Cannot find module 'rxjs-compat/Observable'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:571:15)
    at Function.Module._load (internal/modules/cjs/loader.js:497:25)
    at Module.require (internal/modules/cjs/loader.js:626:17)
    at require (internal/modules/cjs/helpers.js:20:18)
    at Object.<anonymous> (/.../Chatie/wechaty/node_modules/rxjs/src/Observable.ts:1:1)
. . .

$ npm install rxjs
npm WARN [email protected] requires a peer of rxjs@^5 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of [email protected] - 4.x but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

+ [email protected]
updated 1 package in 43.42s

$ npm run doctor

> [email protected] doctor /.../Chatie/wechaty
> npm run check-node-version && ts-node bin/doctor


> [email protected] check-node-version /.../Chatie/wechaty
> check-node-version --node ">= 8.5"

Error: Cannot find module 'rxjs-compat/Observable'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:571:15)
    at Function.Module._load (internal/modules/cjs/loader.js:497:25)
    at Module.require (internal/modules/cjs/loader.js:626:17)
    at require (internal/modules/cjs/helpers.js:20:18)
    at Object.<anonymous> (/.../Chatie/wechaty/node_modules/rxjs/src/Observable.ts:1:1)
. . .

I.e., trying to npm install rxjs didn't fix the npm run doctor problem.

Show Logs

Paste the full output logs here with WECHATY_LOG=silly set

# PASTE FULL LOG OUTPUT AT HERE:
$ WECHATY_LOG=silly npm run ts-node examples/th
he-worlds-shortest-chatbot-code-in-6-lines.js 
�>
> [email protected] ts-node /path/to/Chatie/wechaty
> ts-node "examples/the-worlds-shortest-chatbot-code-in-6-lines.js"

16:21:48 SILL Brolog WECHATY_LOG set level to silly
16:21:48 INFO Config registering process.on("unhandledRejection") for development/debug
16:21:48 VERB Config constructor()
16:21:51 SILL StateSwitch constructor(Wechaty)
16:21:51 VERB Wechaty contructor()
16:21:51 VERB Profile constructor(null)
16:21:51 VERB Wechaty on(scan, function) registered
16:21:51 VERB Wechaty onFunction(scan)
16:21:51 VERB Wechaty on(login, function) registered
16:21:51 VERB Wechaty onFunction(login)
16:21:51 VERB Wechaty on(message, function) registered
16:21:51 VERB Wechaty onFunction(message)
16:21:51 WARN Wechaty init() DEPRECATED and will be removed after Jun 2018. Use start() instead.
16:21:51 SILL Wechaty version() form development environment is not availble: ENOENT: no such file or directory, stat '/path/to/node_modules/wechaty/dist/.git'
16:21:51 INFO Wechaty v0.13.57 starting...
16:21:51 VERB Wechaty puppet: web
16:21:51 VERB Wechaty profile: undefined
16:21:51 VERB Wechaty uuid: 8be43d00-05ac-4387-833d-53169a3e175c
16:21:51 SILL StateSwitch <Wechaty> on() is false
16:21:51 SILL StateSwitch <Wechaty> on() is false
16:21:51 SILL StateSwitch <Wechaty> on() is false
16:21:51 VERB StateSwitch <Wechaty> on(pending) <- (false)
16:21:51 VERB Profile load() file: null
16:21:51 VERB Profile load() no file, NOOP
16:21:51 VERB Wechaty initPuppet()
16:21:51 SILL StateSwitch constructor(Puppet)
16:21:51 VERB Wechaty initPuppet() puppet.on(error) registered
16:21:51 VERB Wechaty initPuppet() puppet.on(friend) registered
16:21:51 VERB Wechaty initPuppet() puppet.on(heartbeat) registered
16:21:51 VERB Wechaty initPuppet() puppet.on(login) registered
16:21:51 VERB Wechaty initPuppet() puppet.on(logout) registered
16:21:51 VERB Wechaty initPuppet() puppet.on(message) registered
16:21:51 VERB Wechaty initPuppet() puppet.on(room-join) registered
16:21:51 VERB Wechaty initPuppet() puppet.on(room-leave) registered
16:21:51 VERB Wechaty initPuppet() puppet.on(room-topic) registered
16:21:51 VERB Wechaty initPuppet() puppet.on(scan) registered
16:21:51 VERB Config puppetInstance(PuppetWeb)
16:21:51 VERB PuppetWeb init() with Profile<null>
16:21:51 SILL StateSwitch <Puppet> on() is false
16:21:51 VERB StateSwitch <Puppet> on(pending) <- (false)
16:21:51 VERB PuppetWeb initWatchdogForPuppet()
16:21:51 VERB PuppetWeb initWatchdogForScan()
16:21:51 VERB PuppetWeb initBridge()
16:21:51 SILL StateSwitch <Puppet> off() is false
16:21:51 VERB PuppetWebBridge constructor()
16:21:51 SILL StateSwitch constructor(PuppetWebBridge)
16:21:51 VERB PuppetWebBridge init()
16:21:51 SILL StateSwitch <PuppetWebBridge> on() is false
16:21:51 VERB StateSwitch <PuppetWebBridge> on(pending) <- (false)
16:21:51 VERB PuppetWebBridge initBrowser()
16:21:54 VERB PUppetWebBridge initBrowser() version: HeadlessChrome/65.0.3312.0
16:21:54 VERB PuppetWebBridge init() initBrowser() done
16:21:54 VERB PuppetWebBridge initPage()
16:21:54 VERB Profile get(cookies)
16:21:54 VERB PuppetWebBridge cookieDomain(undefined)
16:21:54 SILL PuppetWebBridge cookieDomain() no cookie, return default https://wx.qq.com
16:21:54 VERB PuppetWebBridge initPage() before page.goto(url)
16:22:01 VERB PuppetWebBridge initPage() after page.goto(url)
16:22:02 VERB PuppetWebBridge initPage() on(load) https://wx.qq.com/
16:22:02 SILL StateSwitch <PuppetWebBridge> off() is false
16:22:03 VERB PuppetWebBridge readyAngular()
16:22:03 VERB PuppetWebBridge inject()
16:22:03 SILL PuppetWebBridge inject() eval(Wechaty) return code[200] message[WechatyBro Inject Done]
16:22:03 SILL PuppetWebBridge proxyWechaty(init)
16:22:03 SILL PuppetWebEvent onLog(init() scanCode: null)
16:22:03 SILL PuppetWebEvent onDing(heartbeat@browser)
16:22:03 SILL PuppetWeb initWatchdogForPuppet() dog.on(feed, food={type=undefined, data=heartbeat@browser})
16:22:03 SILL PuppetWebEvent onLog(inited!. ;-D)
16:22:03 SILL PuppetWebBridge inject() Wechaty.init() return code[200] message[WechatyBro Init Succ]
16:22:03 VERB PuppetWebBridge ding(ding() OK!)
16:22:03 SILL PuppetWebBridge proxyWechaty(ding , ding() OK!)
16:22:03 SILL PuppetWebEvent onLog(recv ding)
16:22:03 SILL PuppetWebBridge inject() ding success
16:22:03 VERB PuppetWebBridge clickSwitchAccount()
16:22:03 VERB PuppetWebBridge clickSwitchAccount() listXpath()
16:22:03 SILL StateSwitch <PuppetWebBridge> on() is pending
16:22:03 VERB StateSwitch <PuppetWebBridge> on(true) <- (pending)
16:22:03 VERB PuppetWebBridge init() initPage() done
16:22:03 VERB PuppetWeb initBridge() done
16:22:03 SILL StateSwitch <Puppet> on() is pending
16:22:03 VERB StateSwitch <Puppet> on(true) <- (pending)
16:22:03 SILL PuppetWeb initWatchdogForPuppet() dog.on(feed, food={type=undefined, data=inited})
16:22:03 VERB PuppetWeb init() done
16:22:03 VERB Wechaty on(heartbeat, function) registered
16:22:03 VERB Wechaty onFunction(heartbeat)
16:22:03 SILL StateSwitch <Wechaty> on() is pending
16:22:03 VERB StateSwitch <Wechaty> on(true) <- (pending)
16:22:04 SILL PuppetWebEvent onLog(checkScan() code:0 url:https://login.weixin.qq.com/qrcode/AbrewsbG6w== scanCode:null)
16:22:04 SILL PuppetWebEvent onLog(checkScan() - code change detected: from null to 0)
16:22:04 VERB PuppetWebEvent onScan({code: 0, url: https://login.weixin.qq.com/qrcode/AbrewsbG6w==})
16:22:04 SILL StateSwitch <Puppet> off() is false
16:22:04 VERB Profile set(cookies, [object Object],[object Object],[object Object])
16:22:04 VERB Profile save() file: null
16:22:04 VERB Profile save() no file, NOOP
16:22:04 SILL PuppetWeb initWatchdogForPuppet() dog.on(feed, food={type=scan, data=[object Object]})
16:22:04 SILL Wechaty memoryCheck() free: 112 MB, require: 4 MB
16:22:04 VERB Wechaty init() throttleQueue.subscribe() new item: [object Object]
Scan QR Code to login: 0
https://login.weixin.qq.com/qrcode/AbrewsbG6w==
16:22:04 VERB Profile set(cookies, [object Object],[object Object],[object Object])
16:22:04 VERB Profile save() file: null
16:22:04 VERB Profile save() no file, NOOP
16:22:05 SILL PuppetWebEvent onLog(checkScan() code:0 url:https://login.weixin.qq.com/qrcode/AbrewsbG6w== scanCode:0)
16:22:06 SILL PuppetWebEvent onLog(checkScan() code:0 url:https://login.weixin.qq.com/qrcode/AbrewsbG6w== scanCode:0)
16:22:07 SILL PuppetWebEvent onLog(checkScan() code:0 url:https://login.weixin.qq.com/qrcode/AbrewsbG6w== scanCode:0)
16:22:08 SILL PuppetWebEvent onLog(checkScan() code:0 url:https://login.weixin.qq.com/qrcode/AbrewsbG6w== scanCode:0)
16:22:09 SILL PuppetWebEvent onLog(checkScan() code:0 url:https://login.weixin.qq.com/qrcode/AbrewsbG6w== scanCode:0)
^C^C�=


Script done on 2018-05-21 16:22:19-0400
@huan
Copy link
Member

huan commented May 21, 2018

NPM shows your version is > [email protected] ts-node but the log shows your version is 16:21:51 INFO Wechaty v0.13.57 starting...?

@suntong
Copy link
Contributor Author

suntong commented May 22, 2018

Yeah, I was wondering why was that as well.

Ahh... let me check and get back to you...

@suntong
Copy link
Contributor Author

suntong commented May 22, 2018

my bad -- version messed up.

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

No branches or pull requests

2 participants