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

fix(chromedriver): Account for Chromium when doing the version matching #698

Merged
merged 2 commits into from
Jul 16, 2022

Conversation

mhanberg
Copy link
Member

@mhanberg mhanberg commented Jul 15, 2022

We weren't accounting for Chromium when checking the versions of Chrome and ChromeDriver were matching.

@michallepicki can you install this branch and see if it fixes the problem? I was able to confirm that it works with Chromium locally on my MacBook, but haven't tested it manually for Chromium on Linux.

Thanks

Fixes #697 (maybe)

We weren't accounting for Chromium when checking the versions of Chrome
and ChromeDriver were matching.
@conceivably
Copy link

As far as I can tell, I had the same problem with Chromium on Linux on the Wallaby main branch, in that I got:

** (MatchError) no match of right hand side value: {:error, {:wallaby, {:bad_return, {{Wallaby, :start, [:normal, []]}, {:EXIT, {%Wallaby.DependencyError{message: "Wallaby can't find Chrome. Make sure you have chrome installed and included in your path.\nYou can also provide a path using `config :wallaby, :chromedriver, binary: <path>`.\n"}, [{Wallaby, :start, 2, [file: 'lib/wallaby.ex', line: 33, error_info: %{module: Exception}]}, {:application_master, :start_it_old, 4, [file: 'application_master.erl', line: 293]}]}}}}}}
    test/test_helper.exs:4: (file)
    (elixir 1.13.1) lib/code.ex:1183: Code.require_file/2
    (elixir 1.13.1) lib/enum.ex:937: Enum."-each/2-lists^foreach/1-0-"/2

With this branch the problem disappears for me 👍
Thank you for the fix :)

@mhanberg
Copy link
Member Author

@conceivably im not sure that it matters but are you running this locally or just CI?

@jfpedroza
Copy link
Contributor

I would like to add that in Alpine Linux the Chromium binary is called chromium-browser instead of chromium. This branch fixes it for me locally, but not for Docker (used both locally and on CI).

@mhanberg
Copy link
Member Author

@johnf9896 would you be able to provide me with the docker file that demonstrates the failure?

@jfpedroza
Copy link
Contributor

jfpedroza commented Jul 16, 2022

I guess I could create a simple project for it but I think the problem can be solved by adding "chromium-browser" to ["google-chrome", "chromium"]. Everything works if I specify the path manually, otherwise I get the same error as @conceivably.

@mhanberg
Copy link
Member Author

@johnf9896 Turns out that I had just missed that name when I was looking through the chromedriver codebase for the list of binary locations that it will look for. chromium-browser was there.

I pushed up another commit that adds that name.

@jfpedroza
Copy link
Contributor

That indeed solves it :)

@mhanberg
Copy link
Member Author

Thanks for all the help folks.

This seems like it's fixed, but I'll wait for @michallepicki to confirm.

@michallepicki
Copy link
Contributor

this branch starts Chromium for me as well, thanks

@mhanberg mhanberg merged commit 3e5c148 into main Jul 16, 2022
@mhanberg mhanberg deleted the mh/chromium-version-matching branch July 16, 2022 12:31
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

Successfully merging this pull request may close these issues.

Allow to skip chromedriver-chrome version match check
4 participants