nervescloud / nerves_hub_link_geo

Sync your Devices location with NervesHub
MIT License
0 stars 0 forks source link

(FunctionClauseError) no function clause matching in NervesHubLinkGeo.handle_info/2 #2

Open pojiro opened 1 month ago

pojiro commented 1 month ago

I found following logs in my fleet rpi4,

07:58:32.982 [error] GenServer NervesHubLinkGeo terminating
** (FunctionClauseError) no function clause matching in NervesHubLinkGeo.handle_info/2
    (nerves_hub_link_geo 0.1.0) lib/nerves_hub_link_geo.ex:62: NervesHubLinkGeo.handle_info(%{reason: {:error, {:upgrade_failure, %{reason: %Mint.WebSocket.UpgradeFailureError{status_code: 401, headers: [{"date", "Sun, 08 Sep 2024 07:58:32 GMT"}, {"content-length", "0"}, {"vary", "accept-encoding"}, {"cache-control", "max-age=0, private, must-revalidate"}]}, status_code: 401, resp_headers: [{"date", "Sun, 08 Sep 2024 07:58:32 GMT"}, {"content-length", "0"}, {"vary", "accept-encoding"}, {"cache-control", "max-age=0, private, must-revalidate"}]}}}, type: :disconnect, topic: "device"}, %{})
    (stdlib 6.0) gen_server.erl:2173: :gen_server.try_handle_info/3
    (stdlib 6.0) gen_server.erl:2261: :gen_server.handle_msg/6
    (stdlib 6.0) proc_lib.erl:329: :proc_lib.init_p_do_apply/3
Last message: %{reason: {:error, {:upgrade_failure, %{reason: %Mint.WebSocket.UpgradeFailureError{status_code: 401, headers: [{"date", "Sun, 08 Sep 2024 07:58:32 GMT"}, {"content-length", "0"}, {"vary", "accept-encoding"}, {"cache-control", "max-age=0, private, must-revalidate"}]}, status_code: 401, resp_headers: [{"date", "Sun, 08 Sep 2024 07:58:32 GMT"}, {"content-length", "0"}, {"vary", "accept-encoding"}, {"cache-control", "max-age=0, private, must-revalidate"}]}}}, type: :disconnect, topic: "device"}
State: %{}

Should it be handled?

joshk commented 3 weeks ago

Ahhhhh, great spotting! Yes, we should fix this, although we have a much bigger fix in the works.

I'll look into this shortly.