LiveView file uploader crashes while updating

Hello!

I implemented a file uploader regarding the tutorial from Chris.. It works so far when I create a new database record. But when I want to update the same record it doesn’t works anymore. The output it generates is here:

[error] GenServer #PID<0.712.0> terminating
** (stop) exited in: GenServer.call(#PID<0.680.0>, {:phoenix, :register_entry_upload, %{channel_pid: #PID<0.712.0>, cid: 2, entry_ref: "0", ref: "phx-FmRCZ4hVEEjwYAJB"}}, 5000)
    ** (EXIT) no process: the process is not alive or there's no process currently associated with the given name, possibly because its application isn't started
    (elixir 1.11.3) lib/gen_server.ex:1027: GenServer.call/3
    (phoenix_live_view 0.15.4) lib/phoenix_live_view/upload_channel.ex:36: Phoenix.LiveView.UploadChannel.join/3
    (phoenix 1.5.7) lib/phoenix/channel/server.ex:376: Phoenix.Channel.Server.channel_join/4
    (phoenix 1.5.7) lib/phoenix/channel/server.ex:298: Phoenix.Channel.Server.handle_info/2
    (stdlib 3.14) gen_server.erl:689: :gen_server.try_dispatch/4
    (stdlib 3.14) gen_server.erl:765: :gen_server.handle_msg/6
    (stdlib 3.14) proc_lib.erl:226: :proc_lib.init_p_do_apply/3
Last message: {Phoenix.Channel, %{"token" => "SFMyNTY.g2gDaAJhBHQAAAADZAADY2lkYQJkAANwaWRYZAANbm9ub2RlQG5vaG9zdAAAAqgAAAAAAAAAAGQAA3JlZmgCbQAAABRwaHgtRm1SQ1o0aFZFRWp3WUFKQm0AAAABMG4GAMPQWqt3AWIAAVGA.ZIn5ashiKRDPxT6TfZKhWfkUEe44vBsXQzJzudWd_X0"}, {#PID<0.667.0>, #Reference<0.3241533348.2057043975.125641>}, %Phoenix.Socket{assigns: %{}, channel: Phoenix.LiveView.UploadChannel, channel_pid: nil, endpoint: SchlaflosWeb.Endpoint, handler: Phoenix.LiveView.Socket, id: nil, join_ref: "14", joined: false, private: %{connect_info: %{session: %{"_csrf_token" => "Ov0RoRAEIEIUakraeMBYEGum"}}}, pubsub_server: Schlaflos.PubSub, ref: nil, serializer: Phoenix.Socket.V2.JSONSerializer, topic: "lvu:0", transport: :websocket, transport_pid: #PID<0.667.0>}}
State: #Reference<0.3241533348.2057043975.125643>
[error] exited in: GenServer.call(#PID<0.680.0>, {:phoenix, :register_entry_upload, %{channel_pid: #PID<0.712.0>, cid: 2, entry_ref: "0", ref: "phx-FmRCZ4hVEEjwYAJB"}}, 5000)
    ** (EXIT) no process: the process is not alive or there's no process currently associated with the given name, possibly because its application isn't started
[error] GenServer #PID<0.711.0> terminating
** (KeyError) key "phx-FmRCZ4hVEEjwYAJB" not found in: %{"phx-FmRCarvb99CNQgvG" => :live_image}
    :erlang.map_get("phx-FmRCZ4hVEEjwYAJB", %{"phx-FmRCarvb99CNQgvG" => :live_image})
    (phoenix_live_view 0.15.4) lib/phoenix_live_view/upload.ex:166: Phoenix.LiveView.Upload.get_upload_by_ref!/2
    (phoenix_live_view 0.15.4) lib/phoenix_live_view/upload.ex:107: Phoenix.LiveView.Upload.update_progress/4
    (phoenix_live_view 0.15.4) lib/phoenix_live_view/channel.ex:139: anonymous fn/4 in Phoenix.LiveView.Channel.handle_info/2
    (phoenix_live_view 0.15.4) lib/phoenix_live_view/diff.ex:194: Phoenix.LiveView.Diff.write_component/5
    (phoenix_live_view 0.15.4) lib/phoenix_live_view/channel.ex:1011: Phoenix.LiveView.Channel.write_socket/4
    (phoenix_live_view 0.15.4) lib/phoenix_live_view/channel.ex:137: Phoenix.LiveView.Channel.handle_info/2
    (stdlib 3.14) gen_server.erl:689: :gen_server.try_dispatch/4
    (stdlib 3.14) gen_server.erl:765: :gen_server.handle_msg/6
    (stdlib 3.14) proc_lib.erl:226: :proc_lib.init_p_do_apply/3
.....

Here is the link to the form_component.ex

Best regards, Simon