Lots of "MastodonAPI.NotificationView failed to render" errors from single user since v2.1.0
Environment
- Installation type: From source
- Pleroma version: v2.1.1
- Elixir version: Elixir 1.10.4
- Operating system: Debian GNU/Linux 10 (buster)
- PostgreSQL version:
psql (PostgreSQL) 11.7 (Debian 11.7-0+deb10u1)
Bug description
Ever since updating to v2.1.0 a few weeks ago I've had a constant stream of errors in my Pleroma logs.
The errors all seem to originate from the same user. I'm guessing they have a bugged notification or something.
I later updated the instance to v2.1.1 in hopes that it would resolve the issue, but nothing seems to have changed.
The error keeps blasting the logs 24/7 every 1-5 seconds and have now been going on for close to a week.
I've sent a message to the user generating the errors asking if they've noticed any issues, but they have not yet responded. they say they have not experienced any obvious issues.
The following is two log entries of this error:
Sep 14 09:01:41 droite mix[4896]: 09:01:41.821 request_id=FjSUXp_Z-X95yNsAA19y [error] Elixir.Pleroma.Web.MastodonAPI.NotificationView failed to render {Pleroma.Web.MastodonAPI.NotificationView, "show.json"}
Sep 14 09:01:41 droite mix[4896]: ** (FunctionClauseError) no function clause matching in Pleroma.User.mutes?/2
Sep 14 09:01:41 droite mix[4896]: (pleroma 2.1.0) lib/pleroma/user.ex:1438: Pleroma.User.mutes?(%Pleroma.User{notification_muter_users: #Ecto.Association.NotLoaded<association :notification_muter_users is not loaded>, keys: "[REDACTED]", deactivated: false, unread_conversation_count: 0, name: "[REDACTED]", reblog_mutee_mutes: #Ecto.Association.NotLoaded<association :reblog_mutee_mutes is not loaded>, muted_notifications: [], deliveries: #Ecto.Association.NotLoaded<association :deliveries is not loaded>, notifications: #Ecto.Association.NotLoaded<association :notifications is not loaded>, shared_inbox: nil, uri: nil, reblog_muted_users: #Ecto.Association.NotLoaded<association :reblog_muted_users is not loaded>, banner: %{}, blocked_users: #Ecto.Association.NotLoaded<association :blocked_users is not loaded>, fields: [], following_count: 18, mutee_mutes: #Ecto.Association.NotLoaded<association :mutee_mutes is not loaded>, pleroma_settings_store: %{}, confirmation_pending: false, updated_at: ~N[2020-09-06 08:54:28], subscribee_subscriptions: #Ecto.Association.NotLoaded<association :subscribee_subscriptions is not loaded>, no_rich_text: false, muted_reblogs: [], hide_follows_count: false, inbox: nil, emoji: %{}, blockee_blocks: #Ecto.Association.NotLoaded<association :blockee_blocks is not loaded>, bio: "Placeholder", raw_fields: [], registrations: #Ecto.Association.NotLoaded<association :registrations is not loaded>, ap_enabled: false, mastofe_settings: nil, password: nil, discoverable: false, reblog_muter_mutes: #Ecto.Association.NotLoaded<association :reblog_muter_mutes is not loaded>, nickname: "[REDACTED]", subscribee_users: #Ecto.Association.NotLoaded<association :subscribee_users is not loaded>, incoming_relationships: #Ecto.Association.NotLoaded<association :incoming_relationships is not loaded>, following_address: nil, hide_favorites: true, subscriber_users: #Ecto.Association.NotLoaded<association :subscriber_users is not loaded>, outgoing_relationships: #Ecto.Association.NotLoaded<association :outgoing_relationships is not loaded>, public_key: nil, invisible: false, approval_pending: false, avatar: %{"name" => "blob.png", "type" => "Image", "url" => [%{...}]}, password_hash: "[REDACTED]", local: true, tags: [], password_reset_pending: false, ...}, nil)
Sep 14 09:01:41 droite mix[4896]: (pleroma 2.1.0) lib/pleroma/web/mastodon_api/views/notification_view.ex:95: Pleroma.Web.MastodonAPI.NotificationView.render/2
Sep 14 09:01:41 droite mix[4896]: (pleroma 2.1.0) lib/pleroma/web/mastodon_api/views/notification_view.ex:6: Pleroma.Web.MastodonAPI.NotificationView.safe_render/3
Sep 14 09:01:41 droite mix[4896]: (elixir 1.10.4) lib/enum.ex:1396: Enum."-map/2-lists^map/1-0-"/2
Sep 14 09:01:41 droite mix[4896]: (pleroma 2.1.0) lib/pleroma/web/mastodon_api/views/notification_view.ex:6: Pleroma.Web.MastodonAPI.NotificationView.safe_render_many/4
Sep 14 09:01:41 droite mix[4896]: (phoenix 1.4.17) lib/phoenix/view.ex:410: Phoenix.View.render_to_iodata/3
Sep 14 09:01:41 droite mix[4896]: (phoenix 1.4.17) lib/phoenix/controller.ex:776: Phoenix.Controller.__put_render__/5
Sep 14 09:01:44 droite mix[4896]: 09:01:44.855 request_id=FjSUX1SzSwel5e4AA0RB [error] Elixir.Pleroma.Web.MastodonAPI.NotificationView failed to render {Pleroma.Web.MastodonAPI.NotificationView, "show.json"}
Sep 14 09:01:44 droite mix[4896]: ** (FunctionClauseError) no function clause matching in Pleroma.User.mutes?/2
Sep 14 09:01:44 droite mix[4896]: (pleroma 2.1.0) lib/pleroma/user.ex:1438: Pleroma.User.mutes?(%Pleroma.User{notification_muter_users: #Ecto.Association.NotLoaded<association :notification_muter_users is not loaded>, keys: "[REDACTED]", deactivated: false, unread_conversation_count: 0, name: "[REDACTED]", reblog_mutee_mutes: #Ecto.Association.NotLoaded<association :reblog_mutee_mutes is not loaded>, muted_notifications: [], deliveries: #Ecto.Association.NotLoaded<association :deliveries is not loaded>, notifications: #Ecto.Association.NotLoaded<association :notifications is not loaded>, shared_inbox: nil, uri: nil, reblog_muted_users: #Ecto.Association.NotLoaded<association :reblog_muted_users is not loaded>, banner: %{}, blocked_users: #Ecto.Association.NotLoaded<association :blocked_users is not loaded>, fields: [], following_count: 18, mutee_mutes: #Ecto.Association.NotLoaded<association :mutee_mutes is not loaded>, pleroma_settings_store: %{}, confirmation_pending: false, updated_at: ~N[2020-09-06 08:54:28], subscribee_subscriptions: #Ecto.Association.NotLoaded<association :subscribee_subscriptions is not loaded>, no_rich_text: false, muted_reblogs: [], hide_follows_count: false, inbox: nil, emoji: %{}, blockee_blocks: #Ecto.Association.NotLoaded<association :blockee_blocks is not loaded>, bio: "Placeholder", raw_fields: [], registrations: #Ecto.Association.NotLoaded<association :registrations is not loaded>, ap_enabled: false, mastofe_settings: nil, password: nil, discoverable: false, reblog_muter_mutes: #Ecto.Association.NotLoaded<association :reblog_muter_mutes is not loaded>, nickname: "[REDACTED]", subscribee_users: #Ecto.Association.NotLoaded<association :subscribee_users is not loaded>, incoming_relationships: #Ecto.Association.NotLoaded<association :incoming_relationships is not loaded>, following_address: nil, hide_favorites: true, subscriber_users: #Ecto.Association.NotLoaded<association :subscriber_users is not loaded>, outgoing_relationships: #Ecto.Association.NotLoaded<association :outgoing_relationships is not loaded>, public_key: nil, invisible: false, approval_pending: false, avatar: %{"name" => "blob.png", "type" => "Image", "url" => [%{...}]}, password_hash: "[REDACTED]", local: true, tags: [], password_reset_pending: false, ...}, nil)
Sep 14 09:01:44 droite mix[4896]: (pleroma 2.1.0) lib/pleroma/web/mastodon_api/views/notification_view.ex:95: Pleroma.Web.MastodonAPI.NotificationView.render/2
Sep 14 09:01:44 droite mix[4896]: (pleroma 2.1.0) lib/pleroma/web/mastodon_api/views/notification_view.ex:6: Pleroma.Web.MastodonAPI.NotificationView.safe_render/3
Sep 14 09:01:44 droite mix[4896]: (elixir 1.10.4) lib/enum.ex:1396: Enum."-map/2-lists^map/1-0-"/2
Sep 14 09:01:44 droite mix[4896]: (pleroma 2.1.0) lib/pleroma/web/mastodon_api/views/notification_view.ex:6: Pleroma.Web.MastodonAPI.NotificationView.safe_render_many/4
Sep 14 09:01:44 droite mix[4896]: (phoenix 1.4.17) lib/phoenix/view.ex:410: Phoenix.View.render_to_iodata/3
Sep 14 09:01:44 droite mix[4896]: (phoenix 1.4.17) lib/phoenix/controller.ex:776: Phoenix.Controller.__put_render__/5
Only keys, usernames and password hashes have been redacted from the error above.
I was not entirely certain if this belonged in the bug tracker or support tracker.