TDD Phoenix


I hope you don't have to find this chapter. But if you do, it means you're trying to troubleshoot something. So let's dive in.

Wallaby error: Invalid session id

When installing ChromeDriver, make sure your version of Chrome (browser) and ChromeDriver match. A mismatch in versions can lead to a confusing error message:

{"error" ,"invalid session id"}

To fix that, you might have to update your version of ChromeDriver or Chrome so they're both in the same version. If that doesn't solve your problem, there's a related Wallaby issue where you might be able to find more help.

Wallaby had an internal issue with HTTPoison

If your tests are failing when running more than one feature test at a time, you may be running into a long standing issue in Wallaby:

** (RuntimeError) Wallaby had an internal issue with HTTPoison:
%HTTPoison.Error{id: nil, reason: :checkout_timeout}
%HTTPoison.Error{id: nil, reason: :econnrefused}
%HTTPoison.Error{id: nil, reason: :closed}

I believe there's an attempt to use a pool of ChromeDrivers.

In the meantime, when you want to run multiple tests or your full test suite try mix test --trace or mix text --max-cases 1. Both will remove parallelism from your test suite, which isn't ideal, but at least your tests will be consistent.

Other errors?

If you run into other errors, please let me know. I'd be happy to add them to this troubleshooting appendix.