A dict was expected - every app update gives this error

Hi all,

Anyone having issues regarding apps updates? (every app…?)
(ElectricEel-24.10.1)

I get these messages, for every app while trying to update through GUI:

 Error: Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/middlewared/job.py", line 509, in run
    await self.future
  File "/usr/lib/python3/dist-packages/middlewared/job.py", line 556, in __run_body
    rv = await self.middleware.run_in_thread(self.method, *args)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/middlewared/main.py", line 1367, 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 1364, 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/schema/processor.py", line 183, in nf
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/middlewared/schema/processor.py", line 55, in nf
    res = f(*args, **kwargs)
          ^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/middlewared/plugins/apps/upgrade.py", line 75, in upgrade
    new_values = self.middleware.call_sync(
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/middlewared/main.py", line 1654, in call_sync
    return self.run_coroutine(methodobj(*prepared_call.args))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/middlewared/main.py", line 1694, 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 34, in normalize_and_validate_values
    dict_obj = await self.middleware.call(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/middlewared/main.py", line 1629, in call
    return await self._call(
           ^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/middlewared/main.py", line 1460, 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.network.web_port: A dict was expected
[EINVAL] values.network.ws_enabled: Field was not expected
[EINVAL] values.network.ws_port: Field was not expected

So is the update button broken?

Because i have network connection:

For apps to update again you have to be at least on 24.10.2.2

2 Likes

I missed this, thank you very much!

I’m on 24.10.2.2 and some apps still fail to update…

Which apps, and what exactly is the error message you receive?

I do not have a huge number of apps running, but Plex, PiHole, NetData, HomeWizard, VaultWarden, SyncThing, … updated through GUI without a hich.

I currently only have two installed: omada-controller and wg-easy.

On 24.10.2.1 both failed with a few “Error: Network”, some about “A dict was expected” and some about “Field was not expected”.

After upgrading to 24.10.2.2 I was able to upgrade omada-controller, but wg-easy still failed with the same errors.

In the meanwhile I deleted wg-easy and reinstalled, but it’s not deploying… When I start it it stays on “Deploying” indefinitely…

Sometimes i encounter the same behaviour. I have this with apps running on a SMB shared folder. I ‘fix’ this disabling the SMB shares, stop/start app, update, restart shares.

Looking at wg-easy app logs the problem seems to be related to ipv6:

$ wg-quick up wg0
[unhandledRejection] Error: Command failed: wg-quick up wg0
[#] ip link add wg0 type wireguard
[#] wg setconf wg0 /dev/fd/63
[#] ip -4 address add 10.8.0.1/24 dev wg0
[#] ip -6 address add fdcc:ad94:bacf:61a4::cafe:1/112 dev wg0
Error: ipv6: IPv6 is disabled on this device.

I’ve tried adding env. var DISABLE_IPV6 set to true on wg-easy configuration but it didn’t make a difference.

Can you remove that IPv6 address from the configuration? As long as it’s there it’s likely going to make wg-easy try to use IPv6.

I would if I knew how…

Just elaborate a bit more on this…
I tried editing /mnt/.ix-apps/app_mounts/wg-easy/config/wg0.conf but it’s pointless… when I deploy it, wg0.conf is regenerated with what is stored in wg-easy.db (sqlite3 db).

I can try to edit the db, but I think it won’t be easy… I can see the entry where ipv6 settings are referenced, but some of them are set to NOT NULL, so not sure if I’ll be able to remove ipv6 in any way…

This apparently is a known limitation of the most recent wg-easy version. Why they made ipv6 mandatory beats me, but looks like I’m not the first to complain…