Maxximiliann
(Please note: Elixir Experience Level: Beginner)
** (ArgumentError) argument error
(stdlib) :ets.lookup_element(:hackney_config, :mod_metrics, 2)
/home/maxximiliann/arbit/deps/hackney/src/hackney_metrics.erl:27: :hackney_metrics.get_engine/0
/home/maxximiliann/arbit/deps/hackney/src/hackney_connect.erl:78: :hackney_connect.create_connection/5
/home/maxximiliann/arbit/deps/hackney/src/hackney_connect.erl:47: :hackney_connect.connect/5
/home/maxximiliann/arbit/deps/hackney/src/hackney.erl:333: :hackney.request/5
lib/httpoison/base.ex:793: HTTPoison.Base.request/6
lib/pump.ex:11: Pump.get_trading_activity/0
How do I resolve this error?
Thanks for all your help ![]()
Trending in Questions
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
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
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
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
Documentation
While reading the Scoped Routes section, I noticed that the documentation currently refers to a problem without explainin...
New
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
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
I am happy to introduce the very α version of the new programming language compiled to BEAM.
Welcome Cure.
It has literally three kille...
New
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
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Xamal is a deployment tool for Elixir apps that deploys native releases to bare metal servers over SSH. It’s a port of GitHub - basecamp/...
New
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
With AI doing more of the implementation work, I’ve been wondering how much coding I should deliberately keep doing myself.
My main conc...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #library
- #deployment
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixirconf-us
- #ai
- #blog-post
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #hex
- #security
- #metaprogramming











Showing Posts 1 to 10- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
darnahsan
There should be error indicating issue ets encoutered. I have had my fair share of issues with ets and the community is great with noobs to help them out. you can check out my issue to know what stracktrace I am referring to and also might help you in debugging
NobbZ
As far as I remember
etswill give an argument error when the table does not exist.This again could happen if the owning application isn’t started yet.
Could you perhaps show us your code? At least the function around line 11 in
pump.ex, as that’s the initial caller in the stack trace.Also, how do you run your program to get this error?
dom
Erlang/Elixir libraries are packaged as applications, with start and stop functions responsible for initializing or tearing down everything the app needs to run: supervision tree, registered processes, ETS tables, etc.
In this case the missing resource is an ETS table which Hackney creates when it starts:
https://github.com/benoitc/hackney/blob/1.15.2/src/hackney_app.erl#L21
https://github.com/benoitc/hackney/blob/1.15.2/src/hackney_sup.erl#L40
Most likely you can fix it by ensuring Hackney is started. In
mix.exs, how did you specify the dependency? Make sure it doesn’t have a flag likeruntime: falseoronly: :test.If you’re on an old Elixir, you may also have to add it under
applications, which controls what applications (dependencies) get started before your app. More modern Elixir usesextra_applicationsinstead and generally figure out dependencies automatically.If you didn’t specify Hackney as a dependency at all - then perhaps it got brought in indirectly by HTTPoison. Then you need to make sure that HTTPoison is being started instead, which should automatically start Hackney.
There’s some more discussion on that in the tutorial: https://elixir-lang.org/getting-started/mix-otp/supervisor-and-application.html#the-application-callback
Maxximiliann
Here’s the code:
Here’s how the error came up:
Maxximiliann
From
mix.exs:Is this correct?
dom
It looks fine. Try
iex -S mix(oriex -S mix run) rather thaniex -S mix compile.mix runloads and runs your application and its dependencies, whereasmix compileonly compiles the application without starting it. You’ll see the difference if you callApplication.started_applications()in your iex shell after starting it.Maxximiliann
Perfect! That did it. Thanks so much!!

maz
I encountered the same error when running integration changes on prod when initializing the meilisearch-elixir module. What was really odd was I wasn’t encountering this error stack on a separate project using the same module. So I’m assuming it was a race condition here:
The solution was quite similar, I had to ensure that
:httpoisonand:poisonwere started before launching:axelson
That shouldn’t be necessary since Elixir can infer the required start order by default. Are you setting
:applicationsin mix.exs? Or are you settingruntime: falseon those deps?maz
Not setting
:applicationsin mix.exs nor settingruntime: falseon those deps. Should I be setting:applications?this is my config in mix.exs:
EDIT: