Erlang v. 23.0 and HTTPoison error

Dear all,

After upgrading Erlang to version 23.0, a previously working project stopped working and I am getting the following error when the HTTPoison is called:

** (MatchError) no match of right hand side value: {:error, %HTTPoison.Error{id: nil, reason: {:options, {:sslv3, {:versions, [:“tlsv1.2”, :“tlsv1.1”, :tlsv1, :sslv3]}}}}}

Does anyone else get a similar behaviour? Any hints for a solution?

Thanks in advance for your help!

2 Likes

First guess: tlsv1.3 was added and sslv3 was removed in OTP 23 according to the release notes.

3 Likes

Downgrade to OTP 22.x or get Hackney from master. See https://github.com/benoitc/hackney/pull/619

4 Likes

Thank you for the hint!

I would like to elaborate a bit more here to assist others facing a similar problem.

I have changed mix.exs by adding in deps:
{:hackney, github: “benoitc/hackney”, override: true}

Moreover, I have modified the usage of HTTPoison to set the options, e.g.:

options = [ssl: [{:versions, [:“tlsv1.2”]}]]

{:ok, %HTTPoison.Response{body: body, headers: _headers}} =
HTTPoison.get(, [], options)

(UPDATE)
It seems that the change in the mix.exs file is not necessary.

2 Likes

I am calling a bunch of external APIs at different places in my phoenix app. Will I have to do this change everywhere or is there a possibility of new httpoison release in the near future ?

I do not know anything about future versions of HTTPoison. If you can tolerate waiting, then it might work.