Nextcloud update failed

Nextcloud app won’t update to 2.1.1. The error is the following:

Traceback (most recent call last):

  • File “/usr/lib/python3/dist-packages/middlewared/job.py”, line 515, in run*
  • await self.future*
  • File “/usr/lib/python3/dist-packages/middlewared/job.py”, line 562, in __run_body*
  • rv = await self.middleware.run_in_thread(self.method, args)
  •     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*
    
  • File “/usr/lib/python3/dist-packages/middlewared/main.py”, line 627, in run_in_thread*
  • return await self.run_in_executor(io_thread_pool_executor, method, *args, *kwargs)
  •       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*
    
  • File “/usr/lib/python3/dist-packages/middlewared/main.py”, line 624, in run_in_executor*
  • return await loop.run_in_executor(pool, functools.partial(method, *args, *kwargs))
  •       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*
    
  • File “/usr/lib/python3.11/concurrent/futures/thread.py”, line 58, in run*
  • result = self.fn(*self.args, *self.kwargs)
  •         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*
    
  • File “/usr/lib/python3/dist-packages/middlewared/api/base/decorator.py”, line 101, in wrapped*
  • result = func(args)
  •         ^^^^^^^^^^^*
    
  • File “/usr/lib/python3/dist-packages/middlewared/plugins/apps/upgrade.py”, line 123, in upgrade*
  • new_values = self.middleware.call_sync(*
  •             ^^^^^^^^^^^^^^^^^^^^^^^^^^*
    
  • File “/usr/lib/python3/dist-packages/middlewared/main.py”, line 1030, in call_sync*
  • return self.run_coroutine(methodobj(prepared_call.args))
  •       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*
    
  • File “/usr/lib/python3/dist-packages/middlewared/main.py”, line 1070, in run_coroutine*
  • return fut.result()*
  •       ^^^^^^^^^^^^*
    
  • File “/usr/lib/python3.11/concurrent/futures/_base.py”, line 449, in result*
  • return self.__get_result()*
  •       ^^^^^^^^^^^^^^^^^^^*
    
  • File “/usr/lib/python3.11/concurrent/futures/_base.py”, line 401, in __get_result*
  • raise self._exception*
  • File “/usr/lib/python3/dist-packages/middlewared/plugins/apps/schema_normalization.py”, line 36, in normalize_and_validate_values*
  • dict_obj = await self.middleware.call(*
  •           ^^^^^^^^^^^^^^^^^^^^^^^^^^^*
    
  • File “/usr/lib/python3/dist-packages/middlewared/main.py”, line 1005, in call*
  • return await self._call(*
  •       ^^^^^^^^^^^^^^^^^*
    
  • File “/usr/lib/python3/dist-packages/middlewared/main.py”, line 720, in _call*
  • return await methodobj(prepared_call.args)
  •       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*
    
  • File “/usr/lib/python3/dist-packages/middlewared/plugins/apps/schema_validation.py”, line 37, in validate_values*
  • verrors.check()*
  • File “/usr/lib/python3/dist-packages/middlewared/service_exception.py”, line 72, in check*
  • raise self*
    middlewared.service_exception.ValidationErrors: [EINVAL] values.nextcloud.postgres_image_selector: Invalid choice: postgres_13_image

Current version of nextcloud is 2.0.37.
Version of Truenas Scale is 25.04.2.4.

Regards,
Sasa

My guess is that the newer version of nextcloud doesn’t support postgres 13 anymore and you have to udpate postgres to a newer version.
If you edit the app there should be a dropdown menu to choose a postgres version (if i’m not mistaken)

I have solved the issue. I had to edit app settings in truenas and changed postgres version from 13 to 17. Now the upgrade is working.

Thank you for the hint about posgres option setting.

2 Likes

Thanks for the tip, I had the same problem upgrading Nextcloud.