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

Blokh
Hey guys, I’ve got a huge CSV ( around 10 GB ) that needs to be processed hourly Do you guys have any suggestions what is the best prac...
New
RSP87
I’m working on a project that simulates the bumbl example in the programming phoenix book. It acts almost like an email client. We have a...
New
kszambelanczyk
Hello! Could someone please give me a help/sample code, how to delete a file from s3 using waffle/waffle_ecto from Phoenix app. I creat...
New
RemyXRenard
I’m seeing that a list inside a Kino.DataTable will be interpreted as a charlist, even if the Kino.configure() is set to charlists: :as_l...
New
velrest
So my question is quite simple and i have found no conclusive answer on forum, google or AI. Should we use :erlang.float for Integer to ...
New
samoloth
Hi, I’ve just set up an application with ash_authentication. There is only magic link strategy for now, so there is no confirmation add o...
New
FlyingNoodle
If a change or preparation module uses Ash.Changeset.get_argument/2 or Ash.Query.get_argument/2 (or any of the other get_argument functio...
New

Other Trending Topics Top

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
marciok
Hi there! We created Gust: A task orchestrator inspired by Airflow. For those who have never heard about Aiflow, it’s a Python-based wor...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Damirados
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge &amp; Solve. They are GUI (Emerge) and State management (S...
New
netoum
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews