backups: Upload and Restore fails with "No such file or directory"
FreedomBox 25.12 on Trixie VM.
The backups functional test "test_download_upload_restore" is failing, and I see these errors in the logs:
Sep 27 00:17:26 mybox /usr/bin/plinth[955]: » backups..add_uploaded_archive("tmpueh_6wca.tar.gz", "/var/tmp/tmp9xdratx7.upload.gz")
Sep 27 00:17:26 mybox /usr/bin/plinth[955]: Error running action backups..add_uploaded_archive("tmpueh_6wca.tar.gz", "/var/tmp/tmp9xdratx7.upload.gz"): FileNotFoundError(2, "No such file or directory")
Action traceback:
╞ File "/usr/lib/python3/dist-packages/plinth/actions.py", line 499, in _privileged_call
╞ return_values = func(*arguments['args'], **arguments['kwargs'])
╞ File "/usr/lib/python3/dist-packages/plinth/modules/backups/privileged.py", line 267, in add_uploaded_archive
╞ action_utils.move_uploaded_file(temporary_file_path, BACKUPS_UPLOAD_PATH,
╞ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
╞ file_name, allow_overwrite=True,
╞ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
╞ permissions=0o600)
╞ ^^^^^^^^^^^^^^^^^^
╞ File "/usr/lib/python3/dist-packages/plinth/action_utils.py", line 786, in move_uploaded_file
╞ source = source.resolve(strict=True)
╞ File "/usr/lib/python3.13/pathlib/_local.py", line 672, in resolve
╞ return self.with_segments(os.path.realpath(self, strict=strict))
╞ ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^
╞ File "<frozen posixpath>", line 454, in realpath
Sep 27 00:17:26 mybox /usr/bin/plinth[955]: Error processing page. GET /plinth/sys/backups/restore-from-upload/, exception: stat: path should be string, bytes, os.PathLike or integer, not NoneType
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/django/core/handlers/base.py", line 197, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/usr/lib/python3/dist-packages/django/views/generic/base.py", line 105, in view
return self.dispatch(request, *args, **kwargs)
~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/django/views/generic/base.py", line 144, in dispatch
return handler(request, *args, **kwargs)
File "/usr/lib/python3/dist-packages/plinth/modules/backups/views.py", line 253, in get
if not os.path.isfile(path):
~~~~~~~~~~~~~~^^^^^^
File "<frozen genericpath>", line 39, in isfile
TypeError: stat: path should be string, bytes, os.PathLike or integer, not NoneType
I can also reproduce this by manually downloading a backup, then trying to upload and restore it.