Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
nelsonic opened this issue Jan 14, 2025 · 1 comment
Labels
chore a tedious but necessary task often paying technical debt T25m Time Estimate 25 Minutes technical A technical issue that requires understanding of the code, infrastructure or dependencies

Comments

@nelsonic
Copy link
Member

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 ... 🤷‍♂️

@nelsonic nelsonic added chore a tedious but necessary task often paying technical debt T25m Time Estimate 25 Minutes technical A technical issue that requires understanding of the code, infrastructure or dependencies labels Jan 14, 2025
@nelsonic
Copy link
Member Author

The offending string is "✔️JAVA/GROOVY\r\n\r\n⏳JAVASCRIPT/NODE" ...
Is it because there are no spaces? 🤷‍♂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore a tedious but necessary task often paying technical debt T25m Time Estimate 25 Minutes technical A technical issue that requires understanding of the code, infrastructure or dependencies
Projects
None yet
Development

No branches or pull requests

1 participant