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

[Docker] add a `onbuild` image to Wechaty #147

Closed
zixia opened this Issue Dec 19, 2016 · 23 comments

Comments

Projects
None yet
4 participants
@zixia
Member

zixia commented Dec 19, 2016

Bountysource

Gist discussion with @imWildCat at here

@zixia

This comment has been minimized.

Show comment
Hide comment
@zixia

zixia Apr 23, 2017

Member

Good news: Wechaty Docker Image has onbuild tag now!

Basically, you can build your own Wechaty Bot docker image very easy by following 3 steps:

  1. Make sure your project directory work well by npm install && npm start
  2. Create a Dockerfile at the project top directory with the content: FROM: zixia/wechaty:onbuild
  3. Run docker build -t wechaty-bot .

Please report issue if it does not work as expected.

See more on our wiki at:
https://github.com/Chatie/wechaty/wiki/Docker#onbuild

Member

zixia commented Apr 23, 2017

Good news: Wechaty Docker Image has onbuild tag now!

Basically, you can build your own Wechaty Bot docker image very easy by following 3 steps:

  1. Make sure your project directory work well by npm install && npm start
  2. Create a Dockerfile at the project top directory with the content: FROM: zixia/wechaty:onbuild
  3. Run docker build -t wechaty-bot .

Please report issue if it does not work as expected.

See more on our wiki at:
https://github.com/Chatie/wechaty/wiki/Docker#onbuild

@imWildCat

This comment has been minimized.

Show comment
Hide comment
@imWildCat

imWildCat Apr 24, 2017

snipaste_20170424_155309

It works very fine! Thanks a lot!

FROM zixia/wechaty:onbuild
ENV NODE_ENV production
RUN mkdir -p /bot/data # optional, only for the store of *.wechaty.json: Wechaty.instance({profile: './data/foo'})
ADD ./ /bot

CMD ["npm", "start"]

imWildCat commented Apr 24, 2017

snipaste_20170424_155309

It works very fine! Thanks a lot!

FROM zixia/wechaty:onbuild
ENV NODE_ENV production
RUN mkdir -p /bot/data # optional, only for the store of *.wechaty.json: Wechaty.instance({profile: './data/foo'})
ADD ./ /bot

CMD ["npm", "start"]
@zixia

This comment has been minimized.

Show comment
Hide comment
@zixia

zixia Apr 24, 2017

Member

@imWildCat indeed, your project should work by using this Dockerfile:

FROM zixia/wechaty:onbuild

That's all. :)

Member

zixia commented Apr 24, 2017

@imWildCat indeed, your project should work by using this Dockerfile:

FROM zixia/wechaty:onbuild

That's all. :)

@imWildCat

This comment has been minimized.

Show comment
Hide comment
@imWildCat

imWildCat Apr 24, 2017

Issue report:

The installation directory of the custom dependencies in the package.json of my project is in /node_modules instead of /bot/node_modules.

As a result, the execution will fail because the programme cannot find my dependencies.

Ref: WeChat Group [Wechaty Developer's Home] at 11.43 pm 24 April 2017, reported By @ Lockon

imWildCat commented Apr 24, 2017

Issue report:

The installation directory of the custom dependencies in the package.json of my project is in /node_modules instead of /bot/node_modules.

As a result, the execution will fail because the programme cannot find my dependencies.

Ref: WeChat Group [Wechaty Developer's Home] at 11.43 pm 24 April 2017, reported By @ Lockon

@zixia

This comment has been minimized.

Show comment
Hide comment
@zixia

zixia Apr 24, 2017

Member

I'll have a look later.

However, use the root directory to install node_modules is by design.

The modules that installed into /node_modules should be ok because Node.js will search parent directory for node_module.

If the module identifier passed to require() is not a core module, and does not begin with '/', '../', or './', then Node.js starts at the parent directory of the current module, and adds /node_modules, and attempts to load the module from that location. Node will not append node_modules to a path already ending in node_modules.

If it is not found there, then it moves to the parent directory, and so on, until the root of the file system is reached.

See: https://nodejs.org/api/modules.html#modules_loading_from_node_modules_folders

Member

zixia commented Apr 24, 2017

I'll have a look later.

However, use the root directory to install node_modules is by design.

The modules that installed into /node_modules should be ok because Node.js will search parent directory for node_module.

If the module identifier passed to require() is not a core module, and does not begin with '/', '../', or './', then Node.js starts at the parent directory of the current module, and adds /node_modules, and attempts to load the module from that location. Node will not append node_modules to a path already ending in node_modules.

If it is not found there, then it moves to the parent directory, and so on, until the root of the file system is reached.

See: https://nodejs.org/api/modules.html#modules_loading_from_node_modules_folders

@imWildCat

This comment has been minimized.

Show comment
Hide comment
@imWildCat

imWildCat Apr 24, 2017

@zixia Sorry for my carelessness! I have looked at this issue in 'depth'. As for this project https://github.com/mukaiu/bot-docker-test, the module 'serve-favicon' seemed not to be installed in /node_modules correctly. Instead, it is in these directories:

/root/.npm/serve-favicon
/root/.npm/registry.npmjs.org/serve-favicon
/tmp/npm-5-06ef38e2/registry.npmjs.org/serve-favicon
/tmp/npm-7-bc212f86/registry.npmjs.org/serve-favicon

Way for recurrence (in the project mentioned above):

bash-4.3# ./bin/www
module.js:472
    throw err;
    ^

Error: Cannot find module 'serve-favicon'
    at Function.Module._resolveFilename (module.js:470:15)
    at Function.Module._load (module.js:418:25)
    at Module.require (module.js:498:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/bot/app.js:3:15)
    at Module._compile (module.js:571:32)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)
bash-4.3# find / -name serve-favicon
/root/.npm/serve-favicon
/root/.npm/registry.npmjs.org/serve-favicon
/tmp/npm-5-06ef38e2/registry.npmjs.org/serve-favicon
/tmp/npm-7-bc212f86/registry.npmjs.org/serve-favicon
bash-4.3# ls /node_modules | grep serve-favicon
# nothing

imWildCat commented Apr 24, 2017

@zixia Sorry for my carelessness! I have looked at this issue in 'depth'. As for this project https://github.com/mukaiu/bot-docker-test, the module 'serve-favicon' seemed not to be installed in /node_modules correctly. Instead, it is in these directories:

/root/.npm/serve-favicon
/root/.npm/registry.npmjs.org/serve-favicon
/tmp/npm-5-06ef38e2/registry.npmjs.org/serve-favicon
/tmp/npm-7-bc212f86/registry.npmjs.org/serve-favicon

Way for recurrence (in the project mentioned above):

bash-4.3# ./bin/www
module.js:472
    throw err;
    ^

Error: Cannot find module 'serve-favicon'
    at Function.Module._resolveFilename (module.js:470:15)
    at Function.Module._load (module.js:418:25)
    at Module.require (module.js:498:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/bot/app.js:3:15)
    at Module._compile (module.js:571:32)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)
bash-4.3# find / -name serve-favicon
/root/.npm/serve-favicon
/root/.npm/registry.npmjs.org/serve-favicon
/tmp/npm-5-06ef38e2/registry.npmjs.org/serve-favicon
/tmp/npm-7-bc212f86/registry.npmjs.org/serve-favicon
bash-4.3# ls /node_modules | grep serve-favicon
# nothing
@zixia

This comment has been minimized.

Show comment
Hide comment
@zixia

zixia Apr 24, 2017

Member

Yes, I'm looking on this too.

It's very strange that the npm install command seems not working right.

Member

zixia commented Apr 24, 2017

Yes, I'm looking on this too.

It's very strange that the npm install command seems not working right.

@zixia

This comment has been minimized.

Show comment
Hide comment
@zixia

zixia Apr 25, 2017

Member

@imWildCat Let's talk about this strange VOLUME/WORKDIR bug at #436

Member

zixia commented Apr 25, 2017

@imWildCat Let's talk about this strange VOLUME/WORKDIR bug at #436

@ditunes

This comment has been minimized.

Show comment
Hide comment
@ditunes

ditunes Apr 26, 2017

still has problem ,this is my error info

wechat-bot@1.0.0 start /app
> tsc && node ./dist/index.js

03:01:22 INFO Wechaty v0.7.71 initializing...
03:01:23 WARN PuppetWebBrowserDriver valid() getSession() catch() rejected: Server terminated early with status 1
03:01:23 WARN PuppetWebBrowserDriver valid() driver.getSession() exception: Server terminated early with status 1
03:01:23 WARN PuppetWebBrowserDriver initChromeDriver() got invalid driver
03:01:23 WARN PuppetWebBrowserDriver initChromeDriver() with retry: 1
(node:33) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: Server terminated early with status 1
(node:33) 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.
03:01:23 WARN PuppetWebBrowserDriver valid() getSession() catch() rejected: Server terminated early with status 1
03:01:23 WARN PuppetWebBrowserDriver valid() driver.getSession() exception: Server terminated early with status 1
03:01:23 WARN PuppetWebBrowserDriver initChromeDriver() got invalid driver
03:01:23 WARN PuppetWebBrowserDriver initChromeDriver() with retry: 2
(node:33) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): Error: Server terminated early with status 1

my dockerfile is


FROM zixia/wechaty:onbuild
#WORKDIR /bot
RUN mkdir -p /bot/data
ADD ./ /bot
CMD [ "npm","start" ]


ditunes commented Apr 26, 2017

still has problem ,this is my error info

wechat-bot@1.0.0 start /app
> tsc && node ./dist/index.js

03:01:22 INFO Wechaty v0.7.71 initializing...
03:01:23 WARN PuppetWebBrowserDriver valid() getSession() catch() rejected: Server terminated early with status 1
03:01:23 WARN PuppetWebBrowserDriver valid() driver.getSession() exception: Server terminated early with status 1
03:01:23 WARN PuppetWebBrowserDriver initChromeDriver() got invalid driver
03:01:23 WARN PuppetWebBrowserDriver initChromeDriver() with retry: 1
(node:33) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: Server terminated early with status 1
(node:33) 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.
03:01:23 WARN PuppetWebBrowserDriver valid() getSession() catch() rejected: Server terminated early with status 1
03:01:23 WARN PuppetWebBrowserDriver valid() driver.getSession() exception: Server terminated early with status 1
03:01:23 WARN PuppetWebBrowserDriver initChromeDriver() got invalid driver
03:01:23 WARN PuppetWebBrowserDriver initChromeDriver() with retry: 2
(node:33) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): Error: Server terminated early with status 1

my dockerfile is


FROM zixia/wechaty:onbuild
#WORKDIR /bot
RUN mkdir -p /bot/data
ADD ./ /bot
CMD [ "npm","start" ]


@zixia

This comment has been minimized.

Show comment
Hide comment
@zixia

zixia Apr 26, 2017

Member

Please try to run docker pull zixia/wechaty:onbuild and change your Dockerfile as this(only one line, no more):

FROM zixia/wechaty:onbuild

Then let me know if it works.

Member

zixia commented Apr 26, 2017

Please try to run docker pull zixia/wechaty:onbuild and change your Dockerfile as this(only one line, no more):

FROM zixia/wechaty:onbuild

Then let me know if it works.

@imWildCat

This comment has been minimized.

Show comment
Hide comment
@imWildCat

imWildCat Apr 26, 2017

@ditunes With the latest version of 'onbuild', your project was running successfully.

imWildCat commented Apr 26, 2017

@ditunes With the latest version of 'onbuild', your project was running successfully.

@zixia

This comment has been minimized.

Show comment
Hide comment
@zixia

zixia Apr 28, 2017

Member

Hope everything goes well with the onbuild image.

I'll close this issue, and please create a new issue if there's any problem with the docker image.

Member

zixia commented Apr 28, 2017

Hope everything goes well with the onbuild image.

I'll close this issue, and please create a new issue if there's any problem with the docker image.

@zixia zixia closed this Apr 28, 2017

@zixia

This comment has been minimized.

Show comment
Hide comment
@zixia

zixia Apr 28, 2017

Member

@ditunes Hello, would you like to write a short article to introduce how to use Wechaty:onbuild Docker Image to build a ChatBot docker image by yourself?

Because this could help other developers to save their time to use it.

If you'd like to, I'll really appreciate that. Thanks!

Member

zixia commented Apr 28, 2017

@ditunes Hello, would you like to write a short article to introduce how to use Wechaty:onbuild Docker Image to build a ChatBot docker image by yourself?

Because this could help other developers to save their time to use it.

If you'd like to, I'll really appreciate that. Thanks!

@zixia zixia reopened this Apr 28, 2017

@imWildCat

This comment has been minimized.

Show comment
Hide comment
@imWildCat

imWildCat May 1, 2017

I am currently learning TensorFlow. If everything is fine, I am considering to write an article about chatbot and TensorFlow. If possible, using TensorFlow (cuda) within Docker can be mentioned. However, it is also too specific rather than general. And it will take me a long period of time.

imWildCat commented May 1, 2017

I am currently learning TensorFlow. If everything is fine, I am considering to write an article about chatbot and TensorFlow. If possible, using TensorFlow (cuda) within Docker can be mentioned. However, it is also too specific rather than general. And it will take me a long period of time.

@zixia

This comment has been minimized.

Show comment
Hide comment
@zixia

zixia May 1, 2017

Member

@imWildCat Awesome!

Would you like to use Wechaty as the ChatBot example and post it to blog.chatie.io also?

Member

zixia commented May 1, 2017

@imWildCat Awesome!

Would you like to use Wechaty as the ChatBot example and post it to blog.chatie.io also?

@imWildCat

This comment has been minimized.

Show comment
Hide comment
@imWildCat

imWildCat May 1, 2017

@zixia Of course. That's also the direction for my application.
But please do not push me =。=
It should be finished before July.

Reason:
My Deep Learning course will finish in August.

imWildCat commented May 1, 2017

@zixia Of course. That's also the direction for my application.
But please do not push me =。=
It should be finished before July.

Reason:
My Deep Learning course will finish in August.

@zixia

This comment has been minimized.

Show comment
Hide comment
@zixia

zixia May 1, 2017

Member

Great! I had just created an issue on the blog for a memo.

Take your time, no rush, be cool. :)

Member

zixia commented May 1, 2017

Great! I had just created an issue on the blog for a memo.

Take your time, no rush, be cool. :)

@zixia

This comment has been minimized.

Show comment
Hide comment
@zixia

zixia May 1, 2017

Member

@ditunes Hello, would you like to share your Docker Onbuild experience to others?

I'm looking forward to your reply.

Thanks!

Member

zixia commented May 1, 2017

@ditunes Hello, would you like to share your Docker Onbuild experience to others?

I'm looking forward to your reply.

Thanks!

@MaxLi1994

This comment has been minimized.

Show comment
Hide comment
@MaxLi1994

MaxLi1994 May 9, 2017

It seems that I have encountered the same error with @ditunes

Here's my error info

Starting Wechaty v0.8.14 with Node.js v7.10.0 ...

> wechat-watch-bot@0.1.0 start /app
> ts-node src/index.ts

03:35:01 INFO Wechaty v0.7.95 initializing...
03:35:01 WARN PuppetWebBrowserDriver valid() getSession() catch() rejected: Server terminated early with status 1
03:35:01 WARN PuppetWebBrowserDriver valid() driver.getSession() exception: Server terminated early with status 1
03:35:01 WARN PuppetWebBrowserDriver initChromeDriver() got invalid driver
03:35:01 WARN PuppetWebBrowserDriver initChromeDriver() with retry: 1
(node:38) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: Server terminated early with status 1
(node:38) 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.
03:35:01 WARN PuppetWebBrowserDriver valid() getSession() catch() rejected: Server terminated early with status 1
03:35:01 WARN PuppetWebBrowserDriver valid() driver.getSession() exception: Server terminated early with status 1
03:35:01 WARN PuppetWebBrowserDriver initChromeDriver() got invalid driver
03:35:01 WARN PuppetWebBrowserDriver initChromeDriver() with retry: 2
(node:38) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): Error: Server terminated early with status 1
03:35:01 WARN PuppetWebBrowserDriver valid() getSession() catch() rejected: Server terminated early with status 1
03:35:01 WARN PuppetWebBrowserDriver valid() driver.getSession() exception: Server terminated early with status 1
03:35:01 WARN PuppetWebBrowserDriver initChromeDriver() got invalid driver
03:35:01 WARN PuppetWebBrowserDriver initChromeDriver() with retry: 3
(node:38) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 3): Error: Server terminated early with status 1
03:35:01 WARN PuppetWebBrowserDriver valid() getSession() catch() rejected: Server terminated early with status 1
03:35:01 WARN PuppetWebBrowserDriver valid() driver.getSession() exception: Server terminated early with status 1
03:35:01 WARN PuppetWebBrowserDriver initChromeDriver() got invalid driver
03:35:01 WARN PuppetWebBrowserDriver initChromeDriver() not valid after retry: 4 times: Error: initChromeDriver() got invalid driver
    at BrowserDriver.<anonymous> (/app/node_modules/wechaty/src/puppet-web/browser-driver.ts:146:21)
    at Generator.next (<anonymous>)
    at fulfilled (/app/node_modules/wechaty/dist/src/puppet-web/browser-driver.js:4:58)
    at process._tickDomainCallback (internal/process/next_tick.js:135:7)
03:35:01 ERR PuppetWebBrowser init() exception: initChromeDriver() got invalid driver
03:35:01 ERR PuppetWebBrowser quit() this.driver.quit() exception Server terminated early with status 1
(node:38) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 4): Error: Server terminated early with status 1
03:35:01 ERR PuppetWeb initBrowser() exception: initChromeDriver() got invalid driver
03:35:01 ERR PuppetWeb init() exception: Error: initChromeDriver() got invalid driver
    at BrowserDriver.<anonymous> (/app/node_modules/wechaty/src/puppet-web/browser-driver.ts:146:21)
    at Generator.next (<anonymous>)
    at fulfilled (/app/node_modules/wechaty/dist/src/puppet-web/browser-driver.js:4:58)
    at process._tickDomainCallback (internal/process/next_tick.js:135:7)
(node:38) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 6): TypeError: Cannot read property 'quit' of undefined
03:35:08 WARN PuppetWebBrowserDriver valid() driver.getSession() timeout(halt?)
03:35:08 WARN PuppetWebBrowserDriver valid() driver.getSession() timeout(halt?)
03:35:08 WARN PuppetWebBrowserDriver valid() driver.getSession() timeout(halt?)
03:35:08 WARN PuppetWebBrowserDriver valid() driver.getSession() timeout(halt?)
03:37:01 WARN PuppetWeb quit() Promise() timeout
03:37:01 ERR PuppetWeb quit() exception: quit() Promise() timeout
03:37:01 ERR Wechaty init() exception: quit() Promise() timeout
(node:38) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 7): Error: quit() Promise() timeout

My Dockerfile's just one line FROM zixia/wechaty:onbuild

MaxLi1994 commented May 9, 2017

It seems that I have encountered the same error with @ditunes

Here's my error info

Starting Wechaty v0.8.14 with Node.js v7.10.0 ...

> wechat-watch-bot@0.1.0 start /app
> ts-node src/index.ts

03:35:01 INFO Wechaty v0.7.95 initializing...
03:35:01 WARN PuppetWebBrowserDriver valid() getSession() catch() rejected: Server terminated early with status 1
03:35:01 WARN PuppetWebBrowserDriver valid() driver.getSession() exception: Server terminated early with status 1
03:35:01 WARN PuppetWebBrowserDriver initChromeDriver() got invalid driver
03:35:01 WARN PuppetWebBrowserDriver initChromeDriver() with retry: 1
(node:38) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: Server terminated early with status 1
(node:38) 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.
03:35:01 WARN PuppetWebBrowserDriver valid() getSession() catch() rejected: Server terminated early with status 1
03:35:01 WARN PuppetWebBrowserDriver valid() driver.getSession() exception: Server terminated early with status 1
03:35:01 WARN PuppetWebBrowserDriver initChromeDriver() got invalid driver
03:35:01 WARN PuppetWebBrowserDriver initChromeDriver() with retry: 2
(node:38) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): Error: Server terminated early with status 1
03:35:01 WARN PuppetWebBrowserDriver valid() getSession() catch() rejected: Server terminated early with status 1
03:35:01 WARN PuppetWebBrowserDriver valid() driver.getSession() exception: Server terminated early with status 1
03:35:01 WARN PuppetWebBrowserDriver initChromeDriver() got invalid driver
03:35:01 WARN PuppetWebBrowserDriver initChromeDriver() with retry: 3
(node:38) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 3): Error: Server terminated early with status 1
03:35:01 WARN PuppetWebBrowserDriver valid() getSession() catch() rejected: Server terminated early with status 1
03:35:01 WARN PuppetWebBrowserDriver valid() driver.getSession() exception: Server terminated early with status 1
03:35:01 WARN PuppetWebBrowserDriver initChromeDriver() got invalid driver
03:35:01 WARN PuppetWebBrowserDriver initChromeDriver() not valid after retry: 4 times: Error: initChromeDriver() got invalid driver
    at BrowserDriver.<anonymous> (/app/node_modules/wechaty/src/puppet-web/browser-driver.ts:146:21)
    at Generator.next (<anonymous>)
    at fulfilled (/app/node_modules/wechaty/dist/src/puppet-web/browser-driver.js:4:58)
    at process._tickDomainCallback (internal/process/next_tick.js:135:7)
03:35:01 ERR PuppetWebBrowser init() exception: initChromeDriver() got invalid driver
03:35:01 ERR PuppetWebBrowser quit() this.driver.quit() exception Server terminated early with status 1
(node:38) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 4): Error: Server terminated early with status 1
03:35:01 ERR PuppetWeb initBrowser() exception: initChromeDriver() got invalid driver
03:35:01 ERR PuppetWeb init() exception: Error: initChromeDriver() got invalid driver
    at BrowserDriver.<anonymous> (/app/node_modules/wechaty/src/puppet-web/browser-driver.ts:146:21)
    at Generator.next (<anonymous>)
    at fulfilled (/app/node_modules/wechaty/dist/src/puppet-web/browser-driver.js:4:58)
    at process._tickDomainCallback (internal/process/next_tick.js:135:7)
(node:38) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 6): TypeError: Cannot read property 'quit' of undefined
03:35:08 WARN PuppetWebBrowserDriver valid() driver.getSession() timeout(halt?)
03:35:08 WARN PuppetWebBrowserDriver valid() driver.getSession() timeout(halt?)
03:35:08 WARN PuppetWebBrowserDriver valid() driver.getSession() timeout(halt?)
03:35:08 WARN PuppetWebBrowserDriver valid() driver.getSession() timeout(halt?)
03:37:01 WARN PuppetWeb quit() Promise() timeout
03:37:01 ERR PuppetWeb quit() exception: quit() Promise() timeout
03:37:01 ERR Wechaty init() exception: quit() Promise() timeout
(node:38) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 7): Error: quit() Promise() timeout

My Dockerfile's just one line FROM zixia/wechaty:onbuild

@MaxLi1994

This comment has been minimized.

Show comment
Hide comment
@MaxLi1994

MaxLi1994 May 9, 2017

Turns out that I have local dependency of wechaty in my package.json.
Found this solution in #281

Perhaps it's best to document this in the wiki.
Fantastic project btw🎉

MaxLi1994 commented May 9, 2017

Turns out that I have local dependency of wechaty in my package.json.
Found this solution in #281

Perhaps it's best to document this in the wiki.
Fantastic project btw🎉

@zixia

This comment has been minimized.

Show comment
Hide comment
@zixia

zixia May 9, 2017

Member

@MaxLi1994 Thanks for pointing out this problem again.

Do not have local dependency is good practice.

But it should not break your code. There must be some bug inside somewhere.

Member

zixia commented May 9, 2017

@MaxLi1994 Thanks for pointing out this problem again.

Do not have local dependency is good practice.

But it should not break your code. There must be some bug inside somewhere.

@MaxLi1994

This comment has been minimized.

Show comment
Hide comment
@MaxLi1994

MaxLi1994 May 9, 2017

@zixia The bug didn't show up after I had removed local dependency of wechaty.

I noticed that my local version of wechaty was 0.7.x, perhaps it's the old version that caused the bug.

MaxLi1994 commented May 9, 2017

@zixia The bug didn't show up after I had removed local dependency of wechaty.

I noticed that my local version of wechaty was 0.7.x, perhaps it's the old version that caused the bug.

@zixia

This comment has been minimized.

Show comment
Hide comment
@zixia

zixia Jun 15, 2017

Member

No news is good news.

Issue closed.

Member

zixia commented Jun 15, 2017

No news is good news.

Issue closed.

@zixia zixia closed this Jun 15, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment