elad-bar / ha-shinobi

Shinobi Video custom component for HA
53 stars 5 forks source link

Latest home assistant update (2023.08.1) seems broken shinobi integration #50

Closed Extreme79 closed 1 year ago

Extreme79 commented 1 year ago

Here the error log:

2023-08-03 12:12:10.546 ERROR (MainThread) [custom_components.shinobi] Failed to load Shinobi Video, error: , line: 34

2023-08-03 12:12:15.083 ERROR (MainThread) [homeassistant.helpers.integration_platform] Error processing platform shinobi.media_source

Traceback (most recent call last):

File "/usr/src/homeassistant/homeassistant/helpers/integration_platform.py", line 61, in _async_process_single_integration_platform_component

await integration_platform.process_platform(hass, component_name, platform)

File "/usr/src/homeassistant/homeassistant/components/media_source/__init__.py", line 92, in _process_media_source_platform

hass.data[DOMAIN][domain] = await platform.async_get_media_source(hass)

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

File "/config/custom_components/shinobi/media_source.py", line 48, in async_get_media_source

coordinator = hass.data[DOMAIN][entry.entry_id]

~~~~~~~~~^^^^^^^^

KeyError: 'shinobi'
elad-bar commented 1 year ago

Will need more context, what have you tried to do and got that error?

Thanks

Extreme79 commented 1 year ago

I simply updated to the latest ha, nothing else. And error just appeared. I placed an issue before doing anything to avoid confusion. I also not tried to reinstall shinobi integration, but I can try.

elad-bar commented 1 year ago

pls check with latest v3.0.2

thanks

Extreme79 commented 1 year ago

pls check with latest v3.0.2

thanks

I'm going to update. I'll write the result here.

Extreme79 commented 1 year ago

unfortunately seems not solved. after a reboot, I have unworking devices and this error in the log: 2023-08-04 00:52:10.766 ERROR (MainThread) [custom_components.shinobi] Failed to load Shinobi Video, error: , line: 34

Trying to configure the unworking device, I got: "Impossibile caricare il flusso di configurazione: 500 Internal Server Error Server got itself in trouble" (impossible to load configuration flow: 500 Internal Server Error Server got itself in trouble) But apparently my shinobi installation is working as before. I not changed shinobi since weeks ago.

I removed all the devices added by integration, than added again All the devices come back and working. Probably something corrupted on the autentication side.

elad-bar commented 1 year ago

Make sense that you might encounter the corrupted key issue but not sure why you didn't see it in logs...

Extreme79 commented 1 year ago

I triple checked for any info about shinobi in the logs but not trace of auth/key issues, only the above line of error. Too cryptic (too little detailed) to understand what happened. Don't mind, for me you can consider as solved (if you want to investigate further, feel free to ask me, anyway)

elad-bar commented 1 year ago

When running it with debug there should be more, but as you wrote, it should be more descriptive, thanks for the suggestion