Viewing certain users's timelines causes Mastodon API process to crash
Viewing certain users on my server results in this stack trace. Running 8444e7ee .
May 12 05:10:22 bbs.kawa-kun.com mix[7719]: Request: GET /api/v1/accounts/9ufkzqV1HJeefk1UO0/statuses?count=20&with_muted=true
May 12 05:10:22 bbs.kawa-kun.com mix[7719]: ** (exit) an exception was raised:
May 12 05:10:22 bbs.kawa-kun.com mix[7719]: ** (FunctionClauseError) no function clause matching in Pleroma.User.binary_id/1
May 12 05:10:22 bbs.kawa-kun.com mix[7719]: (pleroma 2.0.50-263-g80b91767-bbs-kawa-kun-com) lib/pleroma/user.ex:233: Pleroma.User.binary_id(nil)
May 12 05:10:22 bbs.kawa-kun.com mix[7719]: (elixir 1.10.0) lib/enum.ex:1396: Enum."-map/2-lists^map/1-0-"/2
May 12 05:10:22 bbs.kawa-kun.com mix[7719]: (pleroma 2.0.50-263-g80b91767-bbs-kawa-kun-com) lib/pleroma/user_relationship.ex:91: Pleroma.UserRelationship.dictionary/4
May 12 05:10:22 bbs.kawa-kun.com mix[7719]: (pleroma 2.0.50-263-g80b91767-bbs-kawa-kun-com) lib/pleroma/user_relationship.ex:138: Pleroma.UserRelationship.view_relationships_option/2
May 12 05:10:22 bbs.kawa-kun.com mix[7719]: (pleroma 2.0.50-263-g80b91767-bbs-kawa-kun-com) lib/pleroma/web/mastodon_api/views/status_view.ex:102: Pleroma.Web.MastodonAPI.StatusView.render/2
May 12 05:10:22 bbs.kawa-kun.com mix[7719]: (phoenix 1.4.13) lib/phoenix/view.ex:410: Phoenix.View.render_to_iodata/3
May 12 05:10:22 bbs.kawa-kun.com mix[7719]: (phoenix 1.4.13) lib/phoenix/controller.ex:729: Phoenix.Controller.__put_render__/5
May 12 05:10:22 bbs.kawa-kun.com mix[7719]: 05:10:22.134 [error] CRASH REPORT Process <0.19335.1> with 0 neighbours exited with reason: {{#{'__exception__' => true,'__struct__' => 'Elixir.FunctionClauseError',args => nil,arity => 1,clauses => nil,function => binary_id,kind => nil,module => 'Elixir.Pleroma.User'},[{'Elixir.Pleroma.User',binary_id,[nil],[{file,"lib/pleroma/user.ex"},{line,233}]},{'Elixir.Enum','-map/2-lists^map/1-0-',2,[{file,"lib/enum.ex"},{line,1396}]},{'Elixir.Enum','-map/2-lists^map/1-0-',2,[{file,"lib/enum.ex"},{line,1396}]},{'Elixir.Pleroma.UserRelationship',dictionary,4,[{file,"lib/pleroma/user_relati..."},...]},...]},...} in 'Elixir.Phoenix.Endpoint.Cowboy2Handler':exit_on_error/4 line 87 in 'Elixir.Phoenix.Endpoint.Cowboy2Handler':exit_on_error/4 line 87
May 12 05:10:22 bbs.kawa-kun.com mix[7719]: 05:10:22.134 [error] Cowboy stream 1 with ranch listener 'Elixir.Pleroma.Web.Endpoint.HTTP' and connection process <0.19330.1> had its request process exit with reason: {{#{'__exception__' => true,'__struct__' => 'Elixir.FunctionClauseError',args => nil,arity => 1,clauses => nil,function => binary_id,kind => nil,module => 'Elixir.Pleroma.User'},[{'Elixir.Pleroma.User',binary_id,[nil],[{file,"lib/pleroma/user.ex"},{line,233}]},{'Elixir.Enum','-map/2-lists^map/1-0-',2,[{file,"lib/enum.ex"},{line,1396}]},{'Elixir.Enum','-map/2-lists^map/1-0-',2,[{file,"lib/enum.ex"},{line,1396}]},{'Elixir.Pleroma.UserRelationship',dictionary,4,[{file,"lib/pleroma/user_relati..."},...]},...]},...} in 'Elixir.Phoenix.Endpoint.Cowboy2Handler':exit_on_error/4 line 87
Edited by Neil E. Hodges