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

openscript
Hello! Sorry for this astonishing simple question, but I’m really stuck. I try to set up the intellij-elixir plugin, but I don’t know ho...
New
joaquinalcerro
Hi there, I am working with Ecto-Postgresql and I need to call all of the records from a specific table but the table has 40,000 record...
New
Werner
Hi, I’m using Ubuntu 18.04 and after updating to OTP-24.0 yesterday i have this warning when I run “mix local.hex”: 14:57:30.512 [warn] ...
New
SoCreat
i’m a new one to elixir which editor can i use vs code? or atom? Thanks! :smiley:
New
mcarvalho
What is the difference between System.get_env and Application.get_env? For example, what are best practices to use one versus another.
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
kostonstyle
Hi all I want to have a unix time, from the current time plus 1 hour. DateTime.now + 1 hour How to get it in elixir? Thanks
New
beno
I will often find my self writing things similar to: case some_value do nil -&gt; something() "" -&gt; something() _ -&gt; someth...
New
belgoros
I’m not a pro in using Regex and can’t figure out why the following behaviour happens, especially if we take into account the difference ...
New
sabri
Can someone explain the settings of pool_size of Ecto in config file? and what is the recommend size? Thanks
New

Other popular topics Top

peerreynders
Manning 2016 Halloween weekend sale via Deal of the Day Friday, October 28 - Half off all MEAPs - code WM102816LT Saturday, October 29 ...
326 29600 154
New
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
albydarned
Hello all! I am typing this post from my new MacBook Pro with the M1 chip. I’m loving it so far, and will probably use it as my daily dr...
New
axelson
This post is a wiki (feel free to hit the edit button near the bottom right of this post to add your own changes!) This post collects co...
239 45766 226
New
quazar
How to set Jason to encode all fields in ecto schema, I don’t care about security and implementing only is taking long list of attributes...
New
mgjohns61585
Could someone help me? I'm making my first elixir program, number guessing game. I can't figure out how to convert the user's guess from ...
New
msaraiva
Surface is an experimental library built on top of Phoenix LiveView and its new LiveComponent API that aims to provide a more declarative...
564 42633 214
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...
273 38985 115
New
vrod
I am using the Starship cross-shell prompt – it seems pretty nice, but I get some errors: [WARN] - (starship::utils): Executing command ...
New
lanycrost
Hi everyone! I need implement if…else if…else condition from my elixir code, and anymore of this control flow structures not work proper...
New

We're in Beta

About us Mission Statement