Mastodon Frontend returns a 500 Error

hi! I installed mastodon-fe using this installer in the admin panel, but it seems like it’s broken for me and I don’t know where to start troubleshooting.

When I go to /web, I get redirected to OAuth flow, which I’d assume is normal. After approval, I’m redirected back to /web?access_token=... with an access token in the query parameters. This returns an empty body and an HTTP 500 error. I am unsure of where to go from here. I have tried restarting my instance in hopes of that fixing it, but it did not. I’m not sure how Akkoma stores logs to help with debugging this, as I could not find anything in the docs.

logs will be

  • if running from-source, in journald (systemctl status akkoma)
  • if running systemd+otp, the same as above
  • if running OTP bare (i.e with ./bin/pleroma daemon), tmp/log/erlang.log.1

i can’t say i’ve ever seen a 500 from that endpoint, so my hunch would be missing files or something, but check the log to find out

1 Like

I found the log for the request. I’m not familiar with Elixir, so I’m not sure what the issue is here.

Nov 09 14:09:35 akkoma pleroma[26235]: 14:09:35.972 request_id=<request id> [error] Internal server error: %FunctionClauseError{args: nil, arity: 3, clauses: nil, function: :get, kind: nil, module: Keyword}
Nov 09 14:09:35 akkoma pleroma[26235]: 14:09:35.974 [error] #PID<0.2421.3> running Pleroma.Web.Endpoint (connection #PID<0.2420.3>, stream id 1) terminated
Nov 09 14:09:35 akkoma pleroma[26235]: Server: akkoma.catgirlin.space:80 (http)
Nov 09 14:09:35 akkoma pleroma[26235]: Request: GET /web?access_token=<access token>
Nov 09 14:09:35 akkoma pleroma[26235]: ** (exit) an exception was raised:
Nov 09 14:09:35 akkoma pleroma[26235]:     ** (Protocol.UndefinedError) protocol Phoenix.HTML.Safe not implemented for %{errors: %{detail: "Internal server error"}} of type Map. This protocol is implemented for the following type(s): Atom, BitString, Date, DateTime, Decimal, Float, Integer, List, NaiveDateTime, Phoenix.HTML.Form, Phoenix.LiveComponent.CID, Phoenix.LiveView.Component, Phoenix.LiveView.Comprehension, Phoenix.LiveView.JS, Phoenix.LiveView.Rendered, Time, Tuple
Nov 09 14:09:35 akkoma pleroma[26235]:         (phoenix_html 3.2.0) lib/phoenix_html/safe.ex:1: Phoenix.HTML.Safe.impl_for!/1
Nov 09 14:09:35 akkoma pleroma[26235]:         (phoenix_html 3.2.0) lib/phoenix_html/safe.ex:15: Phoenix.HTML.Safe.to_iodata/1
Nov 09 14:09:35 akkoma pleroma[26235]:         (phoenix 1.6.11) lib/phoenix/controller.ex:772: Phoenix.Controller.render_and_send/4
Nov 09 14:09:35 akkoma pleroma[26235]:         (phoenix 1.6.11) lib/phoenix/endpoint/render_errors.ex:78: Phoenix.Endpoint.RenderErrors.instrument_render_and_send/5
Nov 09 14:09:35 akkoma pleroma[26235]:         (phoenix 1.6.11) lib/phoenix/endpoint/render_errors.ex:64: Phoenix.Endpoint.RenderErrors.__catch__/5
Nov 09 14:09:35 akkoma pleroma[26235]:         (phoenix 1.6.11) lib/phoenix/endpoint/cowboy2_handler.ex:54: Phoenix.Endpoint.Cowboy2Handler.init/4
Nov 09 14:09:35 akkoma pleroma[26235]:         (cowboy 2.9.0) /woodpecker/src/akkoma.dev/AkkomaGang/akkoma/deps/cowboy/src/cowboy_handler.erl:37: :cowboy_handler.execute/2
Nov 09 14:09:35 akkoma pleroma[26235]:         (cowboy 2.9.0) /woodpecker/src/akkoma.dev/AkkomaGang/akkoma/deps/cowboy/src/cowboy_stream_h.erl:306: :cowboy_stream_h.execute/3

Is there a way to force a reinstall to try fixing this?

ok I think I know what’s going on here

do you configure your instance via admin-fe? I’d assume so based on the usage here

can you make sure your “mastodon” section under “frontends” looks like the following (your one should say mastodon-fe instead of fedibird-fe)

for reference, a reinstall command (and the update command) can be found here: Managing frontends - Akkoma Documentation

I do have the same config shown in your screenshot, but with mastodon-fe. I also tried installing fedibird-fe and switching the Name field to fedibird-fe but it still does not work.

Not sure what I did, but after messing around with it more and a few restarts it’s now working!

oh, nice!
wonder why that was