elixirelixir-mixelixir-poison

ssl.cipher_suites/0 is undefined or private, use cipher_suites/2,3 instead (ssl 10.4.1) :ssl.cipher_suites()


** (UndefinedFunctionError) function :ssl.cipher_suites/0 is undefined or private, use cipher_suites/2,3 instead
    (ssl 10.4.1) :ssl.cipher_suites()
    (hackney 1.15.2) /Users/naveen/NAV/moviematch/deps/hackney/src/hackney_ssl.erl:77: :hackney_ssl.ciphers/0
    (hackney 1.15.2) /Users/naveen/NAV/moviematch/deps/hackney/src/hackney_ssl.erl:69: :hackney_ssl.connect/4
    (hackney 1.15.2) /Users/naveen/NAV/moviematch/deps/hackney/src/hackney_connect.erl:277: :hackney_connect.do_connect/5
    (hackney 1.15.2) /Users/naveen/NAV/moviematch/deps/hackney/src/hackney_connect.erl:47: :hackney_connect.connect/5
    (hackney 1.15.2) /Users/naveen/NAV/moviematch/deps/hackney/src/hackney.erl:333: :hackney.request/5
    (httpoison 1.8.0) lib/httpoison/base.ex:846: HTTPoison.Base.request/6

project dependency specified here: https://github.com/navyad/moviematch/blob/master/mix.exs#L22

Current Elixir version: 1.12 and Erlang/OTP 24 I have upgraded the httpoison from 1.4 to 1.8

Steps

  • mix deps.get
  • mix compile
  • iex -S mix
  • MovieMatch.Imdb.fetch_imdb_watchlist("ur26610840")

Solution

  • I don't know why you are checking out Hackney from GitHub rather than Hex, but I was able to fix your problem by upgrading your dependencies with mix deps update --all:

    $ mix deps.update --all
    Resolving Hex dependencies...
    Dependency resolution completed:
    Unchanged:
      floki 0.20.4
      html_entities 0.4.0
      metrics 1.0.1
      mimerl 1.2.0
      poison 3.1.0
    Upgraded:
      certifi 2.5.1 => 2.6.1
      httpoison 1.5.0 => 1.8.0
      idna 6.0.0 => 6.1.1
      mochiweb 2.18.0 => 2.20.1
      parse_trans 3.3.0 => 3.3.1
      ssl_verify_fun 1.1.5 => 1.1.6
      unicode_util_compat 0.4.1 => 0.7.0 (minor)
    New:
    * Updating httpoison (Hex package)
    * Updating hackney (Hex package)
    * Updating certifi (Hex package)
    * Updating idna (Hex package)
    * Updating parse_trans (Hex package)
    * Updating ssl_verify_fun (Hex package)
    * Updating unicode_util_compat (Hex package)
    * Updating mochiweb (Hex package)
    

    Test:

    Generated moviematch app
    Interactive Elixir (1.12.1) - press Ctrl+C to exit (type h() ENTER for help)
    iex(1)> MovieMatch.Imdb.fetch_imdb_watchlist("ur26610840")
    
    18:39:25.419 [info]  parsing html...
    
    18:39:25.457 [info]  building json...
    %{id: "tt11296058", title: "Kunstneren og tyven"}
    %{id: "tt11655202", title: "Retfærdighedens ryttere"}
    %{id: "tt8185182", title: "Diqiu zuihou de yewan"}
    %{id: "tt8637428", title: "The Farewell"}
    %{id: "tt8649190", title: "Here Before"}
    %{id: "tt9601220", title: "Black Bear"}
    %{id: "tt9639470", title: "Last Night in Soho"}
    
    18:39:25.459 [info]  no. of imdb movies: 7
    %{
      "tt11296058" => "Kunstneren og tyven",
      "tt11655202" => "Retfærdighedens ryttere",
      "tt8185182" => "Diqiu zuihou de yewan",
      "tt8637428" => "The Farewell",
      "tt8649190" => "Here Before",
      "tt9601220" => "Black Bear",
      "tt9639470" => "Last Night in Soho"
    }
    

    Running on OTP 24.0.2 and Elixir 1.12.1.