1

I was trying the Ueberauth library for GitHub login. In the login function, I'm getting an error saying that

"function :unicode_util.lowercase/1 is undefined (module :unicode_util is not available)"

The code that I've used

defmodule Discuss.AuthController do
  use Discuss.Web, :controller
  plug Ueberauth

  def callback(conn, params) do
    IO.inspect "++++++++++"
    IO.inspect(conn.assigns)
    IO.inspect "++++++++++"
    IO.inspect(conn.params)
    IO.inspect "++++++++++"
  end
end

enter image description here

Gijo Varghese
  • 11,264
  • 22
  • 73
  • 122
  • Can you post the whole error message including the stacktrace? `unicode_util` was added in Erlang/OTP 20 which is still in RC. – Dogbert Jun 19 '17 at 08:05
  • @Dogbert ok. I've updated it – Gijo Varghese Jun 19 '17 at 08:13
  • Ok, this is caused by the `idna` package accidentally removing compatibility with Erlang < 20. It was fixed in v5.0.2: https://github.com/benoitc/erlang-idna/commit/8dbe87ebc924614eb7fc085a15c34b71b02d9a35. Can you try updating your dependencies to their latest versions? Especially `ueberauth`, and `oauth2` / `hackney` if you have either of these. – Dogbert Jun 19 '17 at 08:23
  • @Dogbert I tried updating using 'mix deps.update --all'. Still getting the same error. Is it the right way to update? – Gijo Varghese Jun 19 '17 at 09:06
  • You could try updating the version numbers of your direct dependencies in `mix.exs` first, before running `deps.update --all`. Can you post your `mix.exs` if that doesn't work? – Dogbert Jun 19 '17 at 15:23
  • @Dogbert here is the mix.exs: http://imgur.com/a/vwSAy – Gijo Varghese Jun 20 '17 at 02:45
  • Can you try upgrading ueberauth to 0.4? I see you're using `~> 0.3` but the latest release is `0.4.0`. Not sure if you'll have to adjust your code for any changes in 0.4.0. – Dogbert Jun 20 '17 at 03:09
  • Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/147121/discussion-between-gijo-varghese-and-dogbert). – Gijo Varghese Jun 20 '17 at 03:54

0 Answers0