500 error from plinth

Problem Description
I’ve done several things to my freedom box but the last thing I did was install mumble.
Afterwards I got a 500 error from plinth.
Since then I’ve tried reading the log, rebooting, and installing updates. these didn’t help.

Steps to Reproduce

  1. Open the root page (/plinth)
  2. 500 error displayed.

Expected Results
a FreedomBox login page without errors

Actual results
A 500 error.
login doesnt work.
If I go strait to cockpit that works.
the sharli app I installed also still works

Screenshot
" 500

This is an internal error and not something you caused or can fix. Please report the error on the bug tracker so we can fix it. Also, please attach the status log to the bug report."

Information

  • FreedomBox version: cant check but I ran updates so it should be latest
  • Hardware: rockpro64
  • How did you install FreedomBox?: downloaded image
    • Status Log link is not functional

What looks like is the error causing the page problem in the cockpit logs section, there are others

/usr/bin/plinth
Internal Server Error: /plinth/
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/django/core/handlers/exception.py", line 47, in inner
    response = get_response(request)
               ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/django/core/handlers/base.py", line 204, in _get_response
    response = response.render()
               ^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/django/template/response.py", line 105, in render
    self.content = self.rendered_content
                   ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/django/template/response.py", line 83, in rendered_content
    return template.render(context, self._request)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/django/template/backends/django.py", line 61, in render
    return self.template.render(context)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/django/template/base.py", line 168, in render
    with context.bind_template(self):
  File "/usr/lib/python3.11/contextlib.py", line 137, in __enter__
    return next(self.gen)
           ^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/django/template/context.py", line 244, in bind_template
    updates.update(processor(self.request))
                   ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/plinth/context_processors.py", line 26, in common
    notifications_context = Notification.get_display_context(
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/plinth/notification.py", line 353, in get_display_context
    'message': Notification._translate(note.message, data),
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/plinth/notification.py", line 289, in _translate
    string_ = SafeFormatter().vformat(string_, [], data)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/string.py", line 194, in vformat
    result, _ = self._vformat(format_string, args, kwargs, used_args, 2)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/string.py", line 241, in _vformat
    format_spec, auto_arg_index = self._vformat(
                                  ^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/string.py", line 241, in _vformat
    format_spec, auto_arg_index = self._vformat(
                                  ^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/string.py", line 241, in _vformat
    format_spec, auto_arg_index = self._vformat(
                                  ^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/string.py", line 201, in _vformat
    raise ValueError('Max string recursion exceeded')
ValueError: Max string recursion exceeded
CODE_ARGS ('Internal Server Error', '/plinth/')
CODE_FILE /usr/lib/python3/dist-packages/django/utils/log.py
CODE_FUNC log_response
CODE_LINE 224
EXCEPTION_INFO (<class 'ValueError'>, ValueError('Max string recursion exceeded'), <traceback object at 0xffff9823f8c0>)
EXCEPTION_TEXT duplicate info
LOGGER django.request
PRIORITY3
PROCESS_NAME MainProcess
SYSLOG_IDENTIFIER /usr/bin/plinth

Did you install mumble alone or was it part of several installs that happened together, in between which you didn’t leave and return to the web front end?

I think it was mumble alone.

If you SSH in, can you uninstall mumble?

Do you have any data you need to preserve?

no important data as yet.
I can use cockpit to get in. I’ll try to uninstall .

I used apt remove mumble-server
and then apt autoremove which removed
libavahi-compat-libdnssd1 libdouble-conversion3 libpcre2-16-0 libprotobuf32 libqt5core5a libqt5dbus5 libqt5network5 libqt5sql5 libqt5sql5-sqlite libqt5xml5 libzeroc-ice3.7 qttranslations5-l10n
but I still get a 500 on the plinth homepage

can you run systemctl, find the plinth service, and see if its running or in error?

Plinth is listed as running

I dug a little further.
The error message indicates that it is failing to properly format a notification for the UI
The last notification in the sqlite3 plinth notifications table is an error from installing the mumble server.

The error is

Error installing app: g-io-error-quark: GDBus.Error:org.fedoraproject.FirewallD1.Exception: COMMAND_FAILED: ‘python-nftables’ failed: internal:0:0-0: Error: No such file or directory; did you mean chain ‘filter_IN_external_allow’ in table inet ‘firewalld’?

internal:0:0-0: Error: No such file or directory; did you mean chain ‘filter_IN_external_allow’ in table inet ‘firewalld’?

followed by a json blob

Would it cause problems to delete this row from the table?

what is the json blob?

nftables is a backend service and firewalld a frontend UI to control it, as I recall.

As far as the row in table, either it was deleted or not created or not created w/ that name. A spelling error would cause the last case. A hiccup in installation could cause the middle case. As for the first case, deletion would imply there is a default that it might delete, then write new but perhaps failed.

jsonblob
{"nftables": [{"metainfo": {"json_schema_version": 1}}, {"add": {"rule": {"family": "inet", "table": "firewalld", "chain": "filter_IN_internal_allow", "expr": [{"match": {"left": {"payload": {"protocol": "tcp", "field": "dport"}}, "op": "==", "right": 64738}}, {"accept": null}]}}}, {"add": {"rule": {"family": "inet", "table": "firewalld", "chain": "filter_IN_internal_allow", "expr": [{"match": {"left": {"payload": {"protocol": "udp", "field": "dport"}}, "op": "==", "right": 64738}}, {"accept": null}]}}}]} (36)|[]|operation-notification.html|{"app_name": "Mumble", "app_icon": null, "app_icon_filename": "mumble", "state": "completed", "exception": "g-io-error-quark: GDBus.Error:org.fedoraproject.FirewallD1.Exception: COMMAND_FAILED: 'python-nftables' failed: internal:0:0-0: Error: No such file or directory; did you mean chain \u2018filter_IN_external_allow\u2019 in table inet \u2018firewalld\u2019?\n\ninternal:0:0-0: Error: No such file or directory; did you mean chain \u2018filter_IN_external_allow\u2019 in table inet \u2018firewalld\u2019?\n\n\nJSON blob:\n{\"nftables\": [{\"metainfo\": {\"json_schema_version\": 1}}, {\"add\": {\"rule\": {\"family\": \"inet\", \"table\": \"firewalld\", \"chain\": \"filter_IN_internal_allow\", \"expr\": [{\"match\": {\"left\": {\"payload\": {\"protocol\": \"tcp\", \"field\": \"dport\"}}, \"op\": \"==\", \"right\": 64738}}, {\"accept\": null}]}}}, {\"add\": {\"rule\": {\"family\": \"inet\", \"table\": \"firewalld\", \"chain\": \"filter_IN_internal_allow\", \"expr\": [{\"match\": {\"left\": {\"payload\": {\"protocol\": \"udp\", \"field\": \"dport\"}}, \"op\": \"==\", \"right\": 64738}}, {\"accept\": null}]}}}]} (36)", "name": "translate:Installing app"}

Since I see that formatting this message to display one the plinth page is whats is causing the page to fail to render. I’m asking if deleting the message from the table is safe.

Well, since you have no important data to preserve, why not? What’s the worst that happens?

If the error message is what’s freaking out Plinth, not the actual error itself, could be this problem isn’t really a problem anymore.

Well I tried and deleting the error did allow me to log in.
I’m not sure I’d call it fixed though. I’d like to install mumble but I can’t because of the error
I can use plinth again, so that is an improvement

Correction, I tried to install it again and it worked so I guess its at least not reproducible.

Someone might want to look into making the error from failing not lock up plinth, though

I opened an issue for it:

Thanks for reporting this.

your welcome, hope it helps :slight_smile:

Sweet. Glad you got going.