I'm new to Elixir/Phoenix and I'm now looking to write tests using Wallaby (or Hound, but it's the same issue).
For your information, I'm using a Docker image.
I'm trying to get Cabbage and Wallaby working, but as soon as I add Wallaby dependency to my project:
...
defp deps do
{:phoenix, "~> 1.3.0"},
...
{:cowboy, "~> 1.0"},
{:wallaby, "~> 0.19.2"}
end
...
then I have the following error when I run mix test
:
escript: exception error: no match of right hand side value undefined
in function rebar_log:log/3 (/home/tristan/Devel/rebar3/_build/default/lib/rebar/src/rebar_log.erl, line 94)
in call from rebar3:handle_error/1 (/home/tristan/Devel/rebar3/_build/default/lib/rebar/src/rebar3.erl, line 325)
in call from escript:run/2 (escript.erl, line 759)
in call from escript:start/1 (escript.erl, line 277)
in call from init:start_em/1
in call from init:do_boot/3
** (Mix) Could not compile dependency :mimerl, "/root/.mix/rebar3 bare compile --paths "/application/_build/test/lib/*/ebin"" command failed. You can recompile this dependency with "mix deps.compile mimerl", update it with "mix deps.update mimerl" or clean it with "mix deps.clean mimerl"
Anyone who knows why do I have this error and how I could fix it?
I finally figured out what was causing this issue: proxy!
I first tried to run this rebar3 process manually:
docker run --rm -it <container-name> /root/.mix/rebar3
And I was already having the error. Playing around in the container, I discovered that removing the proxy was making the process no more through any errors.
So, no matter about Docker, it was all about unsetting the company proxy of my machine in order to get it working through the public network.