Skip to content

Won't run browser: google-chrome not found #2160

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

Closed
b264 opened this issue Apr 27, 2017 · 3 comments
Closed

Won't run browser: google-chrome not found #2160

b264 opened this issue Apr 27, 2017 · 3 comments

Comments

@b264
Copy link

b264 commented Apr 27, 2017

What version of the CLI are you using? Output of ionic --version

2.2.3

Short description of the problem:

Won't run browser.

What behavior are you expecting?

ionic run browser does not abort with error message

Steps to reproduce:

  1. install Ubuntu 16
  2. apt install chromium-browser
  3. ionic run browser

Post the output of ionic info below please

Cordova CLI: 6.5.0 
Ionic Framework Version: 3.0.1
Ionic CLI Version: 2.2.3
Ionic App Lib Version: 2.2.1
Ionic App Scripts Version: 1.3.0
ios-deploy version: Not installed
ios-sim version: Not installed
OS: Linux 4.4
Node Version: v6.9.2
Xcode version: Not installed

Other information: (e.g. stacktraces, related issues, suggestions how to fix, stackoverflow links, forum links, etc)

Running command: /home/devbox/code/app/platforms/browser/cordova/build 


Cleaning Browser project

Running command: /home/devbox/code/app/platforms/browser/cordova/run --nobuild


Static file server running @ http://localhost:8000/index.html
CTRL + C to shut down

Error executing "google-chrome --user-data-dir=/tmp/temp_chrome_user_data_dir_for_cordova http://localhost:8000/index.html": /bin/sh: 1: google-chrome: not found

The command is chromium-browser and not google-chrome. There is no chrome to run. This works flawlessly in Ionic 1 and everywhere else that requires a chrome browser.

@b264
Copy link
Author

b264 commented Apr 27, 2017

This is supported by the underlying libraries but it appears ionic is not calling it.

https://git1-us-west.apache.org/repos/asf?p=cordova-lib.git;a=blob;f=cordova-serve/src/browser.js;h=274d20e666b66e2bcccd1993250bae33dfe6a28e;hb=HEAD#l110

@b264
Copy link
Author

b264 commented Apr 27, 2017

This workaround seems to work

devbox@ubuntu-server-xenial:/usr/bin$ cat google-chrome
#!/bin/bash
chromium-browser "$@"
devbox@ubuntu-server-xenial:/usr/bin$ sudo chmod +x google-chrome
devbox@ubuntu-server-xenial:/usr/bin$ cd ~/code/app && ionic run browser

@imhoffd imhoffd added the v2 label Apr 27, 2017
@imhoffd
Copy link
Contributor

imhoffd commented Jul 28, 2017

This issue has been automatically closed because it had the v2 label. Please install the new CLI v3 (npm install -g ionic@latest). See CHANGELOG.md#Upgrading from CLI v2 for details.

If this issue is still a problem in CLI v3, please create a new issue. Thank you!

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