Error when accessing /users/*/outbox
Hello and thanks for creating Pleroma!
I've setup my first instance recently and after following someone on Mastodon, I got following error in backend log:
[error] #PID<0.1026.0> running Pleroma.Web.Endpoint (cowboy_protocol) terminated
Server: fed.gated.space:80 (http)
Request: GET /users/xentec/outbox
** (exit) an exception was raised:
** (FunctionClauseError) no function clause matching in Plug.Conn.resp/3
(plug) lib/plug/conn.ex:530: Plug.Conn.resp(%Plug.Conn
{
adapter: {Plug.Adapters.Cowboy.Conn, :...},
assigns: %{kind: :error,
layout: false,
reason: %UndefinedFunctionError{arity: 0, function: :id, message: nil, module: nil, reason: nil},
stack: [
{nil, :id, [], []},
{Pleroma.Web.ActivityPub.UserView, :render, 2, [file: 'lib/pleroma/web/activity_pub/views/user_view.ex', line: 142]},
{Pleroma.Web.ActivityPub.ActivityPubController, :outbox, 2, [file: 'lib/pleroma/web/activity_pub/activity_pub_controller.ex', line: 82]},
{Pleroma.Web.ActivityPub.ActivityPubController, :action, 2, [file: 'lib/pleroma/web/activity_pub/activity_pub_controller.ex', line: 1]},
{Pleroma.Web.ActivityPub.ActivityPubController, :phoenix_controller_pipeline, 2, [file: 'lib/pleroma/web/activity_pub/activity_pub_controller.ex', line: 1]},
{Pleroma.Web.Endpoint, :instrument, 4, [file: 'lib/pleroma/web/endpoint.ex', line: 1]},
{Phoenix.Router, :__call__, 1, [file: 'lib/phoenix/router.ex', line: 278]},
{Pleroma.Web.Endpoint, :plug_builder_call, 2, [file: 'lib/pleroma/web/endpoint.ex', line: 1]}
]},
before_send: [#Function<1.97586355/1 in Plug.Logger.call/2>],
body_params: %{},
cookies: %Plug.Conn.Unfetched{aspect: :cookies},
halted: false,
host: "fed.gated.space",
method: "GET",
owner: #PID<0.1026.0>,
params: %{"nickname" => "xentec"},
path_info: ["users", "xentec", "outbox"],
path_params: %{"nickname" => "xentec"},
peer: {{10, 8, 2, 21}, 50614}, port: 80,
private: %{
Pleroma.Web.Router => {[], %{}},
:phoenix_action => :outbox,
:phoenix_controller => Pleroma.Web.ActivityPub.ActivityPubController,
:phoenix_endpoint => Pleroma.Web.Endpoint,
:phoenix_format => "activity+json",
:phoenix_layout => false,
:phoenix_pipelines => [:ostatus],
:phoenix_router => Pleroma.Web.Router,
:phoenix_template => "500.activity+json",
:phoenix_view => Pleroma.Web.ErrorView,
:plug_session_fetch => #Function<1.58261320/1 in Plug.Session.fetch_session/1>
},
query_params: %{},
query_string: "",
remote_ip: {10, 8, 2, 21},
req_cookies: %Plug.Conn.Unfetched{aspect: :cookies},
req_headers: [
{"connection", "upgrade"},
{"host", "fed.gated.space"},
{"content-length", "0"},
{"user-agent", "http.rb/3.2.0 (Mastodon/2.4.3; +https://cmpwn.com/)"},
{"date", "Tue, 04 Sep 2018 00:39:58 GMT"},
{"accept-encoding", "gzip"},
{"accept", "application/activity+json, application/ld+json"}
],
request_path: "/users/xentec/outbox", resp_body: nil, resp_cookies: %{},
resp_headers: [
{"content-type", "application/activity+json; charset=utf-8"},
{"cache-control", "max-age=0, private, must-revalidate"},
{"x-request-id", "2l8gn0bod4mi9gssu80002fi"}
],
scheme: :http,
script_name: [],
secret_key_base: "<secret>",
state: :unset,
status: 500
},
500, %{errors: %{detail: "Internal server error"}})
(plug) lib/plug/conn.ex:520: Plug.Conn.send_resp/3
(phoenix) lib/phoenix/endpoint/render_errors.ex:56: Phoenix.Endpoint.RenderErrors.__catch__/5
(plug) lib/plug/adapters/cowboy/handler.ex:16: Plug.Adapters.Cowboy.Handler.upgrade/4
(cowboy) /home/xentec/pleroma/deps/cowboy/src/cowboy_protocol.erl:442: :cowboy_protocol.execute/4
Pleroma runs on an isolated Alpine Linux machine [BE] where another one is a reverse proxy [RP]. While RP has TLS enabled, the communication between them is plain http.
I hope this is an easy fix.