CaliDog/certstream-server

protocol String.Chars not implemented for ... tuple

Closed this issue · 1 comments

Hi,

I received the following error when trying to start certstream-server:

warning: the VM is running with native name encoding of latin1 which may cause Elixir to malfunction as it expects utf8. Please ensure your locale is set to UTF-8 (which can be verified by running "locale" in your shell)
warning: found quoted keyword "coveralls" but the quotes are not required. Note that keywords are always atoms, even when quoted. Similar to atoms, keywords made exclusively of Unicode letters, numbers, underscore, and @ do not require quotes
  mix.exs:13


10:48:56.382 [info]  Starting web server on port 4000...

10:48:56.393 [info]  Starting Elixir.Certstream.ClientManager...

10:48:56.393 [info]  Starting Elixir.Certstream.CertifcateBuffer...

10:48:56.394 [info]  Initializing CT Watchers...

10:48:56.590 [info]  Application certstream exited: exited in: Certstream.start(:normal, [])
    ** (EXIT) an exception was raised:
        ** (Protocol.UndefinedError) protocol String.Chars not implemented for {:options, {:sslv3, {:versions, [:"tlsv1.2", :"tlsv1.1", :tlsv1, :sslv3]}}} of type Tuple. This protocol is implemented for the following type(s): Decimal, URI, DateTime, Time, Version.Requirement, Date, Float, List, NaiveDateTime, BitString, Integer, Atom, Version
            (elixir 1.10.3) lib/string/chars.ex:3: String.Chars.impl_for!/1
            (elixir 1.10.3) lib/string/chars.ex:22: String.Chars.to_string/1
            (certstream 1.1.2) lib/ct_watcher.ex:56: Certstream.CTWatcher.fetch_all_logs/0
            (certstream 1.1.2) lib/ct_watcher.ex:25: Certstream.CTWatcher.start_and_link_watchers/1
            (certstream 1.1.2) lib/application.ex:19: Certstream.start/2
            (kernel 7.0) application_master.erl:277: :application_master.start_it_old/4

I nailed it down and reverting to an older Erlang version solves the issue. Unfortunatelly I dont speak Erlang and even the error looks cryptic to me.

Hey @realalexandergeorgiev, sorry for the delay here.

The problem was that google deprecated an older SSL suite that apparently Hackney (the Erlang library that backs HTTPoison, the http library we use to make these requests) used. Updating the deps with the most recent release solves this issue, so if you go pull down master or the v1.5 tag (which are currently the same) things should be happy once more!

Cheers