wechaty / wechaty

Conversational RPA SDK for Chatbot Makers. Join our Discord: https://discord.gg/7q8NBZbQzt
https://wechaty.js.org
Apache License 2.0
20.4k stars 2.61k forks source link

ERR PuppetWebBridge init() exception: Error: spawn EACCES #1019

Closed sowhatwill closed 6 years ago

sowhatwill commented 6 years ago

Provide Your Network Information

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

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

//docker run -ti --rm --volume="$(pwd)":/bot zixia/wechaty mybot.js

Starting Wechaty v0.13.37 with Node.js v8.9.1 ...
Working directory: /bot
Please make sure you had installed all the NPM modules which is depended on your bot script.
Executing babel-node --presets env mybot.js
03:09:53 INFO Wechaty v0.13.36 starting...
03:09:53 ERR PuppetWebBridge init() exception: Error: spawn EACCES
03:09:53 ERR PuppetWeb initBridge() exception: spawn EACCES
03:09:53 WARN PuppetWebBridge quit() page.close() exception: TypeError: Cannot read property 'close' of undefined
03:09:53 WARN PuppetWebBridge quit() browser.close() exception: TypeError: Cannot read property 'close' of undefined
03:09:53 ERR PuppetWeb init() exception: Error: spawn EACCES
03:09:53 ERR Wechaty start() exception: spawn EACCES
(node:30) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: spawn EACCES
(node:30) [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.

### Expected behavior

success

### Actual behavior

can not  start the robot

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

### Full Output Logs

Starting Wechaty v0.13.37 with Node.js v8.9.1 ...
Working directory: /bot
Please make sure you had installed all the NPM modules which is depended on your bot script.
Executing babel-node --presets env mybot.js
03:09:53 INFO Wechaty v0.13.36 starting...
03:09:53 ERR PuppetWebBridge init() exception: Error: spawn EACCES
03:09:53 ERR PuppetWeb initBridge() exception: spawn EACCES
03:09:53 WARN PuppetWebBridge quit() page.close() exception: TypeError: Cannot read property 'close' of undefined
03:09:53 WARN PuppetWebBridge quit() browser.close() exception: TypeError: Cannot read property 'close' of undefined
03:09:53 ERR PuppetWeb init() exception: Error: spawn EACCES
03:09:53 ERR Wechaty start() exception: spawn EACCES
(node:30) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: spawn EACCES
(node:30) [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.
$ WECHATY_LOG=silly npm run ts-node mybot.ts

# or 

$ WECHATY_LOG=silly node dist/mybot.js
Show Logs ### Paste the full output logs here with `WECHATY_LOG=silly` set ```shell # PASTE FULL LOG OUTPUT AT HERE: ```
sowhatwill commented 6 years ago

解决办法: 在node_modules中卸载wechaty,就可以使用了

可能原因: zixia/wechaty 中wechaty的版本为@0.13.37 而自己npm安装的wechaty的版本为@0.13.36

参考办法: https://github.com/Chatie/wechaty/issues/954 类似于此问题

huan commented 6 years ago

Merge to #954