bug: Error during FastHtml.Pool.init_worker/1 callback
First of all, thank you for the great package! I'm using it in combination with fast_sanitize.
Error
Recently, I've started to see an error when running mix phx.server
in development mode:
[error] Error during FastHtml.Pool.init_worker/1 callback:
** (ErlangError) Erlang error: :enoent:
* 1st argument: invalid port name
:erlang.open_port({:spawn_executable, "/app/_build/dev/lib/fast_html/priv/fasthtml_worker"}, [:binary, {:packet, 4}, :use_stdio, :exit_status])
(fast_html 2.3.0) lib/fast_html/pool.ex:81: FastHtml.Pool.init_worker/1
(nimble_pool 0.2.6) lib/nimble_pool.ex:932: NimblePool.do_apply_worker_callback/4
(nimble_pool 0.2.6) lib/nimble_pool.ex:891: NimblePool.init_worker/5
(nimble_pool 0.2.6) lib/nimble_pool.ex:539: NimblePool.handle_info/2
(stdlib 5.2) gen_server.erl:1095: :gen_server.try_handle_info/3
(stdlib 5.2) gen_server.erl:1183: :gen_server.handle_msg/6
(stdlib 5.2) proc_lib.erl:241: :proc_lib.init_p_do_apply/3
The error comes up somewhat erratically. It can be solved by deleting the _build
directory, so I assume there is some kind of caching or race condition underneath that causes the issue.
Unfortunately, I can't install the most recent nimble pool version (1.0.0), because nimble pool is locked to 0.2.x in fast_html.
Versions
{:fast_sanitize, "0.2.3"},
{:fast_html, "2.3.0"},
ELIXIR_VERSION=1.15.7
OTP_VERSION=26.2.2
DEBIAN_VERSION=bullseye-20240130-slim
See the mix.exs file for a full list of used packages.
Edited by a b