Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trouble running via elixir releases #18

Open
jdppettit opened this issue Feb 6, 2021 · 4 comments
Open

Trouble running via elixir releases #18

jdppettit opened this issue Feb 6, 2021 · 4 comments

Comments

@jdppettit
Copy link

Hello!

I have no idea if this problem is related to this project at all but the error mentions it so I figured I'd start here. I'm running an elixir app via releases and I'm seeing some issues with another library I wrote that uses gen_icmp - error I'm seeing is:

{:error, {:undef, [{:procket, :socket, [:inet, :raw, :icmp], []}, {:gen_icmp, :init, 1, [file: '/app/deps/gen_icmp/src/gen_icmp.erl', line: 233]}, {:gen_server, :init_it, 2, [file: 'gen_server.erl', line: 374]}, {:gen_server, :init_it, 6, [file: 'gen_server.erl', line: 342]}, {:proc_lib, :init_p_do_apply, 3, [file: 'proc_lib.erl', line: 249]}]}}

I wrote a very thin wrapper around this that I'm currently using: https://github.com/silverp1/elixir-ping

Just wondering if anything in the error happens to jump out at you, I'm a bit stumped. Thank you!

@msantos
Copy link
Owner

msantos commented May 30, 2021

@jdppettit first of all, sorry for missing this issue! Seems gmail has decided to filter email from github.

{:error, {:undef, [{:procket, :socket, [:inet, :raw, :icmp], []}

The undef means the procket module was not found. From the elixir-ping git commit history, I see you figured this out and got it working. Sorry again and if you have any questions, let me know!

@jdppettit
Copy link
Author

Hey @msantos no worries! I wasn't actually able to fully resolve this. The original issue was during the building of the app, it looks like with the recent updates to your dependencies all is well on that front.

I am however still running into issues actually utilizing the library, chiefly:

%MatchError{term: {:error, {:undef, [{:procket, :socket, [:inet, :raw, :icmp], []}, {:gen_icmp, :init, 1, [file: '/Users/jpettit/dev/behold-private/deps/gen_icmp/src/gen_icmp.erl', line: 233]}, {:gen_server, :init_it, 2, [file: 'gen_server.erl', line: 417]}, {:gen_server, :init_it, 6, [file: 'gen_server.erl', line: 385]}, {:proc_lib, :init_p_do_apply, 3, [file: 'proc_lib.erl', line: 226]}]}}}

I'm dropping this here because I feel like it might be related somehow but that is entirely conjecture on my part.

This happens when running the built release directly on my development machine (MacOS) as well as when it is built inside a docker container.

I would greatly appreciate it if you had any ideas on how to proceed - thank you!

@msantos
Copy link
Owner

msantos commented Jun 8, 2021

@jdppettit thanks for the update!

Try adding the dependencies to mix.exs:

  defp deps do
    [
      {:gen_icmp, git: "https://github.com/msantos/gen_icmp.git"},
      {:procket, git: "https://github.com/msantos/procket.git", override: true},
      {:pkt, git: "https://github.com/msantos/pkt.git", override: true}
    ]
  end

Why mix release ignores the dependencies is a mystery. I'll try debugging the release process.

@msantos msantos reopened this Jun 8, 2021
@jdppettit
Copy link
Author

Oof - that did it. I could've sworn I had tried that at some point during my debugging but clearly the correct things were not in place to fix it at the time.

Thank you so much - I have been toiling over this for some time now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants