Mix Release and Mailibex/Iconv

I’m getting the following error after I started using mailibex with Elixir releases. It all works fine locally on my mac, even with releases, but it crashes in my docker container with Ubuntu 20.04.

I thought, that I might miss some iconv requirements, so I installed RUN apt-get install -y libc6 libc6-dev but that doesn’t fix the issue.

2021-06-24 13:09:41.167700 supervisor_report   #{label=>{supervisor,start_error},report=>[{supervisor,{local,kernel_sup}},{errorContext,start_error},{reason,{on_load_function_failed,'Elixir.Iconv'}},{offender,[{pid,undefined},{id,kernel_safe_sup},{mfargs,{supervisor,start_link,[{local,kernel_safe_sup},kernel,safe]}},{restart_type,permanent},{shutdown,infinity},{child_type,supervisor}]}]}
2021-06-24 13:09:41.168883 crash_report        #{label=>{proc_lib,crash},report=>[[{initial_call,{supervisor,kernel,['Argument__1']}},{pid,<0.1610.0>},{registered_name,[]},{error_info,{exit,{on_load_function_failed,'Elixir.Iconv'},[{init,run_on_load_handlers,0,[]},{kernel,init,1,[{file,"kernel.erl"},{line,189}]},{supervisor,init,1,[{file,"supervisor.erl"},{line,301}]},{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}]}]}},{ancestors,[kernel_sup,<0.1595.0>]},{message_queue_len,0},{messages,[]},{links,[<0.1597.0>]},{dictionary,[]},{trap_exit,true},{status,running},{heap_size,610},{stack_size,28},{reductions,262}],[]]}
2021-06-24 13:09:42.177721 crash_report        #{label=>{proc_lib,crash},report=>[[{initial_call,{application_master,init,['Argument__1','Argument__2','Argument__3','Argument__4']}},{pid,<0.1594.0>},{registered_name,[]},{error_info,{exit,{{shutdown,{failed_to_start_child,kernel_safe_sup,{on_load_function_failed,'Elixir.Iconv'}}},{kernel,start,[normal,[]]}},[{application_master,init,4,[{file,"application_master.erl"},{line,138}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,226}]}]}},{ancestors,[<0.1593.0>]},{message_queue_len,1},{messages,[{'EXIT',<0.1595.0>,normal}]},{links,[<0.1593.0>,<0.1592.0>]},{dictionary,[]},{trap_exit,true},{status,running},{heap_size,376},{stack_size,28},{reductions,192}],[]]}
2021-06-24 13:09:42.178762 std_info            #{label=>{application_controller,exit},report=>[{application,kernel},{exited,{{shutdown,{failed_to_start_child,kernel_safe_sup,{on_load_function_failed,'Elixir.Iconv'}}},{kernel,start,[normal,[]]}}},{type,permanent}]}
{"Kernel pid terminated",application_controller,"{application_start_failure,kernel,{{shutdown,{failed_to_start_child,kernel_safe_sup,{on_load_function_failed,'Elixir.Iconv'}}},{kernel,start,[normal,[]]}}}"}
Kernel pid terminated (application_controller) ({application_start_failure,kernel,{{shutdown,{failed_to_start_child,kernel_safe_sup,{on_load_function_failed,'Elixir.Iconv'}}},{kernel,start,[normal,[]]

Few questions:

  • What Elixir version you are using?
  • Do you use Mix releases, Distillery or other tool?
  • Show us your mix.exs