g4rick

g4rick

Mix deps.get error - (FunctionClauseError) no function clause matching in String.to_charlist/1

➜  magic git:(master) mix deps.get

19:29:12.008 [error] Task #PID<0.189.0> started from :hex_fetcher terminating
** (FunctionClauseError) no function clause matching in String.to_charlist/1
    (elixir) lib/string.ex:2029: String.to_charlist(nil)
    (hex) lib/hex/http/ssl.ex:56: Hex.HTTP.SSL.ssl_opts/1
    (hex) lib/hex/http.ex:34: Hex.HTTP.build_http_opts/2
    (hex) lib/hex/http.ex:9: Hex.HTTP.request/5
    (hex) lib/hex/registry/server.ex:320: anonymous fn/3 in Hex.Registry.Server.prefetch_online/2
    (elixir) lib/task/supervised.ex:88: Task.Supervised.do_apply/2
    (elixir) lib/task/supervised.ex:38: Task.Supervised.reply/5
    (stdlib) proc_lib.erl:247: :proc_lib.init_p_do_apply/3
Function: #Function<16.115348921/0 in Hex.Registry.Server.prefetch_online/2>
    Args: []
** (exit) exited in: GenServer.call(Hex.Registry.Server, {:versions, "hexpm", "poolboy"}, 60000)
    ** (EXIT) time out
    (elixir) lib/gen_server.ex:834: GenServer.call/3
    (hex) lib/hex/registry/server.ex:56: Hex.Registry.Server.versions/2
    (hex) lib/hex/remote_converger.ex:419: Hex.RemoteConverger.verify_dep/3
    (elixir) lib/enum.ex:743: anonymous fn/3 in Enum.each/2
    (stdlib) lists.erl:1263: :lists.foldl/3
    (elixir) lib/enum.ex:1915: Enum.each/2
    (hex) lib/hex/remote_converger.ex:40: Hex.RemoteConverger.converge/2
    (mix) lib/mix/dep/converger.ex:95: Mix.Dep.Converger.all/4

Elixir version is

Erlang/OTP 20 [erts-9.3] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:10] [hipe] [kernel-poll:false] [dtrace]

Elixir 1.6.4 (compiled with OTP 20)

Hex version is

Hex v0.18.1

And this is what I have down in iTerm2 use history

10181  gst
10182  docker build -t registry-hlj.helijia.com/gitlab_lego_elixir --build-arg mix_env=dev --build-arg branch=to-sky! .
10183  gst
10184  gd
10185  gst
10186  gco .
10187  gst
10188  docker build -t registry-hlj.helijia.com/gitlab_lego_elixir --build-arg mix_env=dev --build-arg branch=to-sky! .
10189  tig
10190  registry-hlj.helijia.com/gitlab_lego_elixir
10191  ssh registry-hlj.helijia.com
10192  docker build -t registry-hlj.helijia.com/gitlab_lego_elixir --build-arg mix_env=dev --build-arg branch=to-sky! .
10193  mix hex.organization key acme
10194  mix hex.organization key helijia
10195  mix hex.organization list
10196  mix hex.organization key helijia list
10197  mix hex.organization key helijia generate
10198  docker build -t registry-hlj.helijia.com/gitlab_lego_elixir --build-arg mix_env=dev --build-arg branch=to-sky! .
10199  mix deps.get

I don’t know what going on… and have no idea how and why it happen?
Someone know it?
Thanks.

Marked As Solved

g4rick

g4rick

After I compare two mix.exs file from difference project finally find out
{:sso_login, ">= 0.0.0", organization: "helijia"} the organization deps is the key.
When I remove it, no error!!
So the reason are in those commands in the iTerm2 history

mix hex.organization key acme
mix hex.organization key helijia
mix hex.organization list
mix hex.organization key helijia list
mix hex.organization key helijia generate

And after I deauth mix hex.user deauth and mix hex.user auth it works!!!
Still don’t know why this cause error but fix it…
Thanks guys!

Also Liked

wojtekmach

wojtekmach

Hex Core Team

just a wild guess, is this output from inside docker container or your local computer? Because your docker file says FROM registry-hlj.helijia.com/hlj-elixir:1.6.4, but above is 1.6.5

Where Next?

Popular in Questions Top

sergio
In Ruby, I can go: User.find_by(email: "foobar@email.com").update(email: "hello@email.com") How can I do something similar in Elixir? ...
New
hariharasudhan94
lets say i have a sample like a = 20; b = 10; if (a &gt; b) do {:ok, "a"} end if (a &lt; b) do {:ok, b} end if (a == b) do {:ok, "equa...
New
New
Emily
I have VueJS GUIs with the project generated using Webpack. I have Elixir modules that will need to be used by the VueJS GUIs. I forese...
New
electic
Hi, I am new to Elixir. I am trying to use the DateTime component to insert a date into MySQL however the there seems to be no way to fo...
New
Patoshizzle
After calling mix ecto.create I get this error: 17:00:32.162 [error] GenServer #PID&lt;0.412.0&gt; terminating ** (Postgrex.Error) FATAL...
New
stefanchrobot
What’s the safe way to decode a JSON string into a struct? I want to avoid calling String.to_atom. Jason.decode can give me a map with st...
New
SoCreat
i’m a new one to elixir which editor can i use vs code? or atom? Thanks! :smiley:
New
sergio_101
I am VERY much an elixir newbie. I have taken one elixir course and one phoenix course on Udemy. During that course, I saw the instructor...
New
bsollish-terakeet
Credo is smart enough to check for (something like) this: assert length(the_list) == 0 with this response: Checking if an enum is empt...
New

Other popular topics Top

malloryerik
Hi, this is for people who, like me, have had some friction using .html.heex templates in VSCode. The solution seems to be, in a hyphena...
New
TunkShif
This post is an instruction guide to help you setup your Neovim for Elixir development from scratch. It includes general information on h...
274 42158 114
New
9mm
I am constructing a JSON object (map) and I need to conditionally set a field. I’m trying to write proper elixir-way code… and I’m at a l...
New
AstonJ
Posting this to see if we can make things easier for people to get into Neovim. If you use Neovim and have a favourite distro please let ...
New
baxterw3b
Hi guys, i’m new in the Elixir world, and i have to say, that i love it! i’m having some problem to understand anonymous functions with ...
New
skosch
To my knowledge, put_in, Map.update etc. all have the one limitation of not automatically creating intermediate keys when needed (for exa...
New
jay1
Why is it that the mnesia database isn’t the most preferred database for use in Elixir/Phoenix?
New
alice
Hey, Just curious what are the main benefits of Elixir compared to Clojure? When is Elixir more useful than Clojure and vice versa? Th...
New
SoCreat
i’m a new one to elixir which editor can i use vs code? or atom? Thanks! :smiley:
New
ashish173
I am using Ecto timestamps with postgres, I can see the timestamps() use the :naive_dateime but for my use case I wanted to store the ti...
New

We're in Beta

About us Mission Statement