I am developing an application based on Elixir and Phoenix which also uses the Wallaby application for HTTP based testing in a headless Chrome browser.
Now recently I receive a rather unwieldy error message when executing my ExUnit tests:
** (MatchError) no match of right hand side value:
{:error, {:wallaby, {:bad_return,
{{Wallaby, :start, [:normal, []]},
{:EXIT,
{%Protocol.UndefinedError{description: "", protocol: Enumerable, value: nil},
[{Enumerable, :impl_for!, 1, [file: '/root/deb/elixir_1.8.0-1/lib/elixir/lib/enum.ex', line: 1]},
{Enumerable, :slice, 1, [file: '/root/deb/elixir_1.8.0-1/lib/elixir/lib/enum.ex', line: 193]},
{Enum, :backwards_compatible_slice, 1, [file: 'lib/enum.ex', line: 2871]},
{Enum, :slice_any, 3, [file: 'lib/enum.ex', line: 3075]},
{Enum, :at, 3, [file: 'lib/enum.ex', line: 381]},
{Wallaby.Experimental.Chrome, :validate, 0, [file: 'lib/wallaby/experimental/chrome.ex', line: 36]},
{Wallaby, :start, 2, [file: 'lib/wallaby.ex', line: 27]},
{:application_master, :start_it_old, 4, [file: 'application_master.erl', line: 277]}]}}}}}}
test/test_helper.exs:4: (file)
(elixir) lib/code.ex:767: Code.require_file/2
(elixir) lib/enum.ex:769: Enum."-each/2-lists^foreach/1-0-"/2
(elixir) lib/enum.ex:769: Enum.each/2
I am running a Debian GNU/Linux 9 "Stretch" and installed Elixir as a .deb
package with version 1.8.0-1 from binaries.erlang-solutions.com
. Wallaby is locked to {:wallaby, "~> 0.21.0"}
.
Ideas on how to fix this would be greatly appreciated.
The problem is caused by Wallaby 0.21.0 not being able to handle a ChromeDriver version higher than 2.x, but ChromeDriver versions as high as 71.x are already around.
This has been fixed by this pull request, which has been merged into Wallaby master
but doesn't seem to be released yet.