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

Chrome executable not found even when $CHROME_EXECUTABLE defined and google-chrome is in path #117

Open
binbard opened this issue Jan 18, 2023 · 3 comments

Comments

@binbard
Copy link

binbard commented Jan 18, 2023

Describe the bug

2023/01/18 13:45:07 INFO [main] Hetty (v0.7.0) is running on :8080 ...
2023/01/18 13:45:07 INFO [main] Get started at http://localhost:8080
2023/01/18 13:45:07 INFO [main] Chrome executable not found.

To Reproduce

Steps to reproduce the behavior:

  1. Using WSL Ubuntu 22
  2. Installed hetty with snap
  3. Installed chrome by downloading official .deb package from google, then
  4. sudo apt install ./google-chrome-stable_current_amd64.deb
  5. CHROME_EXECUTABLE=/usr/bin/google-chrome was defined after installing
  6. /usr/bin/google-chrome was added to path after installing

Error:
INFO [main] Chrome executable not found

Expected behavior
Chrome executable should be launched with hetty

Screenshots
WindowsTerminal_ondR2YY2d1

Desktop (please complete the following information):

  • OS: WSL 22 LTS on Windows 11
  • Kernel: 5.15.79.1-microsoft-standard-WSL2 (amd64)
  • Browser: Google Chrome Version 109.0.5414.74
  • Snap Version 2.57.5+22.04ubuntu0.1
  • Hetty Version 0.7.0

Additional context
Even before I tried adding CHROME_EXECUTABLE and adding /usr/bin/google-chrome to path manually, no success

@binbard binbard changed the title Chrome executable not found - even when $CHROME_EXECUTABLE defined and google-chrome is in path Chrome executable not found even when $CHROME_EXECUTABLE defined and google-chrome is in path Jan 18, 2023
@dstotijn
Copy link
Owner

At the moment, Hetty relies on the default executable finding logic in the chromedp package (ref).

When using WSL, I suspect that when this code is executed, it's only looking for known executable paths for windows, and /usr/bin/google-chrome is not checked/used.

As a workaround, a possible fix might be to create a symlink chrome somewhere in a directory that's in your $PATH, and point it to /usr/bin/google-chrome.

In a future version of Hetty I might support explicitly setting the chrome executable path, but for now please look into the workaround mentioned above.

@richoffpints
Copy link

im getting the same thing on kali linuc, what should i do?

@dstotijn
Copy link
Owner

im getting the same thing on kali linuc, what should i do?

I suggest creating a symlink from /usr/local/bin/chrome to the executable path of your Chrome installation (the path differs per distro/system, so you best find out yourself).

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

3 participants