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

Can not launching app - WebDriverError: un known error: cannot find Chrome binary #36

Closed
hailiang-wang opened this issue Oct 5, 2016 · 8 comments
Labels

Comments

@hailiang-wang
Copy link
Member

hailiang-wang commented Oct 5, 2016

Description

The question is how to launch wechaty in Ubuntu Server. I have read the dockfile, which using google's source to install chrome drivers. But my server is now behind the wall.

I also tried with my machine oversea, but it fails too.

$ apt-get update -q && apt-get install -qy \
  apt-utils \
  chromium \
  google-chrome-stable \
  vim \
  xvfb

W: Failed to fetch http://dl.google.com/linux/chrome/deb/dists/stable/Release  Unable to find expected entry 'main/binary-i386/Packages' in Release file (Wron
g sources.list entry or malformed file)

E: Some index files failed to download. They have been ignored, or old ones used instead.

OS

Aliyun ECS
Ubuntu 14.04.4 LTS (GNU/Linux 3.13.0-86-generic x86_64)

Install chromedriver and phantomjs

chromedriver and phantomjs are accessable from path.

image

image

install node modules

npm install # successfully.

get Errors when running npm start.

image

@hailiang-wang
Copy link
Member Author

hailiang-wang commented Oct 5, 2016

@zixia Would you have a look? I have tried to install the dependencies. The service is running great with my Macbook, now, I consider to migrate it into cloud. Thanks in advance.

Application repo, https://github.com/Samurais/philly-wechat/ .

@huan
Copy link
Member

huan commented Oct 5, 2016

hi @Samurais ,

I have some suggestions to you:

  1. first, I had the same issue on aliyun hk server before: those servers can't make connection to some google servers. change your server from aliyun to digitalocean/linode might help. (I had put links in README, which can gain free credit for both of us if you follow that link)
  2. second, please have a look at ChromeDriver PATH problem #30 , if you did not put chrome into your PATH.
  3. third, do not use phantomjs now, because there has some bug which cause the wx app angular environment not right. use chrome/chromium instead.
  4. at last, your philly-wechat is great, I love ai bot. thanks for using wechaty. :)

please let me know if those suggestions could help you solve the problem, and feel free to post here if you still have problems with wechaty cloud installation.

good luck!

@hailiang-wang
Copy link
Member Author

Thanks, I would switch to digitalocean soon. philly is a logic server, but instead of using api.ai/wit.ai, I am going to use superscript currently. philly-wechat is the channel to integrate with wechat. I am also working on other integrations as well, such as gitter.

wechaty is great. 👍
Update here when solving the problem.

@huan
Copy link
Member

huan commented Oct 5, 2016

I do not understand what philly do right now, but it seems philly is doing something overlap with Microsoft Bot Framework.

M$ Bot Framework has a powerful bot builder framework, it's a connector/router for messages between skype/wechat(official account)/facebook/slack/etc..., with a clean nodejs SDK: https://github.com/Microsoft/BotBuilder/tree/master/Node/examples

Also I'm a big LUIS.ai fan. :)

@hailiang-wang
Copy link
Member Author

I did some investigation with Botframework, but it does not mature in some ways.

image

On the other way, I would like to implement something lightweight to build the conversations channels but collect the data on our side because of our business reason.

@hailiang-wang
Copy link
Member Author

hailiang-wang commented Oct 6, 2016

Solution

Finally, the app run in Ubuntu Server successfully.

image

apt-get update -q 
sudo apt-get install chromium-browser  xvfb libpango1.0-0 fonts-liberation libappindicator1 libdbusmenu-glib4 libdbusmenu-gtk4   libindicator7 indicator-application
apt-get install -f gconf-service gconf2-common  libgconf-2-4 gconf-service-backend

wget -c https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo dpkg -i google-chrome-stable_current_amd64.deb
nohup Xvfb :0 -ac -screen 0 1024x768x24 &
export DISPLAY=0:0
node app.js

@huan
Copy link
Member

huan commented Oct 6, 2016

congratulations!

how could you fix this, did you switched the server out of aliyun/qqcloud?

and it would be great if you cloud add a Wechaty Badge to your README :)

Powered by Wechaty

@huan huan added the faq label Oct 6, 2016
@hailiang-wang
Copy link
Member Author

hailiang-wang commented Oct 6, 2016

The server is in aliyun, behind the wall.
Of course, I can add the Badge, thanks a lot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants