Admin-FE: Cannot load Frontend pane - Internal Server Error

Hi all,

Recently noticed this problem with my instance and am unsure what’s causing it.

I wanted to go download & install the mastodon-fe, but noticed that when opening the Frontend panel from Admin-FE, it returned the following error:

Looking at the Akkoma logs, it seems to have crashed on an exception, not sure how to fix this:

Dec 23 12:54:10 tuxzone akkoma: request_id=FzN9qK26mrOwaDoAApgS [error] Internal server error: %BadMapError{term: "dist"}
Dec 23 12:54:10 tuxzone akkoma: [error] #PID<0.5.6> running Pleroma.Web.Endpoint (connection #PID<0.4.6>, stream id 1) terminated#012Server: tuxz.one:80 (http)#012Request: GET /api/pleroma/admin/frontends#012** (exit) an exception was raised:#012    ** (BadMapError) expected a map, got: "dist"#012        (pleroma 3.5.0-0-gd9508474b) lib/pleroma/web/admin_api/controllers/frontend_controller.ex:25: anonymous fn/2 in Pleroma.Web.AdminAPI.FrontendController.index/2#012        (elixir 1.14.2) lib/enum.ex:1662: anonymous fn/3 in Enum.map/2#012        (stdlib 4.1.1) maps.erl:411: :maps.fold_1/3#012        (elixir 1.14.2) lib/enum.ex:2480: Enum.map/2#012        (pleroma 3.5.0-0-gd9508474b) lib/pleroma/web/admin_api/controllers/frontend_controller.ex:24: Pleroma.Web.AdminAPI.FrontendController.index/2#012        (pleroma 3.5.0-0-gd9508474b) lib/pleroma/web/admin_api/controllers/frontend_controller.ex:5: Pleroma.Web.AdminAPI.FrontendController.action/2#012        (pleroma 3.5.0-0-gd9508474b) lib/pleroma/web/admin_api/controllers/frontend_controller.ex:5: Pleroma.Web.AdminAPI.FrontendController.phoenix_controller_pipeline/2#012        (phoenix 1.6.15) lib/phoenix/router.ex:354: Phoenix.Router.__call__/2

May you please advise? Any assistance is much appreciated.

Thank you.

Mine looks like this using OTP, not sure why yours would look like that. :woozy_face:

I believe you should use fedibird and not mastoFE on Akkoma.

how in the heck did you get dist in your :frontends, :available config?

please check your config.exs to see if you’ve put anything weird in :frontends, :available, and check that it hasn’t gotten that into the db somehow with the following task:

https://docs.akkoma.dev/stable/administration/CLI_tasks/config/#dump-the-saved-configuration-values-for-a-specific-group-or-key

Ah I see, thanks for your response, much appreciated.

I dumped the DB config and not sure if this is correct, something looks off but not sure what. I noticed this issue after restoring my Akkoma installation, could it have been a corrupted restore?

Here’s the output:

config :pleroma, :frontends, [available: %{"admin-fe" => %{"build_url" => "https://akkoma-updates.s3-website.fr-par.scw.cloud/frontend/${ref}/admin-fe.zip", "git" => "https://akkoma.dev/AkkomaGang/admin-fe", "name" => "admin-fe", "ref" => "stable"}, "build_dir" => "dist", "build_url" => "https://github.com/BDX-town/Mangane/releases/latest/download/static.zip", "fedibird-fe" => %{"build_dir" => "distribution", "build_url" => "https://akkoma-updates.s3-website.fr-par.scw.cloud/frontend/${ref}/fedibird-fe.zip", "git" => "https://akkoma.dev/AkkomaGang/fedibird-fe", "name" => "fedibird-fe", "ref" => "akkoma"}, "git" => "", "mastodon-fe" => %{"build_dir" => "distribution", "build_url" => "https://akkoma-updates.s3-website.fr-par.scw.cloud/frontend/${ref}/masto-fe.zip", "git" => "https://akkoma.dev/AkkomaGang/masto-fe", "name" => "mastodon-fe", "ref" => "akkoma"}, "name" => "mangane", "pleroma-fe" => %{"build_dir" => "dist", "build_url" => "https://akkoma-updates.s3-website.fr-par.scw.cloud/frontend/${ref}/akkoma-fe.zip", "git" => "https://akkoma.dev/AkkomaGang/pleroma-fe", "name" => "pleroma-fe", "ref" => "stable"}, "ref" => "dist", "soapbox-fe" => %{"build_dir" => "static", "build_url" => "https://gitlab.com/soapbox-pub/soapbox/-/jobs/artifacts/${ref}/download?job=build-production", "git" => "https://gitlab.com/soapbox-pub/soapbox", "name" => "soapbox-fe", "ref" => "v2.0.0"}, "swagger-ui" => %{"build_dir" => "dist", "build_url" => "https://akkoma-updates.s3-website.fr-par.scw.cloud/frontend/swagger-ui.zip", "git" => "https://github.com/swagger-api/swagger-ui", "name" => "swagger-ui", "ref" => "stable"}}, mastodon: %{"name" => "mastodon-fe", "ref" => "akkoma"}, primary: %{"name" => "mangane", "ref" => "dist"}]

I did install was the Mangane-FE (fork of Soapbox-FE) and this was the configuration I used in Admin-FE:

Previously, I didn’t encounter this issue when I first installed Mangane-FE, this issue seems to have only occurred after I restored Akkoma from the DB backup. Could the backup & restore may have caused this error?

Thanks!

something is horrendously wrong with the config in whatever that mangane thing is
how did it do that to your map
delete it from your DB and make sure the data structure is actually correct

please note that installing unsupported frontends is in inherently technical task and you will be expected to solve issues that arise from it, the project as a whole will not provide assistance for things we don’t support

Hi @FloatingGhost,

Thanks for the response, much appreciated. Noted that it is an unsupported FE, will be more careful going forward.

For removing the FE clean from the config database, do I just run the following command:

./bin/pleroma_ctl config delete frontends

and then would it rebuild the default tables back or is there something else I would need to do to get back to “factory defaults”?

Thanks!

yeah just running that delete task should be all you need

the default config will take over from there (provided your config.exs doesn’t set the same thing)