Skip to content

Useful.truncate/3: ** (MatchError) no match of right hand side value: nil  #79

@nelsonic

Description

@nelsonic

Just saw this error in the wild:

[error] GenServer #PID<0.578.0> terminating
** (MatchError) no match of right hand side value: nil
    (useful 1.15.0) lib/useful.ex:316: Useful.truncate/3
    (app 1.7.0) lib/app_web/live/app_live.html.heex:17: anonymous fn/2 in AppWeb.AppLive.render/1
    (phoenix_live_view 1.0.0) lib/phoenix_live_view/diff.ex:391: Phoenix.LiveView.Diff.traverse/7
    (phoenix_live_view 1.0.0) lib/phoenix_live_view/diff.ex:555: anonymous fn/4 in Phoenix.LiveView.Diff.traverse_dynamic/7
    (elixir 1.17.2) lib/enum.ex:2531: Enum."-reduce/3-lists^foldl/2-0-"/3
    (phoenix_live_view 1.0.0) lib/phoenix_live_view/diff.ex:389: Phoenix.LiveView.Diff.traverse/7
    (phoenix_live_view 1.0.0) lib/phoenix_live_view/diff.ex:136: Phoenix.LiveView.Diff.render/3
    (phoenix_live_view 1.0.0) lib/phoenix_live_view/channel.ex:960: anonymous fn/4 in Phoenix.LiveView.Channel.render_diff/3
    (telemetry 1.3.0) /Users/n/code/who/deps/telemetry/src/telemetry.erl:324: :telemetry.span/3
    (phoenix_live_view 1.0.0) lib/phoenix_live_view/channel.ex:955: Phoenix.LiveView.Channel.render_diff/3
    (phoenix_live_view 1.0.0) lib/phoenix_live_view/channel.ex:811: Phoenix.LiveView.Channel.handle_changed/4
    (stdlib 5.2.3) gen_server.erl:1095: :gen_server.try_handle_info/3
    (stdlib 5.2.3) gen_server.erl:1183: :gen_server.handle_msg/6
    (stdlib 5.2.3) proc_lib.erl:241: :proc_lib.init_p_do_apply/3
Last message: %Phoenix.Socket.Broadcast{topic: "live", event: "update", payload: 
%{
  data: %{id: 2952021, name: "Adriano P. S. Souza", location: "São Paulo/SP", 
  avatar_url: "https://avatars.githubusercontent.com/u/2952021", 
  bio: "✔️JAVA/GROOVY\r\n\r\n⏳JAVASCRIPT/NODE", 
  blog: "https://silvaesouza.github.io/", company: nil, created_at: "2012-12-03T13:21:30Z", 
  email: nil, followers: 11, following: 47, hireable: nil, login: "silvaesouza", 
  public_repos: 29, 
  two_factor_authentication: false, updated_at: ~N[2025-01-14 16:54:34], 
  inserted_at: ~N[2025-01-14 16:54:34]
}

Might need to dig into it to understand if the chars used in the bio are considered a non-binary ... 🤷‍♂️

Metadata

Metadata

Assignees

No one assigned

    Labels

    T25mTime Estimate 25 Minuteschorea tedious but necessary task often paying technical debttechnicalA technical issue that requires understanding of the code, infrastructure or dependencies

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions