wallaby icon indicating copy to clipboard operation
wallaby copied to clipboard

Confirm Wallaby works on Windows computers

Open mhanberg opened this issue 3 years ago • 5 comments

Related to #593

Problem

It seems that the usage of a bash script might cause Wallaby to not work on Windows machines.

(Potential) Solution

  • [ ] Include a Windows build in CI for at least 1 item in the build matrix (probably the most recent versions of elixir and erlang
  • [ ] Include a batch .bat file for usage on Windows computers

mhanberg avatar Mar 12 '21 20:03 mhanberg

Looks like this was brought up a few years ago, with a different .sh file: https://github.com/elixir-wallaby/wallaby/issues/102

CallumVass avatar Mar 12 '21 20:03 CallumVass

Hello friends, any news on this issue? I can confirm that wallaby works on WSL but I don't wanna use it. I prefer to use good ol cmd line.... Thank you!

spapas avatar Feb 02 '22 12:02 spapas

Sorry, I resorted to using it via WSL which resolved the issue for me.

CallumVass avatar Feb 26 '22 17:02 CallumVass

Hi, Can you comment on this?

Checkout this post: [https://elixirforum.com/t/port-open-eacces-on-windows/5442/5]

The actual code throws an error here:

  @spec open_chromedriver_port(String.t(), port_number) :: port
  defp open_chromedriver_port(chromedriver_path, port_number) when is_binary(chromedriver_path) do
    Port.open(
      {:spawn_executable, to_charlist(wrapper_script())},
      port_opts(chromedriver_path, port_number)
    )
  end

So this is the error: Port.open({:spawn_executable, 'c:/Users/Asus/Documents/myproject/_build/dev/lib/wallaby/priv/run_command.sh'},[:binary, :stream, :use_stdio, :stderr_to_stdout, :exit_status, {:args, ["chromedriver", "--log-level=OFF", "--port=27349"]}]) ** (ErlangError) Erlang error: :eacces

According to the forum post above I tried: Port.open({:spawn_executable, 'c:/windows/system32/cmd.exe'},[:binary, :stream, :hide, :use_stdio, :stderr_to_stdout, :exit_status, {:args, ["/c", "chromedriver", "--log-level=OFF", "--port=27349"]}])

It doesn't throw the eacces error anymore. Can this be a solution? It would be great to solve this on windows. I assume that both Erlang and Elixir had big troubles to make it work on windows also and this issue can be overcome. Thank you

nuno84 avatar Sep 01 '22 14:09 nuno84

Sorry, I resorted to using it via WSL which resolved the issue for me.

Hi @CallumVass . I installed WSL (Debian) but can you guide me on how to use WSL to run Wallaby? Using windows on Web Development is always a major challenge ;) Thank you very much

nuno84 avatar Sep 02 '22 11:09 nuno84