warning: a struct for Pleroma.Web.CommonAPI.ActivityDraft is expected on struct update:
%Pleroma.Web.CommonAPI.ActivityDraft{draft | object: object}
but got type:
dynamic()
where "draft" was given the type:
# type: dynamic()
# from: lib/pleroma/web/common_api/activity_draft.ex:91:22
draft
when defining the variable "draft", you must also pattern match on "%Pleroma.Web.CommonAPI.ActivityDraft{}".
hint: given pattern matching is enough to catch typing errors, you may optionally convert the struct update into a map update. For example, instead of:
user = some_function()
%User{user | name: "John Doe"}
it is enough to write:
%User{} = user = some_function()
%{user | name: "John Doe"}
typing violation found at:
│
102 │ %__MODULE__{draft | object: object}
│ ~
│
└─ lib/pleroma/web/common_api/activity_draft.ex:102:5: Pleroma.Web.CommonAPI.ActivityDraft.listen_object/1
warning: a struct for OpenApiSpex.Cast.Error is expected on struct update:
%OpenApiSpex.Cast.Error{err | name: err.value}
but got type:
dynamic(%{..., name: nil, reason: :invalid_enum})
where "err" was given the type:
# type: dynamic(%{..., name: nil, reason: :invalid_enum})
# from: lib/pleroma/web/api_spec/render_error.ex:20:45
%{name: nil, reason: :invalid_enum} = err
when defining the variable "err", you must also pattern match on "%OpenApiSpex.Cast.Error{}".
hint: given pattern matching is enough to catch typing errors, you may optionally convert the struct update into a map update. For example, instead of:
user = some_function()
%User{user | name: "John Doe"}
it is enough to write:
%User{} = user = some_function()
%{user | name: "John Doe"}
typing violation found at:
│
21 │ %OpenApiSpex.Cast.Error{err | name: err.value}
│ ~
│
└─ lib/pleroma/web/api_spec/render_error.ex:21:11: Pleroma.Web.ApiSpec.RenderError.call/2
warning: a struct for Plug.Conn is expected on struct update:
%Plug.Conn{conn | query_params: query_params}
but got type:
dynamic()
where "conn" was given the type:
# type: dynamic()
# from: lib/pleroma/web/api_spec/cast_and_validate.ex:109:43
conn
when defining the variable "conn", you must also pattern match on "%Plug.Conn{}".
hint: given pattern matching is enough to catch typing errors, you may optionally convert the struct update into a map update. For example, instead of:
user = some_function()
%User{user | name: "John Doe"}
it is enough to write:
%User{} = user = some_function()
%{user | name: "John Doe"}
typing violation found at:
│
133 │ conn = %Conn{conn | query_params: query_params}
│ ~
│
└─ lib/pleroma/web/api_spec/cast_and_validate.ex:133:16: Pleroma.Web.ApiSpec.CastAndValidate.cast_and_validate/6
warning: a struct for Pleroma.Upload is expected on struct update:
%Pleroma.Upload{
upload
| path:
case upload.path do
x when x === false or x === nil ->
<<to_string(upload.id)::binary, "/", to_string(upload.name)::binary>>
x ->
x
end
}
but got type:
dynamic()
where "upload" was given the type:
# type: dynamic()
# from: lib/pleroma/upload.ex:95:24
{:ok, upload} <- prepare_upload(upload, opts)
when defining the variable "upload", you must also pattern match on "%Pleroma.Upload{}".
hint: given pattern matching is enough to catch typing errors, you may optionally convert the struct update into a map update. For example, instead of:
user = some_function()
%User{user | name: "John Doe"}
it is enough to write:
%User{} = user = some_function()
%{user | name: "John Doe"}
typing violation found at:
│
96 │ upload = %__MODULE__{upload | path: upload.path || "#{upload.id}/#{upload.name}"},
│ ~
│
└─ lib/pleroma/upload.ex:96:19: Pleroma.Upload.store/2
warning: a struct for Pleroma.MFA.Settings is expected on struct update:
%Pleroma.MFA.Settings{settings | enabled: false}
but got type:
dynamic()
where "settings" was given the type:
# type: dynamic()
# from: lib/pleroma/mfa/changeset.ex:11:14
settings = Pleroma.MFA.fetch_settings(Ecto.Changeset.apply_changes(changeset))
when defining the variable "settings", you must also pattern match on "%Pleroma.MFA.Settings{}".
hint: given pattern matching is enough to catch typing errors, you may optionally convert the struct update into a map update. For example, instead of:
user = some_function()
%User{user | name: "John Doe"}
it is enough to write:
%User{} = user = some_function()
%{user | name: "John Doe"}
typing violation found at:
│
17 │ put_change(changeset, %Settings{settings | enabled: false})
│ ~
│
└─ lib/pleroma/mfa/changeset.ex:17:29: Pleroma.MFA.Changeset.disable/2
---
warning: a struct for Pleroma.MFA.Settings is expected on struct update:
%Pleroma.MFA.Settings{
settings
| totp: %Pleroma.MFA.Settings.TOTP{confirmed: false, delivery_type: "app", secret: nil}
}
but got type:
dynamic()
where "settings" was given the type:
# type: dynamic()
# from: lib/pleroma/mfa/changeset.ex:23:74
%Pleroma.User{multi_factor_authentication_settings: settings} = user
when defining the variable "settings", you must also pattern match on "%Pleroma.MFA.Settings{}".
hint: given pattern matching is enough to catch typing errors, you may optionally convert the struct update into a map update. For example, instead of:
user = some_function()
%User{user | name: "John Doe"}
it is enough to write:
%User{} = user = some_function()
%{user | name: "John Doe"}
typing violation found at:
│
25 │ |> put_change(%Settings{settings | totp: %Settings.TOTP{}})
│ ~
│
└─ lib/pleroma/mfa/changeset.ex:25:19: Pleroma.MFA.Changeset.disable_totp/1
warning: a struct for Pleroma.Marker is expected on struct update:
%Pleroma.Marker{marker | user: user}
but got type:
dynamic()
where "marker" was given the type:
# type: dynamic()
# from: lib/pleroma/marker.ex
{:ok, marker}
when defining the variable "marker", you must also pattern match on "%Pleroma.Marker{}".
hint: given pattern matching is enough to catch typing errors, you may optionally convert the struct update into a map update. For example, instead of:
user = some_function()
%User{user | name: "John Doe"}
it is enough to write:
%User{} = user = some_function()
%{user | name: "John Doe"}
typing violation found at:
│
81 │ {:ok, marker} -> %__MODULE__{marker | user: user}
│ ~
│
└─ lib/pleroma/marker.ex:81:24: Pleroma.Marker.get_marker/2
Ranch listener wasn't being properly stopped when the Gopher GenServer
received a shutdown message due Restarter rebooting Pleroma to apply
ConfigDB configuration (originating from
Config.TransferTask.load_and_update_env/2) when ConfigDB is enabled.
Handle by trapping exits in the GenServer, which causes the terminate/2
function to be called and the Ranch listener to be stopped from there.
23:22:29.871 [error] GenServer Restarter.Pleroma terminating
** (MatchError) no match of right hand side value:
{:error,
{{:shutdown,
{:failed_to_start_child, Pleroma.Gopher.Server,
{{:badmatch, {:error, {:already_started, #PID<0.4801.0>}}},
[
{Pleroma.Gopher.Server, :init, 1,
[file: ~c"lib/pleroma/gopher/server.ex", line: 25]},
{:gen_server, :init_it, 2, [file: ~c"gen_server.erl", line: 2276]},
{:gen_server, :init_it, 6, [file: ~c"gen_server.erl", line: 2236]},
{:proc_lib, :init_p_do_apply, 3, [file: ~c"proc_lib.erl", line: 333]}
]}}}, {Pleroma.Application, :start, [:normal, []]}}}
(restarter 0.1.0) lib/pleroma.ex:104: Restarter.Pleroma.do_restart/1
(restarter 0.1.0) lib/pleroma.ex:96: Restarter.Pleroma.handle_cast/2
(stdlib 7.2) gen_server.erl:2460: :gen_server.try_handle_cast/3
(stdlib 7.2) gen_server.erl:2418: :gen_server.handle_msg/3
(stdlib 7.2) proc_lib.erl:333: :proc_lib.init_p_do_apply/3
Last message: {:"$gen_cast", {:after_boot, :dev}}
State: %{rebooted: false, need_reboot: false, after_boot: false}
Drop follow_redirect/force_redirect from the HTTP options used when warming MediaProxy, relying on Tesla middleware instead (Hackney redirect handling can crash behind CONNECT proxies).
Also add a regression assertion in the policy test and document the upstream Hackney issues in ReverseProxy redirect handling.