wechaty: "Chromium revision is not downloaded."

When running npm start in haoshiyou-bot we encountered the following error

$ ▶npm start

> haoshiyou-bot@1.0.1 start /Users/zzn/Documents/ws/haoshiyou-bot
> docker run --env CLOUDINARY_SECRET=$CLOUDINARY_SECRET -ti --volume="$(pwd)":/bot --rm zixia/wechaty src/main.ts


 __        __        _           _
 \ \      / /__  ___| |__   __ _| |_ _   _
  \ \ /\ / / _ \/ __| '_ \ / _` | __| | | |
   \ V  V /  __/ (__| | | | (_| | |_| |_| |
    \_/\_/ \___|\___|_| |_|\__,_|\__|\__, |
                                     |___/
____________________________________________________
            https://www.chatie.io
  ____                            _   _
 / ___|___  _ __  _ __   ___  ___| |_(_)_ __   __ _
| |   / _ \| '_ \| '_ \ / _ \/ __| __| | '_ \ / _` |
| |__| (_) | | | | | | |  __/ (__| |_| | | | | (_| |
 \____\___/|_| |_|_| |_|\___|\___|\__|_|_| |_|\__, |
                                              |___/
  ____ _           _   ____        _
 / ___| |__   __ _| |_| __ )  ___ | |_ ___
| |   | '_ \ / _` | __|  _ \ / _ \| __/ __|
| |___| | | | (_| | |_| |_) | (_) | |_\__ \
 \____|_| |_|\__,_|\__|____/ \___/ \__|___/


Starting Wechaty v0.11.40 with Node.js v8.8.1 ...
Working directory: /bot
Please make sure you had installed all the NPM modules which is depended by your bot script.
Executing ts-node src/main.ts
01:52:13 INFO Wechaty v0.11.29 starting...
01:52:14 ERR PuppetWebBridge init() exception: AssertionError [ERR_ASSERTION]: Chromium revision is not downloaded. Run "npm install"
2017-11-04 01:52:14 DEBUG [error] - AssertionError [ERR_ASSERTION]: Chromium revision is not downloaded. Run "npm install"
01:52:14 ERR PuppetWeb initBridge() exception: Chromium revision is not downloaded. Run "npm install"
01:52:14 WARN PuppetWebBridge quit() page.close() exception: TypeError: Cannot read property 'close' of undefined
01:52:14 WARN PuppetWebBridge quit() browser.close() exception: TypeError: Cannot read property 'close' of undefined
2017-11-04 01:52:14 DEBUG [error] - AssertionError [ERR_ASSERTION]: Chromium revision is not downloaded. Run "npm install"
01:52:14 ERR PuppetWeb init() exception: AssertionError [ERR_ASSERTION]: Chromium revision is not downloaded. Run "npm install"
2017-11-04 01:52:14 DEBUG [error] - AssertionError [ERR_ASSERTION]: Chromium revision is not downloaded. Run "npm install"
01:52:14 WARN PuppetWeb quit() is called on a OFF puppet. return directly.
01:52:14 ERR Wechaty start() exception: Chromium revision is not downloaded. Run "npm install"
01:52:14 ERR Bot init() fail: AssertionError [ERR_ASSERTION]: Chromium revision is not downloaded. Run "npm install"
01:52:14 WARN Wechaty stop() without this.puppet

Provide Your Network Information

  1. Where is the location of your server? (i.e. City, or In/Out China) Beijing, out of GFW
  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

// wechaty run doctor show

function wechaty() {
  sudo docker run \
    -t -i --rm \
    -e WECHATY_LOG="$WECHATY_LOG" \
    --mount type=bind,source="$(pwd)",target=/bot \
    zixia/wechaty:latest \
    "$@"
}
wechaty run doctor
unknown flag: --mount
See 'docker run --help'.

// npm run doctor

$ ▶npm run doctor

> haoshiyou-bot@1.0.1 doctor /Users/zzn/Documents/ws/haoshiyou-bot
> npm run check-node-version && ts-node bin/doctor


> haoshiyou-bot@1.0.1 check-node-version /Users/zzn/Documents/ws/haoshiyou-bot
> check-node-version --node ">= 7"

node: 7.7.2
npm: 4.1.2
yarn: 1.2.1

/usr/local/lib/node_modules/ts-node/src/index.ts:286
          throw new TSError(diagnosticList)
                ^
TSError: ⨯ Unable to compile TypeScript
Cannot find type definition file for 'body-parser'. (2688)
Cannot find type definition file for 'express'. (2688)
Cannot find type definition file for 'express-serve-static-core'. (2688)
Cannot find type definition file for 'mime'. (2688)
Cannot find type definition file for 'node'. (2688)
Cannot find type definition file for 'serve-static'. (2688)
Cannot find type definition file for 'ws'. (2688)
bin/doctor.ts (21,21): Cannot find module 'os'. (2307)
bin/doctor.ts (23,26): Cannot find module '../src/config'. (2307)
bin/doctor.ts (24,26): Cannot find module '../src/doctor'. (2307)
bin/doctor.ts (25,26): Cannot find module '../src/wechaty'. (2307)
bin/doctor.ts (46,22): Cannot find name 'process'. (2304)
    at getOutput (/usr/local/lib/node_modules/ts-node/src/index.ts:286:17)
    at /usr/local/lib/node_modules/ts-node/src/index.ts:312:18
    at Object.compile (/usr/local/lib/node_modules/ts-node/src/index.ts:462:17)
    at Module.m._compile (/usr/local/lib/node_modules/ts-node/src/index.ts:369:44)
    at Module._extensions..js (module.js:623:10)
    at Object.require.extensions.(anonymous function) [as .ts] (/usr/local/lib/node_modules/ts-node/src/index.ts:372:12)
    at Module.load (module.js:531:32)
    at tryModuleLoad (module.js:494:12)
    at Function.Module._load (module.js:486:3)
    at Function.Module.runMain (module.js:653:10)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! haoshiyou-bot@1.0.1 doctor: `npm run check-node-version && ts-node bin/doctor`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the haoshiyou-bot@1.0.1 doctor script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/zzn/.npm/_logs/2017-11-04T19_44_53_360Z-debug.log

Expected behavior

Expect it to run bot

Actual behavior

Failed to even show login QR code

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

Full Output Logs

$ WECHATY_LOG=silly npm run ts-node src/main.ts

WECHATY_LOG=silly npm run ts-node src/main.ts

> haoshiyou-bot@1.0.1 ts-node /Users/zzn/Documents/ws/haoshiyou-bot
> ts-node "src/main.ts"


/usr/local/lib/node_modules/ts-node/src/index.ts:286
          throw new TSError(diagnosticList)
                ^
TSError: ⨯ Unable to compile TypeScript
Cannot find type definition file for 'body-parser'. (2688)
Cannot find type definition file for 'express'. (2688)
Cannot find type definition file for 'express-serve-static-core'. (2688)
Cannot find type definition file for 'mime'. (2688)
Cannot find type definition file for 'node'. (2688)
Cannot find type definition file for 'serve-static'. (2688)
Cannot find type definition file for 'ws'. (2688)
src/main.ts (1,36): Cannot find module 'log4ts'. (2307)
src/main.ts (2,36): Cannot find module 'wechaty'. (2307)
src/main.ts (4,25): Cannot find module 'hot-import'. (2307)
src/main.ts (6,29): Cannot find module 'log4ts/build/appenders/ConsoleAppender'. (2307)
src/main.ts (7,25): Cannot find module 'log4ts/build/layouts/BasicLayout'. (2307)
src/main.ts (8,24): Cannot find module 'log4ts/build/LogLevel'. (2307)
src/main.ts (10,15): Cannot find name 'require'. (2304)
src/main.ts (54,3): Cannot find name 'process'. (2304)
    at getOutput (/usr/local/lib/node_modules/ts-node/src/index.ts:286:17)
    at /usr/local/lib/node_modules/ts-node/src/index.ts:312:18
    at Object.compile (/usr/local/lib/node_modules/ts-node/src/index.ts:462:17)
    at Module.m._compile (/usr/local/lib/node_modules/ts-node/src/index.ts:369:44)
    at Module._extensions..js (module.js:623:10)
    at Object.require.extensions.(anonymous function) [as .ts] (/usr/local/lib/node_modules/ts-node/src/index.ts:372:12)
    at Module.load (module.js:531:32)
    at tryModuleLoad (module.js:494:12)
    at Function.Module._load (module.js:486:3)
    at Function.Module.runMain (module.js:653:10)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! haoshiyou-bot@1.0.1 ts-node: `ts-node "src/main.ts"`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the haoshiyou-bot@1.0.1 ts-node script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/zzn/.npm/_logs/2017-11-04T19_47_28_552Z-debug.log
Show Logs ### Paste the full output logs here with `WECHATY_LOG=silly` set
$ ▶npm install puppeteer

> puppeteer@0.12.0 install /Users/zzn/Documents/ws/haoshiyou-bot/node_modules/puppeteer
> node install.js

Downloading Chromium r508693 - 72.6 Mb [====================] 100% 0.0s
Chromium downloaded to /Users/zzn/Documents/ws/haoshiyou-bot/node_modules/puppeteer/.local-chromium/mac-508693
+ puppeteer@0.12.0
added 15 packages, removed 14 packages and updated 41 packages in 44.591s
12:36:41 zzn@zzn-macbookpro2 ❯ ~ ❯ d ❯ ws ❯ haoshiyou-bot ▶ master ▶ $ ▶npm start

> haoshiyou-bot@1.0.1 start /Users/zzn/Documents/ws/haoshiyou-bot
> docker run --env CLOUDINARY_SECRET=$CLOUDINARY_SECRET -ti --volume="$(pwd)":/bot --rm zixia/wechaty src/main.ts


 __        __        _           _
 \ \      / /__  ___| |__   __ _| |_ _   _
  \ \ /\ / / _ \/ __| '_ \ / _` | __| | | |
   \ V  V /  __/ (__| | | | (_| | |_| |_| |
    \_/\_/ \___|\___|_| |_|\__,_|\__|\__, |
                                     |___/
____________________________________________________
            https://www.chatie.io
  ____                            _   _
 / ___|___  _ __  _ __   ___  ___| |_(_)_ __   __ _
| |   / _ \| '_ \| '_ \ / _ \/ __| __| | '_ \ / _` |
| |__| (_) | | | | | | |  __/ (__| |_| | | | | (_| |
 \____\___/|_| |_|_| |_|\___|\___|\__|_|_| |_|\__, |
                                              |___/
  ____ _           _   ____        _
 / ___| |__   __ _| |_| __ )  ___ | |_ ___
| |   | '_ \ / _` | __|  _ \ / _ \| __/ __|
| |___| | | | (_| | |_| |_) | (_) | |_\__ \
 \____|_| |_|\__,_|\__|____/ \___/ \__|___/


Starting Wechaty v0.11.40 with Node.js v8.8.1 ...
Working directory: /bot
Please make sure you had installed all the NPM modules which is depended by your bot script.
Executing ts-node src/main.ts
01:52:13 INFO Wechaty v0.11.29 starting...
01:52:14 ERR PuppetWebBridge init() exception: AssertionError [ERR_ASSERTION]: Chromium revision is not downloaded. Run "npm install"
2017-11-04 01:52:14 DEBUG [error] - AssertionError [ERR_ASSERTION]: Chromium revision is not downloaded. Run "npm install"
01:52:14 ERR PuppetWeb initBridge() exception: Chromium revision is not downloaded. Run "npm install"
01:52:14 WARN PuppetWebBridge quit() page.close() exception: TypeError: Cannot read property 'close' of undefined
01:52:14 WARN PuppetWebBridge quit() browser.close() exception: TypeError: Cannot read property 'close' of undefined
2017-11-04 01:52:14 DEBUG [error] - AssertionError [ERR_ASSERTION]: Chromium revision is not downloaded. Run "npm install"
01:52:14 ERR PuppetWeb init() exception: AssertionError [ERR_ASSERTION]: Chromium revision is not downloaded. Run "npm install"
2017-11-04 01:52:14 DEBUG [error] - AssertionError [ERR_ASSERTION]: Chromium revision is not downloaded. Run "npm install"
01:52:14 WARN PuppetWeb quit() is called on a OFF puppet. return directly.
01:52:14 ERR Wechaty start() exception: Chromium revision is not downloaded. Run "npm install"
01:52:14 ERR Bot init() fail: AssertionError [ERR_ASSERTION]: Chromium revision is not downloaded. Run "npm install"
01:52:14 WARN Wechaty stop() without this.puppet
  ____  _   _  ____   ____  _____ ____   ___  ____ _____
 | __ )| | | |/ ___| |  _ \| ____|  _ \ / _ \|  _ \_   _|
 |  _ \| | | | |  _  | |_) |  _| | |_) | | | | |_) || |
 | |_) | |_| | |_| | |  _ <| |___|  __/| |_| |  _ < | |
 |____/ \___/ \____| |_| \_\_____|_|    \___/|_| \_\|_|

Press ENTER to continue ...


### 1. source code of src/main.ts

import {Logger, LoggerConfig} from 'log4ts';
import {config, Wechaty, log} from 'wechaty';
/* tslint:disable:variable-name */
import {hotImport} from 'hot-import';

import ConsoleAppender from 'log4ts/build/appenders/ConsoleAppender';
import BasicLayout from 'log4ts/build/layouts/BasicLayout';
import {LogLevel} from 'log4ts/build/LogLevel';

const finis = require('finis');

function configLogger() {
  const appender = new ConsoleAppender();
  const layout = new BasicLayout();
  appender.setLayout(layout);
  const config = new LoggerConfig(appender);
  config.setLevel(LogLevel.DEBUG);
  Logger.setConfig(config);
}

const bot = Wechaty.instance({profile: config.default.DEFAULT_PROFILE});

async function main() {
  configLogger();
  // const cronjobs = await hotImport(`cronjobs`);
  // cronjobs().setup();

  // const logger = Logger.getLogger(`logout`);

  // Bind events
  bot.on('scan', 'listener/scan');
  bot.on('logout', 'listener/logout');
  bot.on('login', 'listener/login');
  bot.on('friend', 'listener/friend');
  bot.on('room-join', 'listener/room-join');
  bot.on('room-leave', 'listener/room-leave');
  bot.on('room-topic', 'listener/room-topic');
  bot.on('message', 'listener/message');
  bot.on('heartbeat', 'listener/heartbeat');
  bot.on('error', 'listener/error');

  await bot.start();

  finis(async (code, signal) => {
    const exitMsg = `Wechaty exit ${code} because of ${signal} `;
    console.log(exitMsg);
    await bot.say(exitMsg);
  });
}

main().catch(async (e) => {
  log.error('Bot', 'init() fail: %s', e);
  await bot.stop();
  process.exit(-1);
});


### 2. directory structor of /bot

total 18188
-rw-r--r--   1 bot bot     2534 May  3  2017 Readme.md
-rw-r--r--   1 bot bot     1669 Oct 30 18:04 demo.wechaty.json
-rw-r--r--   1 bot bot     9807 Apr 22  2017 intro.md
-rw-r--r--   1 bot bot 18218830 Oct 30 18:04 log.json
drwxr-xr-x  11 bot bot      374 Feb 12  2017 loopbacksdk
-rw-r--r--   1 bot bot       91 Mar 25  2017 msg.js.map
drwxr-xr-x 156 bot bot     5304 Nov  4  2017 node_modules
-rw-r--r--   1 bot bot   102948 Nov  4  2017 package-lock.json
-rw-r--r--   1 bot bot     1609 Nov  4  2017 package.json
-rw-r--r--   1 bot bot   217646 Oct 30 15:21 potential-posting.json
drwxr-xr-x  26 bot bot      884 Nov  4  2017 src
drwxr-xr-x   4 bot bot      136 Apr 14  2017 tmp
-rw-r--r--   1 bot bot      142 Jan 17  2017 tsconfig.json
-rw-r--r--   1 bot bot     2585 Oct 30 02:47 tslint.json
-rw-r--r--   1 bot bot    40245 Feb 10  2017 yarn.lock

### 3. package.json

{
  "dependencies": {
    "@purest/providers": "^1.0.0",
    "@types/express": "^4.0.34",
    "bluebird": "^3.4.7",
    "chromedriver": "^2.27.2",
    "cloudinary": "^1.6.0",
    "express": "^4.14.0",
    "finis": "0.0.3",
    "jsonfile": "^2.4.0",
    "log4ts": "^0.4.2",
    "puppet": "^1.0.0",
    "puppeteer": "^0.12.0",
    "purest": "^3.0.1",
    "qrcode-terminal": "^0.11.0",
    "request": "^2.79.0",
    "tslint-jsdoc-rules": "^0.1.2",
    "typescript": "^2.6.1",
    "uuid": "^3.0.1",
    "wechaty": "0.11.29"
  },
  "scripts": {
    "start": "docker run --env CLOUDINARY_SECRET=$CLOUDINARY_SECRET -ti --volume=\"$(pwd)\":/bot --rm zixia/wechaty src/main.ts",
    "direct": "node src/main.js",
    "preinstall-chromedriver": "npm install",
    "install-chromedriver": "node node_modules/chromedriver/install.js",
    "pretest_e2e": "npm run install-chromedriver",
    "test_e2e": "node release/test/rune2e.js"
  },
  "name": "haoshiyou-bot",
  "description": "[![Powered by Wechaty](https://img.shields.io/badge/Powered%20By-Wechaty-green.svg)](https://github.com/wechaty/wechaty)",
  "version": "1.0.1",
  "main": "main.js",
  "devDependencies": {},
  "repository": {
    "type": "git",
    "url": "git+https://github.com/xinbenlv/haoshiyou-bot.git"
  },
  "keywords": [
    "haoshiyou",
    "haoshiyou.org",
    "chatbot",
    "wechaty",
    "wechat",
    "rent",
    "house",
    "roommate"
  ],
  "author": "Zainan Victor Zhou",
  "license": "MIT",
  "bugs": {
    "url": "https://github.com/xinbenlv/haoshiyou-bot/issues"
  },
  "homepage": "https://github.com/xinbenlv/haoshiyou-bot#readme"
}

### 4. directory structor inside /bot/node_modules

@purest		 callsites	  error-ex		      graceful-fs	 json-schema-traverse	 p-locate	       puppeteer	sockjs		       typedarray
@types		 caseless	  es6-promise		      hosted-git-info	 json-stringify-safe	 p-map		       purest		spdx-correct	       typescript
agent-base	 chromedriver	  es6-promisify		      hot-import	 jsonfile		 parse-json	       qrcode-terminal	spdx-expression-parse  ultron
array-union	 cloudinary	  escapeshellarg	      https-proxy-agent  jsonify		 path-exists	       raven		spdx-license-ids       underscore.string
array-uniq	 co		  express		      iconv-lite	 jsprim			 path-is-inside        raw-body		sprintf-js	       util-deprecate
asn1		 colors		  extract-zip		      inherits		 load-json-file		 path-parse	       read-pkg		sshpk		       uuid
async-limiter	 combined-stream  extsprintf		      is-arrayish	 locate-path		 path-type	       read-pkg-up	stack-trace	       validate-npm-package-license
asynckit	 concat-stream	  fast-deep-equal	      is-builtin-module  log4ts			 pend		       readable-stream	state-switch	       verror
aws4		 cookie		  fast-json-stable-stringify  is-path-cwd	 lsmod			 phantom	       request		string_decoder	       watchdog
bcrypt-pbkdf	 core-util-is	  faye-websocket	      is-path-in-cwd	 minimist		 pify		       resolve		stringstream	       weak
bindings	 dashdash	  fd-slicer		      is-path-inside	 nan			 pinkie		       retry-promise	strip-bom	       wechaty
bl		 del		  find-up		      is-typedarray	 node-uuid		 pinkie-promise        rxjs		symbol-observable      win-spawn
bluebird	 delayed-stream   findup-sync		      isarray		 normalize-package-data  process-nextick-args  safe-buffer	timed-out	       wordwrap
body-parser	 diff		  finis			      isstream		 oauth-sign		 progress	       sax		traverse	       ws
brolog		 dnode		  forever-agent		      jodid25519	 object-assign		 proxy-from-env        semver		tslint-jsdoc-rules     xml2js
builtin-modules  dnode-protocol   getpass		      jsbn		 optimist		 punycode	       shoe		tunnel-agent	       xmlbuilder
bytes		 ecc-jsbn	  globby		      json-schema	 p-limit		 puppet		       sister		tweetnacl	       yauzl

### 5. wechaty doctor


  #### Wechaty Doctor

  1. Wechaty version: 0.11.40
  2. Linux x64 version 4.9.13-moby memory 1429/1998 MB
  3. Docker: true
  4. Node version: v8.8.1
  5. Tcp IPC TEST: PASS


  ____        _               _ _             ___ ____ ____  _   _ _____
 / ___| _   _| |__  _ __ ___ (_) |_    __ _  |_ _/ ___/ ___|| | | | ____|
 \___ \| | | | '_ \| '_ ` _ \| | __|  / _` |  | |\___ \___ \| | | |  _|
  ___) | |_| | |_) | | | | | | | |_  | (_| |  | | ___) |__) | |_| | |___
 |____/ \__,_|_.__/|_| |_| |_|_|\__|  \__,_| |___|____/____/ \___/|_____|

_____________________________________________________________
####### please paste all the above diagnose messages #######

Wechaty Issue https://github.com/chatie/wechaty/issues

Press ENTER to continue ...


 __        __        _           _
 \ \      / /__  ___| |__   __ _| |_ _   _
  \ \ /\ / / _ \/ __| '_ \ / _` | __| | | |
   \ V  V /  __/ (__| | | | (_| | |_| |_| |
    \_/\_/ \___|\___|_| |_|\__,_|\__|\__, |
                                     |___/
____________________________________________________
            https://www.chatie.io
  _____      _ _     ____  ____ ____
 | ____|_  _(_) |_  |___ \| ___| ___|
 |  _| \ \/ / | __|   __) |___ \___ \
 | |___ >  <| | |_   / __/ ___) |__) |
 |_____/_/\_\_|\__| |_____|____/____/

npm ERR! code ELIFECYCLE
npm ERR! errno 255
npm ERR! haoshiyou-bot@1.0.1 start: `docker run --env CLOUDINARY_SECRET=$CLOUDINARY_SECRET -ti --volume="$(pwd)":/bot --rm zixia/wechaty src/main.ts`
npm ERR! Exit status 255
npm ERR!
npm ERR! Failed at the haoshiyou-bot@1.0.1 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/zzn/.npm/_logs/2017-11-04T19_36_58_816Z-debug.log


About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 21 (13 by maintainers)

Most upvoted comments

I know how to reproduce it now

If we haven’t installed wechaty(or you can delete node_modules folder), it will run successful with docker, but after installing wechaty, it will fail to start with docker

11:39:15 zzn@zzn-macbookpro2 ❯ ~ ❯ d ❯ … ❯ haoshiyou-bot ❯ v2 ❯ demo-chatie-issue-954 ▶ master 1⇡ + ▶ $ ▶ls
package-lock.json  package.json       src/               tsconfig.json
11:39:17 zzn@zzn-macbookpro2 ❯ ~ ❯ d ❯ … ❯ haoshiyou-bot ❯ v2 ❯ demo-chatie-issue-954 ▶ master 1⇡ + ▶ $ ▶docker run -ti --rm --volume="$(pwd)":/bot zixia/wechaty src/mybot.ts

 __        __        _           _
 \ \      / /__  ___| |__   __ _| |_ _   _
  \ \ /\ / / _ \/ __| '_ \ / _` | __| | | |
   \ V  V /  __/ (__| | | | (_| | |_| |_| |
    \_/\_/ \___|\___|_| |_|\__,_|\__|\__, |
                                     |___/
____________________________________________________
            https://www.chatie.io
  ____                            _   _
 / ___|___  _ __  _ __   ___  ___| |_(_)_ __   __ _
| |   / _ \| '_ \| '_ \ / _ \/ __| __| | '_ \ / _` |
| |__| (_) | | | | | | |  __/ (__| |_| | | | | (_| |
 \____\___/|_| |_|_| |_|\___|\___|\__|_|_| |_|\__, |
                                              |___/
  ____ _           _   ____        _
 / ___| |__   __ _| |_| __ )  ___ | |_ ___
| |   | '_ \ / _` | __|  _ \ / _ \| __/ __|
| |___| | | | (_| | |_| |_) | (_) | |_\__ \
 \____|_| |_|\__,_|\__|____/ \___/ \__|___/


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 ts-node src/mybot.ts
18:49:52 WARN Wechaty init() DEPRECATED and will be removed after Jun 2018. Use start() instead.
18:49:52 INFO Wechaty v0.13.37 starting...
Scan QR Code to login: 0
https://login.weixin.qq.com/qrcode/YcRPCEW9EQ==
^C Script terminated by Control-C
   ____ _        _            ____
  / ___| |_ _ __| |    _     / ___|
 | |   | __| '__| |  _| |_  | |
 | |___| |_| |  | | |_   _| | |___
  \____|\__|_|  |_|   |_|    \____|


 __        __        _           _
 \ \      / /__  ___| |__   __ _| |_ _   _
  \ \ /\ / / _ \/ __| '_ \ / _` | __| | | |
   \ V  V /  __/ (__| | | | (_| | |_| |_| |
    \_/\_/ \___|\___|_| |_|\__,_|\__|\__, |
                                     |___/
____________________________________________________
            https://www.chatie.io
  _____      _ _     _ _____  ___
 | ____|_  _(_) |_  / |___ / / _ \
 |  _| \ \/ / | __| | | |_ \| | | |
 | |___ >  <| | |_  | |___) | |_| |
 |_____/_/\_\_|\__| |_|____/ \___/

11:39:52 zzn@zzn-macbookpro2 ❯ ~ ❯ d ❯ … ❯ haoshiyou-bot ❯ v2 ❯ demo-chatie-issue-954 ▶ master 1⇡ + ▶ $ ▶npm i
WARN registry Unexpected warning for https://registry.npmjs.org/: Miscellaneous Warning EINTEGRITY: sha1-D8Z9fBQYJd6UKC3VNr7GubzoYKs= integrity checksum failed when using sha1: wanted sha1-D8Z9fBQYJd6UKC3VNr7GubzoYKs= but got sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==. (4142 bytes)
WARN registry Using stale package data from https://registry.npmjs.org/ due to a request error during revalidation.

> puppeteer@0.13.0 install /Users/zzn/Documents/ws/haoshiyou-bot/v2/demo-chatie-issue-954/node_modules/puppeteer
> node install.js

Downloading Chromium r515411 - 73.2 Mb [====================] 100% 0.0s
Chromium downloaded to /Users/zzn/Documents/ws/haoshiyou-bot/v2/demo-chatie-issue-954/node_modules/puppeteer/.local-chromium/mac-515411
added 158 packages in 12.736s
11:40:14 zzn@zzn-macbookpro2 ❯ ~ ❯ d ❯ … ❯ haoshiyou-bot ❯ v2 ❯ demo-chatie-issue-954 ▶ master 1⇡ + ▶ $ ▶docker run -ti --rm --volume="$(pwd)":/bot zixia/wechaty src/mybot.ts

 __        __        _           _
 \ \      / /__  ___| |__   __ _| |_ _   _
  \ \ /\ / / _ \/ __| '_ \ / _` | __| | | |
   \ V  V /  __/ (__| | | | (_| | |_| |_| |
    \_/\_/ \___|\___|_| |_|\__,_|\__|\__, |
                                     |___/
____________________________________________________
            https://www.chatie.io
  ____                            _   _
 / ___|___  _ __  _ __   ___  ___| |_(_)_ __   __ _
| |   / _ \| '_ \| '_ \ / _ \/ __| __| | '_ \ / _` |
| |__| (_) | | | | | | |  __/ (__| |_| | | | | (_| |
 \____\___/|_| |_|_| |_|\___|\___|\__|_|_| |_|\__, |
                                              |___/
  ____ _           _   ____        _
 / ___| |__   __ _| |_| __ )  ___ | |_ ___
| |   | '_ \ / _` | __|  _ \ / _ \| __/ __|
| |___| | | | (_| | |_| |_) | (_) | |_\__ \
 \____|_| |_|\__,_|\__|____/ \___/ \__|___/


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 ts-node src/mybot.ts
18:50:50 WARN Wechaty init() DEPRECATED and will be removed after Jun 2018. Use start() instead.
18:50:50 INFO Wechaty v0.13.36 starting...
18:50:50 ERR PuppetWebBridge init() exception: AssertionError [ERR_ASSERTION]: Chromium revision is not downloaded. Run "npm install"
18:50:50 ERR PuppetWeb initBridge() exception: Chromium revision is not downloaded. Run "npm install"
18:50:50 WARN PuppetWebBridge quit() page.close() exception: TypeError: Cannot read property 'close' of undefined
18:50:50 WARN PuppetWebBridge quit() browser.close() exception: TypeError: Cannot read property 'close' of undefined
18:50:50 ERR PuppetWeb init() exception: AssertionError [ERR_ASSERTION]: Chromium revision is not downloaded. Run "npm install"
18:50:50 ERR Wechaty start() exception: Chromium revision is not downloaded. Run "npm install"
(node:32) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): AssertionError [ERR_ASSERTION]: Chromium revision is not downloaded. Run "npm install"
(node:32) [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.

 __        __        _           _
 \ \      / /__  ___| |__   __ _| |_ _   _
  \ \ /\ / / _ \/ __| '_ \ / _` | __| | | |
   \ V  V /  __/ (__| | | | (_| | |_| |_| |
    \_/\_/ \___|\___|_| |_|\__,_|\__|\__, |
                                     |___/
____________________________________________________
            https://www.chatie.io
  _____      _ _      ___
 | ____|_  _(_) |_   / _ \
 |  _| \ \/ / | __| | | | |
 | |___ >  <| | |_  | |_| |
 |_____/_/\_\_|\__|  \___/

11:40:26 zzn@zzn-macbookpro2 ❯ ~ ❯ d ❯ … ❯ haoshiyou-bot ❯ v2 ❯ demo-chatie-issue-954 ▶ master 1⇡ + ▶ $ ▶