elixir-wallaby / wallaby

Concurrent browser tests for your Elixir web apps.
https://twitter.com/elixir_wallaby
MIT License
1.65k stars 196 forks source link

Chrome is activated but the test times out #748

Open GenericJam opened 12 months ago

GenericJam commented 12 months ago

Elixir and Erlang/OTP versions

Erlang/OTP 26 [erts-14.0.2] [source] [64-bit] [smp:20:20] [ds:20:20:10] [async-threads:1] [jit:ns]

Elixir 1.15.5 (compiled with Erlang/OTP 26)

I tried:

erlang 26.0.2
elixir 1.15.5-otp-26

and

erlang 24.3.4.2
elixir 1.13.1-otp-24

and

erlang 25.0.4
elixir 1.14.0-otp-25

Operating system

M1 Mac as well as 64 bit PopOs (Ubuntu 22.04)

Browser

Chrome

Driver

chromedriver

Correct Configuration

Current behavior

Similar results on Mac and Linux where the browser pops up with only data;, in the browser url and the browser itself is blank. Wallaby open 4 browsers before it times out.

Expected behavior

Run a test, control the browser in the test.

Test Code & HTML

1) feature users can go to home page (WallabyTest.DummyTest)
     test/wallaby_test/dummy.exs:5
     ** (RuntimeError) Wallaby had an internal issue with HTTPoison:
     %HTTPoison.Error{reason: :timeout, id: nil}
     stacktrace:
       (wallaby 0.30.6) lib/wallaby/httpclient.ex:50: Wallaby.HTTPClient.make_request/5
       (wallaby 0.30.6) lib/wallaby/chrome.ex:345: Wallaby.Chrome.start_session/1
       (wallaby 0.30.6) lib/wallaby.ex:85: Wallaby.start_session/1
       (wallaby 0.30.6) lib/wallaby/feature.ex:152: Wallaby.Feature.Utils.start_session/2
       (elixir 1.15.5) lib/enum.ex:4356: Enum.map/2
       test/wallaby_test/dummy.exs:3: WallabyTest.DummyTest.__ex_unit_setup_0/1
       test/wallaby_test/dummy.exs:1: WallabyTest.DummyTest.__ex_unit__/2

Finished in 25.1 seconds (25.1s async, 0.00s sync)
1 feature, 1 failure

Randomized with seed 291369

Demonstration Project

https://github.com/GenericJam/wallaby_test

mhanberg commented 12 months ago

Can you add the Chrome and chromedriver versions?

mhanberg commented 12 months ago

It... works on my machine 😅

https://github.com/elixir-wallaby/wallaby/assets/5523984/872fc5ad-4406-415b-810a-a8f5f161b2da

GenericJam commented 12 months ago

Chrome 116.0.5845 ChromeDriver 116.0.5845.96 (1a391816688002153ef791ffe60d9e899a71a037-refs/branch-heads/5845@{#1382})

GenericJam commented 12 months ago

Is it possible it's the manual linking of the binary?

... answered my own question - yes.

It turns out on Linux flatpak is a bit wonky.

I downloaded a new bin from here and manually linked it and it works... just have to do the same on Mac I imagine.