tomaae / homeassistant-openmediavault

OpenMediaVault integration for Home Assistant
Apache License 2.0
109 stars 15 forks source link

[Bug] Error loading integration #121

Closed mig77angel closed 1 year ago

mig77angel commented 1 year ago

Describe the issue

Error loading integration in homeassistant.

How to reproduce the issue

Software versions

Diagnostics data

Logger: homeassistant.config_entries
Source: custom_components/openmediavault/omv_controller.py:559
Integration: OpenMediaVault ([documentation](https://github.com/tomaae/homeassistant-openmediavault), [issues](https://github.com/tomaae/homeassistant-openmediavault/issues))
First occurred: 12:20:30 (1 occurrences)
Last logged: 12:20:30

Error setting up entry OMV for openmediavault
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 387, in async_setup
    result = await component.async_setup_entry(hass, self)
  File "/config/custom_components/openmediavault/__init__.py", line 35, in async_setup_entry
    await controller.async_update()
  File "/config/custom_components/openmediavault/omv_controller.py", line 203, in async_update
    await self.hass.async_add_executor_job(self.get_compose)
  File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/openmediavault/omv_controller.py", line 559, in get_compose
    if "data" not in tmp:
TypeError: argument of type 'NoneType' is not iterable
Logger: custom_components.openmediavault.omv_api
Source: custom_components/openmediavault/omv_api.py:302
Integration: OpenMediaVault ([documentation](https://github.com/tomaae/homeassistant-openmediavault), [issues](https://github.com/tomaae/homeassistant-openmediavault/issues))
First occurred: 12:20:30 (1 occurrences)
Last logged: 12:20:30

OpenMediaVault mydomain.edited unable to fetch data (500)

Additional context

It has been happening for a couple of versions, I can access omv perfectly through ssl and none of the options work when connecting, before it went well without changing anything.

tomaae commented 1 year ago

From what I know, it is most likely because you installed compose plugin in OMV and never configured it. It is using wrong error message type in that case.

mig77angel commented 1 year ago

From what I know, it is most likely because you installed compose plugin in OMV and never configured it. It is using wrong error message type in that case.

Hello, this plugin has already been running for a long time on my homeassistant.

tomaae commented 1 year ago

not sure what you mean by that

mig77angel commented 1 year ago

not sure what you mean by that

It has stopped working by itself, before it did work, maybe some omv update has been the problem.

I use nginx proxy manager to connect to omv, but that was still like this before and it worked fine, anyway it doesn't work using local ip and port either.

tomaae commented 1 year ago

I'm talking about OMV plugin "compose" that is causing issues for you. You have to configure it if you plan to use it, or just uninstall it if you dont, to make integration work properly.

mig77angel commented 1 year ago

I'm talking about OMV plugin "compose" that is causing issues for you. You have to configure it if you plan to use it, or just uninstall it if you dont, to make integration work properly.

Thanks, that has solved the problem, but I don't understand what that affects, but that's how it's solved, thanks.

tomaae commented 1 year ago

its just omv plugin reporting with wrong error code if its installed but not configured. nothing I can do there except removing compose support, which I probably will because of this issue.