[SOLVED] Internal error, on initial setup of Freedombox

If you are asking for support for an issue, please include the following information at the top of your post:

  • Whether your FreedomBox is plugged into a router at home or not (if not, please specify how it is connected to the internet)

The FreedomBox is plugged into a router.

  • The month and year you bought your kit (feel free to omit if you want to preserve some privacy, but this could be helpful information)

Bought very recently.

  • The version of FreedomBox your are running (available by clicking on the “?” in the top menu → “About”)

FreedomBox version 23.18
Debian GNU/Linux 12

During the setup after creating an account, I choose the recommended DMZ option during the setup. As per requested I created an static IP address in router settings and enabled DMZ to that address.

I then get:
"500 Internal error
at the page:
https://freedombox.local/plinth/sys/networks/firstboot/internet-connection-type/

It comes with a suggestion to use the reporting system on gitlab, but salsa gitlab does not support the creation of accounts not within the domain(?). I therefore come here for help.

In the logs we can read the following:

Summary
Oct 25 06:37:51 freedombox /usr/bin/plinth[515]: Updating network topology type with value to_router
Oct 25 06:40:47 freedombox /usr/bin/plinth[515]: Updating router configuration: dmz
Oct 25 06:40:48 freedombox /usr/bin/plinth[515]: Internal Server Error: /plinth/sys/networks/firstboot/internet-connection-type/

and

Oct 25 07:53:28 freedombox /usr/bin/plinth[515]: AXES: Successful login by {ip_address: "X", path_info: "/accounts/login/"}.
Oct 25 07:53:28 freedombox /usr/bin/plinth[515]: AXES: Reset 0 access attempts from database.
Oct 25 07:53:28 freedombox /usr/bin/plinth[515]: AXES: Deleted 0 failed login attempts by {ip_address: "x", path_info: "/accounts/login/"} from database.
Oct 25 07:53:28 freedombox /usr/bin/plinth[515]: # sso..generate_ticket(…) 
Oct 25 07:53:28 freedombox sudo[6212]:   plinth : PWD=/ ; USER=root ; COMMAND=/usr/share/plinth/actions/actions sso generate_ticket --write-fd 17
Oct 25 07:53:28 freedombox sudo[6212]: pam_unix(sudo:session): session opened for user root(uid=0) by (uid=110)
Oct 25 07:53:31 freedombox sudo[6212]: pam_unix(sudo:session): session closed for user root
Oct 25 07:53:32 freedombox /usr/bin/plinth[515]: Internal Server Error: /plinth/sys/networks/firstboot/internet-connection-type/
       

and

Oct 25 08:02:35 freedombox /usr/bin/plinth[515]: Internal Server Error: /plinth/sys/networks/firstboot/internet-connection-type/
                                                 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 170, in render
                                                     return self._render(context)
                                                            ^^^^^^^^^^^^^^^^^^^^^
                                                   File "/usr/lib/python3/dist-packages/django/template/base.py", line 162, in _render
                                                     return self.nodelist.render(context)
                                                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                                                   File "/usr/lib/python3/dist-packages/django/template/base.py", line 938, in render
                                                     bit = node.render_annotated(context)
                                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                                                   File "/usr/lib/python3/dist-packages/django/template/base.py", line 905, in render_annotated
                                                     return self.render(context)
                                                            ^^^^^^^^^^^^^^^^^^^^
                                                   File "/usr/lib/python3/dist-packages/django/template/loader_tags.py", line 150, in render
                                                     return compiled_parent._render(context)
                                                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                                                   File "/usr/lib/python3/dist-packages/django/template/base.py", line 162, in _render
                                                     return self.nodelist.render(context)
                                                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                                                   File "/usr/lib/python3/dist-packages/django/template/base.py", line 938, in render
                                                     bit = node.render_annotated(context)
                                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                                                   File "/usr/lib/python3/dist-packages/django/template/base.py", line 905, in render_annotated
                                                     return self.render(context)
                                                            ^^^^^^^^^^^^^^^^^^^^
                                                   File "/usr/lib/python3/dist-packages/django/template/loader_tags.py", line 150, in render
                                                     return compiled_parent._render(context)
                                                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                                                   File "/usr/lib/python3/dist-packages/django/template/base.py", line 162, in _render
                                                     return self.nodelist.render(context)
                                                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                                                   File "/usr/lib/python3/dist-packages/django/template/base.py", line 938, in render
                                                     bit = node.render_annotated(context)
                                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                                                   File "/usr/lib/python3/dist-packages/django/template/base.py", line 905, in render_annotated
                                                     return self.render(context)
                                                            ^^^^^^^^^^^^^^^^^^^^
                                                   File "/usr/lib/python3/dist-packages/django/template/loader_tags.py", line 62, in render
                                                     result = block.nodelist.render(context)
                                                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                                                   File "/usr/lib/python3/dist-packages/django/template/base.py", line 938, in render
                                                     bit = node.render_annotated(context)
                                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                                                   File "/usr/lib/python3/dist-packages/django/template/base.py", line 905, in render_annotated
                                                     return self.render(context)
                                                            ^^^^^^^^^^^^^^^^^^^^
                                                   File "/usr/lib/python3/dist-packages/django/template/loader_tags.py", line 62, in render
                                                     result = block.nodelist.render(context)
                                                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                                                   File "/usr/lib/python3/dist-packages/django/template/base.py", line 938, in render
                                                     bit = node.render_annotated(context)
                                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                                                   File "/usr/lib/python3/dist-packages/django/template/base.py", line 905, in render_annotated
                                                     return self.render(context)
                                                            ^^^^^^^^^^^^^^^^^^^^
                                                   File "/usr/lib/python3/dist-packages/django/template/loader_tags.py", line 62, in render
                                                     result = block.nodelist.render(context)
                                                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                                                   File "/usr/lib/python3/dist-packages/django/template/base.py", line 938, in render
                                                     bit = node.render_annotated(context)
                                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                                                   File "/usr/lib/python3/dist-packages/django/template/base.py", line 905, in render_annotated
                                                     return self.render(context)
                                                            ^^^^^^^^^^^^^^^^^^^^
                                                   File "/usr/lib/python3/dist-packages/django/template/base.py", line 988, in render
                                                     output = self.filter_expression.resolve(context)
                                                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                                                   File "/usr/lib/python3/dist-packages/django/template/base.py", line 698, in resolve
                                                     new_obj = func(obj, *arg_vals)
                                                               ^^^^^^^^^^^^^^^^^^^^
                                                   File "/usr/lib/python3/dist-packages/bootstrapform/templatetags/bootstrap.py", line 14, in bootstrap
                                                     return render(element, markup_classes)
                                                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                                                   File "/usr/lib/python3/dist-packages/bootstrapform/templatetags/bootstrap.py", line 82, in render
                                                     return template.render(context)
                                                            ^^^^^^^^^^^^^^^^^^^^^^^^
                                                   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 170, in render
                                                     return self._render(context)
                                                            ^^^^^^^^^^^^^^^^^^^^^
                                                   File "/usr/lib/python3/dist-packages/django/template/base.py", line 162, in _render
                                                     return self.nodelist.render(context)
                                                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                                                   File "/usr/lib/python3/dist-packages/django/template/base.py", line 938, in render
                                                     bit = node.render_annotated(context)
                                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                                                   File "/usr/lib/python3/dist-packages/django/template/base.py", line 905, in render_annotated
                                                     return self.render(context)
                                                            ^^^^^^^^^^^^^^^^^^^^
                                                   File "/usr/lib/python3/dist-packages/django/template/defaulttags.py", line 214, in render
                                                     nodelist.append(node.render_annotated(context))
                                                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                                                   File "/usr/lib/python3/dist-packages/django/template/base.py", line 905, in render_annotated
                                                     return self.render(context)
                                                            ^^^^^^^^^^^^^^^^^^^^
                                                   File "/usr/lib/python3/dist-packages/django/template/loader_tags.py", line 195, in render
                                                     return template.render(context)
                                                            ^^^^^^^^^^^^^^^^^^^^^^^^
                                                   File "/usr/lib/python3/dist-packages/django/template/base.py", line 172, in render
                                                     return self._render(context)
                                                            ^^^^^^^^^^^^^^^^^^^^^
                                                   File "/usr/lib/python3/dist-packages/django/template/base.py", line 162, in _render
                                                     return self.nodelist.render(context)
                                                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                                                   File "/usr/lib/python3/dist-packages/django/template/base.py", line 938, in render
                                                     bit = node.render_annotated(context)
                                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                                                   File "/usr/lib/python3/dist-packages/django/template/base.py", line 905, in render_annotated
                                                     return self.render(context)
                                                            ^^^^^^^^^^^^^^^^^^^^
                                                   File "/usr/lib/python3/dist-packages/django/template/defaulttags.py", line 315, in render
                                                     return nodelist.render(context)
                                                            ^^^^^^^^^^^^^^^^^^^^^^^^
                                                   File "/usr/lib/python3/dist-packages/django/template/base.py", line 938, in render
                                                     bit = node.render_annotated(context)
                                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                                                   File "/usr/lib/python3/dist-packages/django/template/base.py", line 905, in render_annotated
                                                     return self.render(context)
                                                            ^^^^^^^^^^^^^^^^^^^^
                                                   File "/usr/lib/python3/dist-packages/django/template/defaulttags.py", line 214, in render
                                                     nodelist.append(node.render_annotated(context))
                                                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                                                   File "/usr/lib/python3/dist-packages/django/template/base.py", line 905, in render_annotated
                                                     return self.render(context)
                                                            ^^^^^^^^^^^^^^^^^^^^
                                                   File "/usr/lib/python3/dist-packages/django/template/base.py", line 994, in render
                                                     return render_value_in_context(output, context)
                                                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                                                   File "/usr/lib/python3/dist-packages/django/template/base.py", line 973, in render_value_in_context
                                                     value = str(value)
                                                             ^^^^^^^^^^
                                                   File "/usr/lib/python3/dist-packages/django/utils/functional.py", line 140, in __text_cast
                                                     return func(*self.__args, **self.__kw)
                                                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                                                   File "/usr/lib/python3/dist-packages/plinth/utils.py", line 38, in _format_lazy
                                                     string = string.format(*args, **kwargs)
                                                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                                                 KeyError: 'box_name'
Oct 25 08:02:40 freedombox /usr/bin/plinth[515]: # help..get_logs(…) 
Oct 25 08:02:40 freedombox sudo[6353]:   plinth : PWD=/ ; USER=root ; COMMAND=/usr/share/plinth/actions/actions help get_logs --write-fd 17
Oct 25 08:02:40 freedombox sudo[6353]: pam_unix(sudo:session): session opened for user root(uid=0) by (uid=110)

The internal server error just keeps repeating

How should I proceed? Flash a new image onto the SD card?

Hi,

Thank you for the detailed report.

As a workaround, please skip this wizard step (and set it up later in the System → Networks page).

FreedomBox version 24.22 (will be available to all users in a few days), drops this wizard step altogether.

You can create an account on Debian’s Salsa server using any email address. Also, once I confirm the bug, I will create the issue on the issue tracker.

I found that a string translation for Norwegian Bokmål was incorrectly translated leading to this problem. I have temporarily marked this string as not translated to fix this issue. If you are speaker of this language please update the translation here. See my comment there.

The next release of FreedomBox will contain this fix. For now, you can change the language to another language to work around and access this wizard page from Networks.

Thanks for the update.

The issue fixed itself after a nights wait.