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

在windows下运行例子,npm 环境中,报错关于getChromeDriver() #77

Closed
issmile opened this issue Nov 6, 2016 · 1 comment
Closed

Comments

@issmile
Copy link

issmile commented Nov 6, 2016

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

不会doctor,所以不知道怎么弄,单独跑的.可以单独跑的吧?

Expected behavior

希望跑起DEMO

Actual behavior

error

Steps to reproduce the behavior (and fixes, if any)

源码(这个Demo不是只适合TypeScript吧?我直接跑es6的环境):

import {Wechaty} from 'wechaty'
//const Wechaty = require('wechaty')
Wechaty.instance() // Singleton
.on('scan', (url, code) => console.log(`Scan QrCode to login: ${code}\n${url}`))
.on('login',       user => console.log(`User ${user} logined`))
.on('message',  message => console.log(`Message: ${message}`))
.init()

Paste the full output logs here with WECHATY_LOG=silly set

E:\weixin\wechaty>npm run dev

[email protected] dev E:\weixin\wechaty
babel-node ./src/mybot.js

INFO Wechaty v0.5.0 initializing...
[1612:15840:1106/212734:ERROR:mf_helpers.cc(12)] Error in dxva_video_decode_accelerator_win.cc on line 345
WARN PuppetWebBrowserDriver getChromeDriver() exception: session not created exception
from unknown error: Runtime.executionContextCreated has invalid 'context': {"auxData":{"frameId":"8052.1","isDefault":true},"id":1,"name":"","origin":"://"}
(Session info: chrome=54.0.2840.71)
(Driver info: chromedriver=2.23.409699 (49b0fa931cda1caad0ae15b7d1b68004acd05129),platform=Windows NT 10.0.14393 x86_64), retry: 0
WARN PuppetWebBrowserDriver getChromeDriver() with retry: 1
E:\weixin\wechaty\node_modules.3.0.0@selenium-webdriver\lib\promise.js:2497
throw error;
^

SessionNotCreatedError: session not created exception
from unknown error: Runtime.executionContextCreated has invalid 'context': {"auxData":{"frameId":"8052.1","isDefault":true},"id":1,"name":"","origin":"://"}
(Session info: chrome=54.0.2840.71)
(Driver info: chromedriver=2.23.409699 (49b0fa931cda1caad0ae15b7d1b68004acd05129),platform=Windows NT 10.0.14393 x86_64)
at WebDriverError (E:\weixin\wechaty\node_modules.3.0.0@selenium-webdriver\lib\error.js:27:5)
at SessionNotCreatedError (E:\weixin\wechaty\node_modules.3.0.0@selenium-webdriver\lib\error.js:214:5)
at Object.checkLegacyResponse (E:\weixin\wechaty\node_modules.3.0.0@selenium-webdriver\lib\error.js:505:15)
at parseHttpResponse (E:\weixin\wechaty\node_modules.3.0.0@selenium-webdriver\lib\http.js:509:13)
at doSend.then.response (E:\weixin\wechaty\node_modules.3.0.0@selenium-webdriver\lib\http.js:440:13)
at run (E:\weixin\wechaty\node_modules.2.4.1@core-js\modules\es6.promise.js:87:22)
at E:\weixin\wechaty\node_modules.2.4.1@core-js\modules\es6.promise.js:100:28
at flush (E:\weixin\wechaty\node_modules.2.4.1@core-js\modules_microtask.js:18:9)
at _combinedTickCallback (internal/process/next_tick.js:67:7)
at process._tickDomainCallback (internal/process/next_tick.js:122:9)
From: Task: WebDriver.createSession()
at Function.createSession (E:\weixin\wechaty\node_modules.3.0.0@selenium-webdriver\lib\webdriver.js:776:24)
at Function.createSession (E:\weixin\wechaty\node_modules.3.0.0@selenium-webdriver\chrome.js:709:29)
at createDriver (E:\weixin\wechaty\node_modules.3.0.0@selenium-webdriver\index.js:167:33)
at Builder.build (E:\weixin\wechaty\node_modules.3.0.0@selenium-webdriver\index.js:639:16)
at BrowserDriver. (E:\weixin\wechaty\node_modules.0.5.1@wechaty\src\puppet-web\browser-driver.ts:131:24)
at next (native)
at E:\weixin\wechaty\node_modules.0.5.1@wechaty\dist\src\puppet-web\browser-driver.js:7:65
at new Promise (E:\weixin\wechaty\node_modules.2.4.1@core-js\modules\es6.promise.js:191:7)
at __awaiter (E:\weixin\wechaty\node_modules.0.5.1@wechaty\dist\src\puppet-web\browser-driver.js:3:12)
at BrowserDriver.getChromeDriver (E:\weixin\wechaty\node_modules.0.5.1@wechaty\dist\src\puppet-web\browser-driver.js:65:16)

npm ERR! Windows_NT 10.0.14393
npm ERR! argv "E:\Program Files\nodejs\node.exe" "E:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "run" "dev"
npm ERR! node v6.2.0
npm ERR! npm v3.8.9
npm ERR! code ELIFECYCLE
npm ERR! [email protected] dev: babel-node ./src/mybot.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] dev script 'babel-node ./src/mybot.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the weixinbot package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! babel-node ./src/mybot.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs weixinbot
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls weixinbot
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! E:\weixin\wechaty\npm-debug.log

@huan
Copy link
Member

huan commented Nov 7, 2016

The chromedriver you have is chromedriver=2.23.

You need to upgrade your chromedriver, release v2.24 & above is required.

See Also: https://bugs.chromium.org/p/chromedriver/issues/detail?id=1451

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