TrailingDots

TrailingDots

I am attempting to add coverage to my project, but
keep running into problems.

I’ve run all the suggestions in the error
message at the bottom of this listing with the same
frustrating result.

I have a larger project that I wish to add coverage,
but all the coverage packages bomb the same way.

I started with a clean project, “bug”,
with only the mix deps()
addition so interference gets minimized.

Any help would be appreciated.

Versions:

rebar3 --version
rebar 3.13.2 on Erlang/OTP 22 Erts 10.4.3

elixir --version
Erlang/OTP 22 [erts-10.4.3] [source] [64-bit] [smp:12:12] [ds:12:12:10] [async-threads:1] [hipe]
Elixir 1.9.4 (compiled with Erlang/OTP 22)

erl --version
Erlang/OTP 22 [erts-10.4.3] [source] [64-bit] [smp:12:12] [ds:12:12:10] [async-threads:1] [hipe]
Eshell V10.4.3  (abort with ^G)

The mix.exs in deps:

defp deps do
[
#{:coverex, “~> 1.5”, only: [:test], runtime: false},
{:excoveralls, “~> 0.13.0”, only: [:test], runtime: false},
{:idna, “~> 6.0.1”},
]
end

I’ve used different verions of coverex and excoveralls but the
resultsl are the same.

I notice:

"Bad dependency version for httpoison (and others...)"

but I don’t understand what to do about this either.

Here is the listing:

=> mix clean
=> mix deps.get
Resolving Hex dependencies...
Dependency resolution completed:
Unchanged:
  certifi 2.5.2
  excoveralls 0.13.0
  hackney 1.16.0
  idna 6.0.1
  jason 1.2.1
  metrics 1.0.1
  mimerl 1.2.0
  parse_trans 3.3.0
  ssl_verify_fun 1.1.6
  unicode_util_compat 0.5.0
All dependencies are up to date
Command completed;mix deps.get
=> mix test
===> Package idna-6.0.1 not found. Fetching registry updates and trying again...
===> Updating package registry...
===> Writing registry to /home/cecilm/.cache/rebar3/hex/default/registry
===> Generating package index...
===> [appsignal:1.6.2], Bad dependency version for httpoison: ~> 0.11 or ~> 1.0.
===> [appsignal:1.6.6-beta.1], Bad dependency version for httpoison: ~> 0.11 or ~> 1.0.
===> [appsignal:1.6.0], Bad dependency version for httpoison: ~> 0.11 or ~> 1.0.
===> [appsignal:1.7.0-alpha.4], Bad dependency version for httpoison: ~> 0.11 or ~> 1.0.
===> [appsignal:1.6.0-beta.1], Bad dependency version for httpoison: ~> 0.11 or ~> 1.0.
===> [appsignal:1.6.3], Bad dependency version for httpoison: ~> 0.11 or ~> 1.0.
===> [appsignal:1.7.0-alpha.3], Bad dependency version for httpoison: ~> 0.11 or ~> 1.0.
===> [batch_loader:0.1.0-beta.4], Bad dependency version for absinthe: ~> 1.4.0 or ~> 1.5.0-beta.
===> [prometheus_httpd:2.1.10], Bad dependency version for prometheus: ~> 3.5 or ~> 4.2.
===> [batch_loader:0.1.0-beta.5], Bad dependency version for absinthe: ~> 1.4.0 or ~> 1.5.0-beta.
===> [appsignal:1.7.0-alpha.2], Bad dependency version for httpoison: ~> 0.11 or ~> 1.0.
===> [appsignal:1.7.0-alpha.1], Bad dependency version for httpoison: ~> 0.11 or ~> 1.0.
===> [batch_loader:0.1.0-beta.6], Bad dependency version for absinthe: ~> 1.4.0 or ~> 1.5.0-beta.
===> [appsignal:1.12.0], Bad dependency version for decorator: ~> 1.2.3 or ~> 1.3.
===> [appsignal:1.6.1], Bad dependency version for httpoison: ~> 0.11 or ~> 1.0.
===> [appsignal:1.6.5], Bad dependency version for httpoison: ~> 0.11 or ~> 1.0.
===> [appsignal:1.6.6-beta.2], Bad dependency version for httpoison: ~> 0.11 or ~> 1.0.
===> [appsignal:1.6.6], Bad dependency version for httpoison: ~> 0.11 or ~> 1.0.
===> [appsignal:1.6.7], Bad dependency version for httpoison: ~> 0.11 or ~> 1.0.
===> [appsignal:1.6.4], Bad dependency version for httpoison: ~> 0.11 or ~> 1.0.
===> [batch_loader:0.1.0-beta.3], Bad dependency version for absinthe: ~> 1.4.0 or ~> 1.5.0-beta.
===> [appsignal:1.6.0-alpha.1], Bad dependency version for httpoison: ~> 0.11 or ~> 1.0.
===> Writing index to /home/cecilm/.cache/rebar3/hex/default/packages.idx
===> Package not found in registry: {<<"idna">>,<<"6.0.1">>}.
(Mix) Could not compile dependency :hackney, "/home/cecilm/.mix/rebar3 bare
compile --paths="/home/cecilm/play/Elixir/bug/_build/test/lib/*/ebin"" command
failed. You can recompile this dependency with "mix deps.compile hackney",
update it with "mix deps.update hackney" or clean it with "mix deps.clean
hackney"

Showing Posts 1 to 10

axelson

axelson

Scenic Core Team

That seems quite odd. idna 6.0.1 definitely exists. Maybe try clearing the cache.

rm -rf ~/.cache/rebar3
rm -rf ~/.mix
rm -rf deps _build
mix deps.get

If you’re still having the issue then try creating a sample project and check the version of Elixir and Erlang you’re using.

xpg

xpg

I experienced the same a couple of days ago. Tried cleaning things up multiple times, but had to give up.
I’ll see if I can reproduce it and share the sample app.

Nicd

Nicd

Try updating rebar with mix local.rebar.

xpg

xpg

That worked for me. Thanks!

dimitarvp

dimitarvp

It’s a good practice to run this script periodically (once a week, or biweekly):

mix local.rebar --force
mix local.hex --force
NobbZ

NobbZ

No, its not.

hex will tell you if new versions are available as far as I remember, the version of rebar installed and used via mix local.rebar is determined by the version of mix (so elixir) you use. It is constrained by an exact version match, not a (semantic) range.

Therefore the good habbit is to run mix local.hex when hex tells you it can be updated after a mix deps.get, while you should run mix local.rebar after each update of elixir.

dimitarvp

dimitarvp

I adopted the practice after one CI started hanging up on that (the company was utilising CI caching heavily) and then eventually just started doing it on my machine.

It can’t be objectively argued this is a bad practice IMO but it seems you have your opinion.

That one, plus removing the _build and deps directories, comprise a good checklist to go through when you have strange issues.

TrailingDots

TrailingDots OP

YES! This does it.

rm -rf ~/.cache/rebar3 ~/.mix deps _build
mix deps.get

As suggested by dimitarvp below, I’ll do this once a week.
Some kind of tricky bug relating to dependencies…

TrailingDots

TrailingDots OP

This works. I’ll integrate this into my weekly practice.

Thank you very much. :slight_smile: :slight_smile:

TrailingDots

TrailingDots OP

Absolutely agreed. My “trial by fire” gets resolved by your suggestions.

Thank you very much. :slight_smile: :slight_smile:

This could be a tricky bug to reproduce consistently and resolve.

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
nseaSeb
Hello, I know there is an approach for handling lists that allows for optimized traversal, but I can’t recall the specific method (somet...
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
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
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

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