no function clause matching in Plug.Conn.resp/3
Environment
- Installation type (OTP or From Source):
OTP
- Pleroma version (could be found in the "Version" tab of settings in Pleroma-FE):
2.1.0
- Elixir version (
elixir -v
for from source installations, N/A for OTP):N/A
- Operating system:
Ubuntu arm64
- PostgreSQL version (
psql -V
):psql (PostgreSQL) 12.4 (Ubuntu 12.4-0ubuntu0.20.04.1)
Bug description
Inbound federation broke when I updated to 1.2.0.
Here's a snippet from the logs:
Aug 31 18:50:54 web pleroma[1770795]: 18:50:54.912 request_id=FjB_UU7KePQNVUUACOGB [error] Internal server error: %UndefinedFunctionError{arity: 1, function: :__should_log__, message: nil, module: Logger, reason: nil}
Aug 31 18:50:54 web pleroma[1770795]: 18:50:54.913 request_id=FjB_UU7KePQNVUUACOGB [info] Converted error :undef to 500 response
Aug 31 18:50:54 web pleroma[1770795]: 18:50:54.924 [error] #PID<0.604.2> running Pleroma.Web.Endpoint (connection #PID<0.603.2>, stream id 1) terminated
Aug 31 18:50:54 web pleroma[1770795]: Server: nth.io:80 (http)
Aug 31 18:50:54 web pleroma[1770795]: Request: POST /inbox
Aug 31 18:50:54 web pleroma[1770795]: ** (exit) an exception was raised:
Aug 31 18:50:54 web pleroma[1770795]: ** (FunctionClauseError) no function clause matching in Plug.Conn.resp/3
Aug 31 18:50:54 web pleroma[1770795]: (plug 1.10.4) lib/plug/conn.ex:580: Plug.Conn.resp(%Plug.Conn{adapter: {Plug.Cowboy.Conn, :...}, assigns: %{digest: "SHA-256=mHdzFFQrnCudkKEpy71otHBc4mbaEmAA2OVDmfBbBoY=", kind: :error, layout: false, locale: "en", reason: %UndefinedFunctionError{arity: 1, function: :__should_log__, message: nil, module: Logger, reason: nil}, remote_ip_found: true, stack: [{Logger, :__should_log__, [:debug], []}, {HTTPSignatures, :validate, 3, [file: 'lib/http_signatures/http_signatures.ex', line: 31]}, {HTTPSignatures, :validate_conn, 1, [file: 'lib/http_signatures/http_signatures.ex', line: 41]}, {Pleroma.Web.Plugs.HTTPSignaturePlug, :maybe_assign_valid_signature, 1, [file: 'lib/pleroma/plugs/http_signature.ex', line: 42]}, {Pleroma.Web.Plugs.HTTPSignaturePlug, :call, 2, [file: 'lib/pleroma/plugs/http_signature.ex', line: 21]}, {Pleroma.Web.Router, :http_signature, 2, []}, {Pleroma.Web.Router, :activitypub, 2, []}, {Pleroma.Web.Router, :__pipe_through12__, 1, [file: 'lib/pleroma/web/router.ex', line: 5]}], status: 500}, before_send: [#Function<0.49113890/1 in Pleroma.Web.Endpoint.PipelineInstrumenter.call/2>, #Function<1.129014997/1 in Plug.Logger.call/2>], body_params: %{"@context" => ["https://www.w3.org/ns/activitystreams", "https://bikeshed.party/schemas/litepub-0.1.jsonld", %{"@language" => "und"}], "actor" => "https://bikeshed.party/users/feld", "cc" => ["https://www.w3.org/ns/activitystreams#Public"], "context" => "tag:kinky.business,2020-08-29:objectId=16190070:objectType=Conversation", "id" => "https://bikeshed.party/activities/6c21f061-4eef-4438-8339-62970fcc7f72", "object" => "https://kinky.business/users/valeriabliss/statuses/104770825302251616", "to" => ["https://kinky.business/users/valeriabliss", "https://bikeshed.party/users/feld/followers"], "type" => "Like"}, cookies: %Plug.Conn.Unfetched{aspect: :cookies}, halted: false, host: "nth.io", method: "POST", owner: #PID<0.604.2>, params: %{"@context" => ["https://www.w3.org/ns/activitystreams", "https://bikeshed.party/schemas/litepub-0.1.jsonld", %{"@language" => "und"}], "actor" => "https://bikeshed.party/users/feld", "cc" => ["https://www.w3.org/ns/activitystreams#Public"], "context" => "tag:kinky.business,2020-08-29:objectId=16190070:objectType=Conversation", "id" => "https://bikeshed.party/activities/6c21f061-4eef-4438-8339-62970fcc7f72", "object" => "https://kinky.business/users/valeriabliss/statuses/104770825302251616", "to" => ["https://kinky.business/users/valeriabliss", "https://bikeshed.party/users/feld/followers"], "type" => "Like"}, path_info: ["inbox"], path_params: %{}, port: 80, private: %{Pleroma.Web.Router => {[], %{}}, :phoenix_endpoint => Pleroma.Web.Endpoint, :phoenix_format => "activity+json", :phoenix_layout => false, :phoenix_root_layout => false, :phoenix_router => Pleroma.Web.Router, :phoenix_template => "500.activity+json", :phoenix_view => Pleroma.Web.ErrorView, :plug_session_fetch => #Function<1.29283909/1 in Plug.Session.fetch_session/1>}, query_params: %{}, query_string: "", remote_ip: {172, 102, 4, 220}, req_cookies: %Plug.Conn.Unfetched{aspect: :cookies}, req_headers: [{"accept-encoding", "gzip"}, {"cdn-loop", "cloudflare"}, {"cf-connecting-ip", "172.102.4.220"}, {"cf-ipcountry", "US"}, {"cf-ray", "5cbaa810dce9c550-ORD"}, {"cf-request-id", "04e8875e870000c550ac947200000001"}, {"cf-visitor", "{\"scheme\":\"https\"}"}, {"connection", "upgrade"}, {"content-length", "578"}, {"content-type", "application/activity+json"}, {"date", "Mon, 31 Aug 2020 23:50:54 GMT"}, {"digest", "SHA-256=mHdzFFQrnCudkKEpy71otHBc4mbaEmAA2OVDmfBbBoY="}, {"host", "nth.io"}, {"signature", "keyId=\"https://bikeshed.party/users/feld#main-key\",algorithm=\"rsa-sha256\",headers=\"(request-target) content-length date digest host\",signature=\"canb3WJXF0HmjW9MmkluwoZD8w0YRH0l6vNzIEYiPvdzzb+vZUMBGMX6T2xL41ZJ6WNMvvYHFWYajgRlycfoZeVT1XRXAeM9AE2PYGgM8nTdexoYQK2Y5ttZnHNa6nP5+8oJa19qlSQN8zZbxWKpJUFD+Y5k5hIpo2RwFGak4st7gKWuae4p7ZrFgDqmjXfj+HneU6irOHbP/0qcBGlS1cOvaLrLJZI5BzxgNudmtVUz70+FOa2uk3uhNd5/djERdiNkEoQj4LolR6dpxr5I6VvRPLlLmmVnXQQWkk1xvVgEQcoONiBSNuGJ90aIT9w0JvygQipXqezl1iy2K3ZYNg==\""}, {"user-agent", "Pleroma 2.1.50-56-g0a839d51-media-preview-proxy; https://bikeshed.party <abuse@feld.me>"}, {"x-forwarded-for", "172.102.4.220"}, {"x-forwarded-proto", "https"}], request_path: "/inbox", resp_body: nil, resp_cookies: %{}, resp_headers: [{"content-type", "application/activity+json; charset=utf-8"}, {"cache-control", "max-age=0, private, must-revalidate"}, {"access-control-allow-origin", "*"}, {"access-control-expose-headers", "Link,X-RateLimit-Reset,X-RateLimit-Limit,X-RateLimit-Remaining,X-Request-Id,Idempotency-Key"}, {"access-control-allow-credentials", "true"}, {"x-xss-protection", "1; mode=block"}, {"x-permitted-cross-domain-policies", "none"}, {"x-frame-options", "DENY"}, {"x-content-type-options", "nosniff"}, {"referrer-policy", "same-origin"}, {"x-download-options", "noopen"}, {"content-security-policy", "upgrade-insecure-requests;script-src 'self';connect-src 'self' blob: https://nth.io wss://nth.io;media-src 'self' https://s3.amazonaws.com;img-src 'self' data: blob: https://s3.amazonaws.com;default-src 'none';base-uri 'self';frame-ancestors 'none';style-src 'self' 'unsafe-inline';font-src 'self';manifest-src 'self';"}, {"strict-transport-security", "max-age=31536000; includeSubDomains"}, {"expect-ct", "enforce, max-age=2592000"}, {"x-request-id", "FjB_UU7KePQNVUUACOGB"}], scheme: :http, script_name: [], secret_key_base: :..., state: :unset, status: 500}, 500, %{errors: %{detail: "Internal server error"}})
Aug 31 18:50:54 web pleroma[1770795]: (phoenix 1.4.17) lib/phoenix/endpoint/render_errors.ex:77: Phoenix.Endpoint.RenderErrors.instrument_render_and_send/5
Aug 31 18:50:54 web pleroma[1770795]: (phoenix 1.4.17) lib/phoenix/endpoint/render_errors.ex:62: Phoenix.Endpoint.RenderErrors.__catch__/5
Aug 31 18:50:54 web pleroma[1770795]: (phoenix 1.4.17) lib/phoenix/endpoint/cowboy2_handler.ex:42: Phoenix.Endpoint.Cowboy2Handler.init/4
Aug 31 18:50:54 web pleroma[1770795]: (cowboy 2.8.0) /builds/pleroma/pleroma/deps/cowboy/src/cowboy_handler.erl:37: :cowboy_handler.execute/2
Aug 31 18:50:54 web pleroma[1770795]: (cowboy 2.8.0) /builds/pleroma/pleroma/deps/cowboy/src/cowboy_stream_h.erl:300: :cowboy_stream_h.execute/3
Aug 31 18:50:54 web pleroma[1770795]: (cowboy 2.8.0) /builds/pleroma/pleroma/deps/cowboy/src/cowboy_stream_h.erl:291: :cowboy_stream_h.request_process/3
Aug 31 18:50:54 web pleroma[1770795]: (stdlib 3.12.1) proc_lib.erl:249: :proc_lib.init_p_do_apply/3
Aug 31 18:50:55 web pleroma[1770795]: 18:50:55.368 request_id=FjB_UWnwy3SsXCkAAoWC [error] Internal server error: %UndefinedFunctionError{arity: 1, function: :__should_log__, message: nil, module: Logger, reason: nil}
Aug 31 18:50:55 web pleroma[1770795]: 18:50:55.369 request_id=FjB_UWnwy3SsXCkAAoWC [info] Converted error :undef to 500 response
Aug 31 18:50:55 web pleroma[1770795]: 18:50:55.378 [error] #PID<0.606.2> running Pleroma.Web.Endpoint (connection #PID<0.605.2>, stream id 1) terminated
Aug 31 18:50:55 web pleroma[1770795]: Server: nth.io:80 (http)
Aug 31 18:50:55 web pleroma[1770795]: Request: POST /inbox
Aug 31 18:50:55 web pleroma[1770795]: ** (exit) an exception was raised:
Aug 31 18:50:55 web pleroma[1770795]: ** (FunctionClauseError) no function clause matching in Plug.Conn.resp/3
Aug 31 18:50:55 web pleroma[1770795]: (plug 1.10.4) lib/plug/conn.ex:580: Plug.Conn.resp(%Plug.Conn{adapter: {Plug.Cowboy.Conn, :...}, assigns: %{digest: "SHA-256=TPC7D9OShFajubILBTXDE5FvA8HeqUJuoDM8wYNPmA4=", kind: :error, layout: false, locale: "en", reason: %UndefinedFunctionError{arity: 1, function: :__should_log__, message: nil, module: Logger, reason: nil}, remote_ip_found: true, stack: [{Logger, :__should_log__, [:debug], []}, {HTTPSignatures, :validate, 3, [file: 'lib/http_signatures/http_signatures.ex', line: 31]}, {HTTPSignatures, :validate_conn, 1, [file: 'lib/http_signatures/http_signatures.ex', line: 41]}, {Pleroma.Web.Plugs.HTTPSignaturePlug, :maybe_assign_valid_signature, 1, [file: 'lib/pleroma/plugs/http_signature.ex', line: 42]}, {Pleroma.Web.Plugs.HTTPSignaturePlug, :call, 2, [file: 'lib/pleroma/plugs/http_signature.ex', line: 21]}, {Pleroma.Web.Router, :http_signature, 2, []}, {Pleroma.Web.Router, :activitypub, 2, []}, {Pleroma.Web.Router, :__pipe_through12__, 1, [file: 'lib/pleroma/web/router.ex', line: 5]}], status: 500}, before_send: [#Function<0.49113890/1 in Pleroma.Web.Endpoint.PipelineInstrumenter.call/2>, #Function<1.129014997/1 in Plug.Logger.call/2>], body_params: %{"@context" => ["https://www.w3.org/ns/activitystreams", "https://lain.com/schemas/litepub-0.1.jsonld", %{"@language" => "und"}], "actor" => "https://lain.com/users/lain", "cc" => ["https://www.w3.org/ns/activitystreams#Public"], "context" => "https://lain.com/contexts/a3710799-2835-4f21-8385-6f6bf29cab56", "id" => "https://lain.com/activities/cc9af820-72f0-425b-8c5f-d08782fcf847", "object" => "https://shitposter.club/objects/ff07ff14-76b9-4285-9159-52145860b1f9", "to" => ["https://shitposter.club/users/comradeagle", "https://lain.com/users/lain/followers"], "type" => "Like"}, cookies: %Plug.Conn.Unfetched{aspect: :cookies}, halted: false, host: "nth.io", method: "POST", owner: #PID<0.606.2>, params: %{"@context" => ["https://www.w3.org/ns/activitystreams", "https://lain.com/schemas/litepub-0.1.jsonld", %{"@language" => "und"}], "actor" => "https://lain.com/users/lain", "cc" => ["https://www.w3.org/ns/activitystreams#Public"], "context" => "https://lain.com/contexts/a3710799-2835-4f21-8385-6f6bf29cab56", "id" => "https://lain.com/activities/cc9af820-72f0-425b-8c5f-d08782fcf847", "object" => "https://shitposter.club/objects/ff07ff14-76b9-4285-9159-52145860b1f9", "to" => ["https://shitposter.club/users/comradeagle", "https://lain.com/users/lain/followers"], "type" => "Like"}, path_info: ["inbox"], path_params: %{}, port: 80, private: %{Pleroma.Web.Router => {[], %{}}, :phoenix_endpoint => Pleroma.Web.Endpoint, :phoenix_format => "activity+json", :phoenix_layout => false, :phoenix_root_layout => false, :phoenix_router => Pleroma.Web.Router, :phoenix_template => "500.activity+json", :phoenix_view => Pleroma.Web.ErrorView, :plug_session_fetch => #Function<1.29283909/1 in Plug.Session.fetch_session/1>}, query_params: %{}, query_string: "", remote_ip: {88, 198, 157, 111}, req_cookies: %Plug.Conn.Unfetched{aspect: :cookies}, req_headers: [{"accept-encoding", "gzip"}, {"cdn-loop", "cloudflare"}, {"cf-connecting-ip", "88.198.157.111"}, {"cf-ipcountry", "DE"}, {"cf-ray", "5cbaa81238731ebe-AMS"}, {"cf-request-id", "04e8875f6600001ebecfb5a200000001"}, {"cf-visitor", "{\"scheme\":\"https\"}"}, {"connection", "upgrade"}, {"content-length", "544"}, {"content-type", "application/activity+json"}, {"date", "Mon, 31 Aug 2020 23:50:55 GMT"}, {"digest", "SHA-256=TPC7D9OShFajubILBTXDE5FvA8HeqUJuoDM8wYNPmA4="}, {"host", "nth.io"}, {"signature", "keyId=\"https://lain.com/users/lain#main-key\",algorithm=\"rsa-sha256\",headers=\"(request-target) content-length date digest host\",signature=\"Ar/It01Y/zUm9TdTSUDrmCto9SCR2gZ3NYI4D0l94Y8GX23lWoJvJ1izRwQf6sAKrvnT/anuYarD087gg4UIrT1oQtRRH4WU8JNEZcluy6Fsw52tNs/hoYMhZ48zCwNPXt1sGHnWoahINEQ2C0u1oTA8stdiNmrBiaLbepLJgFbDQi433SZToVacpyDnd0rGUqWcO/grIyaTZIqFi5vDGPHW3COjFzTqNka0+BIxtJsFewGz0pU/C4qLsT2ntwJ4X46QkklR1zk7Ld9dhyz9pVCrZ8mbqTG73cCXkaPvKQJBkrdMZoqnjGe2BAbDvcXHtMzfVbS/41aXLFaFiGjLxQ==\""}, {"user-agent", "Pleroma 2.1.0-2615-gb141e35d-release-2-1-0; https://lain.com <lain@lain.com>"}, {"x-forwarded-for", "88.198.157.111"}, {"x-forwarded-proto", "https"}], request_path: "/inbox", resp_body: nil, resp_cookies: %{}, resp_headers: [{"content-type", "application/activity+json; charset=utf-8"}, {"cache-control", "max-age=0, private, must-revalidate"}, {"access-control-allow-origin", "*"}, {"access-control-expose-headers", "Link,X-RateLimit-Reset,X-RateLimit-Limit,X-RateLimit-Remaining,X-Request-Id,Idempotency-Key"}, {"access-control-allow-credentials", "true"}, {"x-xss-protection", "1; mode=block"}, {"x-permitted-cross-domain-policies", "none"}, {"x-frame-options", "DENY"}, {"x-content-type-options", "nosniff"}, {"referrer-policy", "same-origin"}, {"x-download-options", "noopen"}, {"content-security-policy", "upgrade-insecure-requests;script-src 'self';connect-src 'self' blob: https://nth.io wss://nth.io;media-src 'self' https://s3.amazonaws.com;img-src 'self' data: blob: https://s3.amazonaws.com;default-src 'none';base-uri 'self';frame-ancestors 'none';style-src 'self' 'unsafe-inline';font-src 'self';manifest-src 'self';"}, {"strict-transport-security", "max-age=31536000; includeSubDomains"}, {"expect-ct", "enforce, max-age=2592000"}, {"x-request-id", "FjB_UWnwy3SsXCkAAoWC"}], scheme: :http, script_name: [], secret_key_base: :..., state: :unset, status: 500}, 500, %{errors: %{detail: "Internal server error"}})
Aug 31 18:50:55 web pleroma[1770795]: (phoenix 1.4.17) lib/phoenix/endpoint/render_errors.ex:77: Phoenix.Endpoint.RenderErrors.instrument_render_and_send/5
Aug 31 18:50:55 web pleroma[1770795]: (phoenix 1.4.17) lib/phoenix/endpoint/render_errors.ex:62: Phoenix.Endpoint.RenderErrors.__catch__/5
Aug 31 18:50:55 web pleroma[1770795]: (phoenix 1.4.17) lib/phoenix/endpoint/cowboy2_handler.ex:42: Phoenix.Endpoint.Cowboy2Handler.init/4
Aug 31 18:50:55 web pleroma[1770795]: (cowboy 2.8.0) /builds/pleroma/pleroma/deps/cowboy/src/cowboy_handler.erl:37: :cowboy_handler.execute/2
Aug 31 18:50:55 web pleroma[1770795]: (cowboy 2.8.0) /builds/pleroma/pleroma/deps/cowboy/src/cowboy_stream_h.erl:300: :cowboy_stream_h.execute/3
Aug 31 18:50:55 web pleroma[1770795]: (cowboy 2.8.0) /builds/pleroma/pleroma/deps/cowboy/src/cowboy_stream_h.erl:291: :cowboy_stream_h.request_process/3
Aug 31 18:50:55 web pleroma[1770795]: (stdlib 3.12.1) proc_lib.erl:249: :proc_lib.init_p_do_apply/3
Aug 31 18:50:55 web pleroma[1770795]: 18:50:55.379 request_id=FjB_UWq6AKZ32wwACOGh [error] Internal server error: %UndefinedFunctionError{arity: 1, function: :__should_log__, message: nil, module: Logger, reason: nil}
Aug 31 18:50:55 web pleroma[1770795]: 18:50:55.379 request_id=FjB_UWq6AKZ32wwACOGh [info] Converted error :undef to 500 response
Aug 31 18:50:55 web pleroma[1770795]: 18:50:55.387 [error] #PID<0.608.2> running Pleroma.Web.Endpoint (connection #PID<0.607.2>, stream id 1) terminated
Aug 31 18:50:55 web pleroma[1770795]: Server: nth.io:80 (http)
Aug 31 18:50:55 web pleroma[1770795]: Request: POST /inbox
Aug 31 18:50:55 web pleroma[1770795]: ** (exit) an exception was raised:
Aug 31 18:50:55 web pleroma[1770795]: ** (FunctionClauseError) no function clause matching in Plug.Conn.resp/3
Aug 31 18:50:55 web pleroma[1770795]: (plug 1.10.4) lib/plug/conn.ex:580: Plug.Conn.resp(%Plug.Conn{adapter: {Plug.Cowboy.Conn, :...}, assigns: %{digest: "SHA-256=8iICvmYfjON4jCO3HByHyC5hL9PiTzOFn7mcEC5t+L8=", kind: :error, layout: false, locale: "en", reason: %UndefinedFunctionError{arity: 1, function: :__should_log__, message: nil, module: Logger, reason: nil}, remote_ip_found: true, stack: [{Logger, :__should_log__, [:debug], []}, {HTTPSignatures, :validate, 3, [file: 'lib/http_signatures/http_signatures.ex', line: 31]}, {HTTPSignatures, :validate_conn, 1, [file: 'lib/http_signatures/http_signatures.ex', line: 41]}, {Pleroma.Web.Plugs.HTTPSignaturePlug, :maybe_assign_valid_signature, 1, [file: 'lib/pleroma/plugs/http_signature.ex', line: 42]}, {Pleroma.Web.Plugs.HTTPSignaturePlug, :call, 2, [file: 'lib/pleroma/plugs/http_signature.ex', line: 21]}, {Pleroma.Web.Router, :http_signature, 2, []}, {Pleroma.Web.Router, :activitypub, 2, []}, {Pleroma.Web.Router, :__pipe_through12__, 1, [file: 'lib/pleroma/web/router.ex', line: 5]}], status: 500}, before_send: [#Function<0.49113890/1 in Pleroma.Web.Endpoint.PipelineInstrumenter.call/2>, #Function<1.129014997/1 in Plug.Logger.call/2>], body_params: %{"@context" => ["https://www.w3.org/ns/activitystreams", "https://queer.hacktivis.me/schemas/litepub-0.1.jsonld", %{"@language" => "und"}], "actor" => "https://queer.hacktivis.me/users/lanodan", "cc" => [], "context" => "https://shitposter.club/contexts/bec9f802-b7e4-4d80-b44c-13eee6626fb8", "id" => "https://queer.hacktivis.me/activities/9db3e8a0-9d09-41ce-954f-3b1e87b915a8", "object" => "https://shitposter.club/objects/587d5c6a-67cd-4b59-a232-29ee37c7d804", "published"```