tomaae / homeassistant-openmediavault

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

[Bug] Unable to add device #72

Closed Dinth closed 2 years ago

Dinth commented 2 years ago

Describe the issue

As per the changelog, i have removed OMV from Devices, updated it to 1.2.1 via HACS and now im trying to re-add OMV device, but im getting an "Unknown error occurred" error.

I have tried removing the .omv_cookies file already

How to reproduce the issue

  1. Remove OMV from devices list in HA
  2. Update OMV to 1.2.0 and then again to 1.2.1
  3. Re-add OMV device in HA
  4. "Unknown error occured" error when adding the OMV server

    Screenshots

    Screenshot from 2022-03-10 09-34-53

Software versions

tomaae commented 2 years ago

can you check HA log? there may be more info. also try deleting browser cache, that is causing issue sometimes

Dinth commented 2 years ago

There's literally nothing in the log. I have tried emptying browser cache now but it didnt work.

One strange thing i have noticed is that after seeing "Unknown error occured", when i close the OMV configuration window, OMV actually shows up as "Not loaded" and when i try to add it again, im getting "Name in use" error Screenshot from 2022-03-10 10-20-03

Some kind of communication is definitely happening, because when i try to provide OMV integration with an incorrect password im seeing an incorrect password error, and if i use an non-admin account im also getting a different "Cannot connect to the server" error.

tomaae commented 2 years ago

I'm pretty sure, incorrect password can only be accurate. As that is reported by OMV. In this case, cannot connect can be a problem with access rights.

viniciuscordeiro commented 2 years ago

Same occurred here. I can't add OMV account and just getting "Unknown error occurred" and there is no log on HA.

viniciuscordeiro commented 2 years ago

Same occurred here. I can't add OMV account and just getting "Unknown error occurred" and there is no log on HA.

I've updated and removed omv_cookies.json and now works

tomaae commented 2 years ago

yea, cookies can cause quite a mess. it is unfortunate that they took such non-standard route with API.

Dinth commented 2 years ago

Unfortunately it still doesnt work for me. I have:

  1. Restarted OMV server
  2. Redownloaded the integration via HACS
  3. Deleted .omv_cookies file from /config - it gets recreated every time i am trying to add the integration.
  4. Tried adding the integration on a different computer to ensure that there are no browser caches messing up anything.

Unfortunately still getting "Unknown error occurred". It's strange because it was working perfectly fine until now.

tomaae commented 2 years ago

hmm, check if content of cookie file looks ok

Dinth commented 2 years ago

The cookie file is binary. What exactly should i look for?

tomaae commented 2 years ago

if you look into it, you can tell it contains information. there are IP's cookie names and such

Dinth commented 2 years ago

Screenshot from 2022-03-11 08-17-29 Looks ok for me

BebeMischa commented 2 years ago

Are you sure, the IP adress of your OMV is 10.10.1.13 ?

tomaae commented 2 years ago

looks good to me. I'm not really sure what is going on there. I will try to look into adding more debug info for API connection.

tomaae commented 2 years ago

can you try again with master?

Dinth commented 2 years ago

I have updated to 1.2.2 today, but the issue still persists :(

tomaae commented 2 years ago

I have updated to 1.2.2 today, but the issue still persists :(

What kind of error do you get? Including HA log

Dinth commented 2 years ago

Hi. Just a quick update. Yesterday after i updated the integration to 1.2.2, i have tried to add it in the same way as before and been seeing the same results ("Unknown error occured" and no info in the log although debugging was disabled). After attempt the integration was showing up in the integration list with "Not loaded" text. I left it that way overnight - havent removed it and this morning restarted the HA to add reenable debugging for OMV. As soon as I restarted though, the OMV integration automagically started to work. This is something what has been changed in 1.2.2, as with the previous version i have tried restarting HA with the "not loaded" OMV integration and there was no difference.

tomaae commented 2 years ago

eh? so it started working overnight and now everything is ok? is so, try to restart ha once more when you can to confirm its still ok. also check you ha log in case there are any errors.

Dinth commented 2 years ago

Looking at the log - it started to work immediately after restart of HA with the OMV integration added. Ive been trying all of that on 1.2.1 and back then restart was not helping, so definitely something was fixed in 1.2.2.

Tried restarting HA again and OMV is still working

tomaae commented 2 years ago

glad to hear that. some people actually have problems now with 1.2.2 OMV is just weird. Just reopen the issue in case the problem comes back