Apps page won't load.. my fault please help

So I was trying to install a custom app and stupidly edited the yaml file to only have an ‘a’ in it and then hit save. My apps page now won’t display any apps and returns an error.

I’ve since been trouble shooting and probably made it worse by doing the following:

  • Deleted “jellystat” the custom app via midclt call app.delete ‘[“jellystat”]’.
  • The error persists but then seemingly points to the new 16th app (“portainer”).
  • Rebooted. (Didn’t fix)
  • Deleted “portainer” via midclt call app.delete ‘[“portainer”]’.
  • The error still persists and still points to index .15…

This is the error that displays when loading the apps page (It used to specify a different app at the bottom before deleting both jellystat and portainer):

Traceback (most recent call last):
File “/usr/lib/python3/dist-packages/middlewared/api/base/server/ws_handler/rpc.py”, line 323, in process_method_call
result = await method.call(app, params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/lib/python3/dist-packages/middlewared/api/base/server/method.py”, line 49, in call
return await self._dump_result(app, methodobj, result)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/lib/python3/dist-packages/middlewared/api/base/server/method.py”, line 52, in _dump_result
return self.middleware.dump_result(self.serviceobj, methodobj, app, result)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/lib/python3/dist-packages/middlewared/main.py”, line 791, in dump_result
return serialize_result(new_style_returns_model, result, expose_secrets)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/lib/python3/dist-packages/middlewared/api/base/handler/result.py”, line 13, in serialize_result
return model(result=result).model_dump(
^^^^^^^^^^^^^^^^^^^^
File “/usr/lib/python3/dist-packages/pydantic/main.py”, line 212, in init
validated_self = self.pydantic_validator.validate_python(data, self_instance=self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
pydantic_core._pydantic_core.ValidationError: 3 validation errors for AppQueryResult
result.list[AppQueryResultItem].2.config
Input should be a valid dictionary [type=dict_type, input_value=‘a’, input_type=str]
For further information visit http ://errors.pydantic.dev/2.9/v/dict_type
result.AppQueryResultItem
Input should be a valid dictionary or instance of AppQueryResultItem [type=model_type, input_value=[{‘name’: ‘jellyfin’, 'id…‘type’: ‘host_path’}}}}], input_type=list]
For further information visit http ://errors.pydantic.dev/2.9/v/model_type
result.int
Input should be a valid integer [type=int_type, input_value=[{‘name’: ‘jellyfin’, 'id…‘type’: ‘host_path’}}}}], input_type=list]
For further information visit http ://errors.pydantic.dev/2.9/v/int_type

This is the short error at the top of the same popup:

3 validation errors for AppQueryResult result.list[AppQueryResultItem].2.config Input should be a valid dictionary [type=dict_type, input_value=‘a’, input_type=str] For further information visit Redirecting... result.AppQueryResultItem Input should be a valid dictionary or instance of AppQueryResultItem [type=model_type, input_value=[{‘name’: ‘prowlarr’, 'id…‘type’: ‘host_path’}}}}], input_type=list] For further information visit Redirecting... result.int Input should be a valid integer [type=int_type, input_value=[{‘name’: ‘prowlarr’, 'id…‘type’: ‘host_path’}}}}], input_type=list] For further information visit Redirecting...

Any help would be greatly appreciated!

It’s only partially your fault. Really there should be proper validation for this, I have no idea why this is a failure point. Will raise a ticket for this.

I reproduced the issue and fixed like so:

midclt call app.update my-app-name '{"custom_compose_config": {"services": {"hello-world": {"image": "hello-world:latest", "container_name": "hello-world", "restart": "unless-stopped"}}}}'

Replace my-app-name with the name of your app.

2 Likes

Thank you for the quick response @essinghigh ! Is the name of the app the broken custom one or the one appearing in the error?

Nevermind it was the name of the original broken app. Thanks so much for your help, what a relief to get everything back up and running again!

25.10 PR merged to add proper validation for this: NAS-135782 / 25.10 / Fix app edit custom YAML failure cases by essinghigh · Pull Request #16481 · truenas/middleware · GitHub :slight_smile: