g4rick

g4rick

➜  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.

Showing Posts 1 to 10

ericmj

ericmj

Elixir Core Team

Can you show your Dockerfile? It is possible you have to force rebuild your Docker image so that it fetches the latest Hex version, if you add mix hex.info to the Dockerfile you can verify that it uses the latest Hex version 0.18.1.

g4rick

g4rick OP

Yes, thanks for help. I can’t edit my question (first time use this). Here’s my DockerFile.

FROM         registry-hlj.helijia.com/hlj-elixir:1.6.4
MAINTAINER   skylab <skylab@helijia.com>

ARG branch
ARG mix_env

WORKDIR /home
RUN git clone -b $branch ssh://git@git.hlj.team:10/web/magic.git

WORKDIR /home/magic
RUN git rev-parse HEAD
RUN HEX_MIRROR=https://hexpm.upyun.com mix do local.hex --force, local.rebar --force
RUN mix hex.config mirror_url https://hexpm.upyun.com
RUN mix hex.organization auth helijia --key xxxxxxxxxxxxxxxxxxxxx
RUN mix deps.get && yarn install && yarn dist
RUN MIX_ENV=${mix_env} mix phx.digest
RUN MIX_ENV=${mix_env} mix release —env=${mix_env}
RUN mv _build/${mix_env}/rel/magic/ /app
# RUN rm -rf /home/magic/

WORKDIR /app
ENTRYPOINT /app/bin/magic start && tail -F /app/var/log/run_erl.log
ericmj

ericmj

Elixir Core Team

Please verify that you are using the latest hex version with mix hex.info. I see that you are using a mirror when installing hex, maybe it is slow to refresh?

g4rick

g4rick OP

Yes, I’m sure I use the latest version. Before this error I just update hex with mix hex.local.
Then the version is

Hex:    0.18.1
Elixir: 1.6.5
OTP:    20.3.6
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

g4rick

g4rick OP

There is something may help.
I got this error in the branch with Dockerfile, Then check out to master branch deps.get still got error.
But when I change to another phoenix project, deps.get works.

I back home, use another computer (also use latest hex) , no error. This computed has no access to registry-hlj.helijia.com so I can’t try build docker.

And I try rm -rf the project then clone it again. Not work.

g4rick

g4rick OP

From my local computer, since the error is on local computer.

g4rick

g4rick OP

:pray:
The trace.txt file after elixir -e ":inets_trace.enable(:max, 'trace.txt', :httpc)" -S mix deps.get

ericmj

ericmj

Elixir Core Team

It is possible that you use a version manager such as asdf? If that’s the case it could switch between Elixir versions and you would get another installed Hex version. This might be the case because the output you have shown shows different Elixir versions (1.6.4 and 1.6.5). Run mix local.hex again in the project where you see the crash to ensure you have the latest Hex version installed for the Elixir version your project uses.

g4rick

g4rick OP

Very sorry for misleading.
I’m not use asdf or other version manager. 1.6.4 elixir is my MBP from company and 1.6.5 is home MBP.
Sorry…
Now I’m sure I use the 0.18.1 version of hex.
Is there some setting (httpc or other) bind up with project not branch or computer? Because as I mentioned before: same computer same environment phoenix project one deps.get work another can’t. And in the error project, I checkout branch to master it still error. I think this will be the only entry point I fix this.

Where Next? Top

Trending in Questions Top

katta
I having some trouble figuring out if I have set myself too strict of standards for my production server. Currently I can handle 75% of r...
New
brecabral
Documentation While reading the Scoped Routes section, I noticed that the documentation currently refers to a problem without explainin...
New
achenet
Hello, I’m trying to build a basic Phoenix web-app, and I’d like to use Tailwind. However, when I launch mix phx.server, I get an error...
New
kpanic
Hi everyone, I am toying with the idea of building a “match maker” for giving personal help to people that wants to start coding. I sta...
New
asweet-confluent
I recently noticed that Elixir’s Logger defaults its primary log level to :debug when no :logger, :level application configuration is pre...
New
Cxx-mlr
I’m working on a small exercise involving update_in/3, and I came up with this solution: data = %{ name: "Periodic Table", category:...
New
ChrisAmelia
I’ve got trouble wrapping my head around the order in which functions are called in this snippet (from Phoenix’s authentication): toke...
New

Other Trending Topics Top

GenericJam
Edit: 2026 May 15 - This post is archived. Mob is alive!! Main docs: mob v0.7.11 — Documentation A bit of explanation for the slightly c...
New
JesseHerrick
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
mudasobwa
I am happy to introduce the very α version of the new programming language compiled to BEAM. Welcome Cure. It has literally three kille...
New
garrison
Hobbes is a low-level distributed database for the Elixir programming language. Hobbes provides a simple, safe, and scalable storage lay...
New
mhanberg
Hi everyone! The first release candidate for the Expert language server project is now available! We’ve published a press release detai...
New
budgie
A little off-topic, but I feel like people here have a good head on their shoulders. I used to be quite good at making software. Was luc...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews