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

Confirm Wallaby works on Windows computers #594

Open
2 tasks
mhanberg opened this issue Mar 12, 2021 · 5 comments
Open
2 tasks

Confirm Wallaby works on Windows computers #594

mhanberg opened this issue Mar 12, 2021 · 5 comments

Comments

@mhanberg
Copy link
Member

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
@CallumVass
Copy link

Looks like this was brought up a few years ago, with a different .sh file: #102

@spapas
Copy link

spapas commented Feb 2, 2022

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!

@CallumVass
Copy link

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

@nuno84
Copy link

nuno84 commented Sep 1, 2022

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
Copy link

nuno84 commented Sep 2, 2022

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

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

4 participants