Qqwy
TypeCheck Core Team
I am working on setting up integration testing of our Phoenix-application using Hound. I encountered a very strange error, which is that when using PhantomJS as Hound browser driver, Cowboy will reject all incoming connection with an ‘error 400’.
Searching the internet I found out that other people had a similar problem with Cowboy as well: PhantomJS does not by default seem to add a Host:-header to the requests it does, which is against the HTTP spec and rejected by Cowboy (as well as happily accepted by most other webservers).
Switching to Selenium+Firefox instead of PhantomJS and everything works fine.
So just a heads-up that this issue exists. I’m not sure how this could/should be resolved; what would be the best approach?
- Ask the developers of PhantomJS to alter its default settings so it follows the spec.
- Update Hound so it requests PhantomJS to set a
Host:-header when connecting. - Update Hound so it has the possibility to add custom HTTP headers from your own code.
- Ask the people behind Cowboy to create a way to accept requests with missing
Host:-headers.
Trending in Questions
Hello!
Suppose you are building workflow (order / task / payment) processing system with the following requirements:
Each workflow con...
New
I’m in search of an Elixir library that offers PDF generation capabilities similar to Ruby’s Prawn. While there have been discussions abo...
New
I’m looking to build a personal workflow to quickly deploy web applications written in elixir/phoenix, for local consumption (ie not on t...
New
Before I dive in myself, did anyone successfully sprinkle Hologram into their existing LiveView app?
Looking for hints regarding:
Addi...
New
Hi all, I wanted to ask how the community is dealing with post-release steps.
Today we have Ecto migrations, which make sure that the db...
New
Kia ora,
We have been using elixir-google-api to connect to Google Drive. However, with the updates to Tesla due to CVEs this is now bro...
New
I am using Oban and occasionally, shortly after a deployment, a handful of jobs can fail because of dependency on other parts of the syst...
New
Other Trending Topics
Lightning Talk: Jacob Swanner - Put your Scaller (Named Correctly) | ElixirConf US 2025
https://www.youtube.com/watch?v=dqqZSSxs-MA
Co...
New
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge & Solve.
They are GUI (Emerge) and State management (S...
New
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
Emily is an Elixir library that runs Nx computations on Apple’s MLX. Install it as the default Nx backend and Nx, defn, Axon, Nx.Serving,...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #blog-post
- #phoenix_html
- #iex
- #graphql
- #genstage
- #ai
- #elixirconf-us
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #metaprogramming
- #security
- #hex










First 3 of 3 Posts
idi527
I think it might be easier to switch to chrome. I’m not sure if there’s anyone left to develop phantomjs further at this point: Redirecting to Google Groups.
I mostly use GitHub - puppeteer/puppeteer: JavaScript API for Chrome and Firefox · GitHub for “end-to-end” tests.
Qqwy
At first I switched to Selenium + Firefox, but lo and behold,
Houndcrashes whenever you try to run afind_elementbecause it cannot understand the current format that is returned by the webdriven Firefox.The Selenium+Chrome driver still works fine, though.
@idi527 Do you use puppeteer instead of Hound, or somehow from within Hound? I’d like to keep all my tests in Elixir-land, because the existing tests are, and because most of the stuff is server-side related anyway.
idi527
Yes, I got frustrated with
HoundandWallabyat the time, and just wrote these tests in js, which was surprisingly easy.