Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

go2rtc integration producing a lot of KeyErrors #129747

Closed
rccoleman opened this issue Nov 3, 2024 · 3 comments · Fixed by #129808
Closed

go2rtc integration producing a lot of KeyErrors #129747

rccoleman opened this issue Nov 3, 2024 · 3 comments · Fixed by #129808

Comments

@rccoleman
Copy link
Contributor

rccoleman commented Nov 3, 2024

The problem

The new go2rtc integration is often flooding my logs with errors that look like this:

2024-11-03 10:38:45.514 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [140712495597024] Error unsubscribing from subscription: functools.partial(<bound method Camera.close_webrtc_session of <entity camera.front_path=recording>>, '01JBSN3JDPAZ41312BMHZZ8SNJ')
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/connection.py", line 248, in async_handle_close
    unsub()
  File "/usr/src/homeassistant/homeassistant/components/camera/__init__.py", line 854, in close_webrtc_session
    self._webrtc_provider.async_close_session(session_id)
  File "/usr/src/homeassistant/homeassistant/components/go2rtc/__init__.py", line 245, in async_close_session
    ws_client = self._sessions.pop(session_id)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: '01JBSN3JDPAZ41312BMHZZ8SNJ'

I think this is due to my changing the dashboard and having some webviews (like my 2 tablets) still open with the old frontend, but it tends to flood my logs every so often. I haven't really gotten to the bottom of what's causing it other than refreshing the browser page on my two tablets tends to do it. It would be better IMO if this sort of failure was handled more gracefully. See below for the frequency of the logs.

Further the documentation page in the manifest.json for the go2rtc component doesn't exist, even in the https://rc.home-assistant.io/xxx tree.

"documentation": "https://www.home-assistant.io/integrations/go2rtc",

What version of Home Assistant Core has the issue?

core-2024.11.0b2

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant Container

Integration causing the issue

Go2RTC

Link to integration documentation on our website

Can't find a doc page for go2rtc

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

2024-11-03 10:38:45.465 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [140712495597024] Error unsubscribing from subscription: functools.partial(<bound method Camera.close_webrtc_session of <entity camera.back_door=recording>>, '01JBSN3JD3N890ZA3X78EJMWW4')
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/connection.py", line 248, in async_handle_close
    unsub()
  File "/usr/src/homeassistant/homeassistant/components/camera/__init__.py", line 854, in close_webrtc_session
    self._webrtc_provider.async_close_session(session_id)
  File "/usr/src/homeassistant/homeassistant/components/go2rtc/__init__.py", line 245, in async_close_session
    ws_client = self._sessions.pop(session_id)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: '01JBSN3JD3N890ZA3X78EJMWW4'
2024-11-03 10:38:45.466 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [140712495597024] Error unsubscribing from subscription: functools.partial(<bound method Camera.close_webrtc_session of <entity camera.front_door=recording>>, '01JBSN3JD40QAM0T2MCRAP8YA6')
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/connection.py", line 248, in async_handle_close
    unsub()
  File "/usr/src/homeassistant/homeassistant/components/camera/__init__.py", line 854, in close_webrtc_session
    self._webrtc_provider.async_close_session(session_id)
  File "/usr/src/homeassistant/homeassistant/components/go2rtc/__init__.py", line 245, in async_close_session
    ws_client = self._sessions.pop(session_id)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: '01JBSN3JD40QAM0T2MCRAP8YA6'
2024-11-03 10:38:45.467 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [140712495597024] Error unsubscribing from subscription: functools.partial(<bound method Camera.close_webrtc_session of <entity camera.front_path=recording>>, '01JBSN3JD4ARZZ81B33456YDQR')
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/connection.py", line 248, in async_handle_close
    unsub()
  File "/usr/src/homeassistant/homeassistant/components/camera/__init__.py", line 854, in close_webrtc_session
    self._webrtc_provider.async_close_session(session_id)
  File "/usr/src/homeassistant/homeassistant/components/go2rtc/__init__.py", line 245, in async_close_session
    ws_client = self._sessions.pop(session_id)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: '01JBSN3JD4ARZZ81B33456YDQR'
2024-11-03 10:38:45.468 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [140712495597024] Error unsubscribing from subscription: functools.partial(<bound method Camera.close_webrtc_session of <entity camera.back_door=recording>>, '01JBSN3JD5H7YEH0K6AWJDYDY7')
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/connection.py", line 248, in async_handle_close
    unsub()
  File "/usr/src/homeassistant/homeassistant/components/camera/__init__.py", line 854, in close_webrtc_session
    self._webrtc_provider.async_close_session(session_id)
  File "/usr/src/homeassistant/homeassistant/components/go2rtc/__init__.py", line 245, in async_close_session
    ws_client = self._sessions.pop(session_id)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: '01JBSN3JD5H7YEH0K6AWJDYDY7'
2024-11-03 10:38:45.469 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [140712495597024] Error unsubscribing from subscription: functools.partial(<bound method Camera.close_webrtc_session of <entity camera.garage=streaming>>, '01JBSN3JD5T4MVZ3DC7PJ9A73R')
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/connection.py", line 248, in async_handle_close
    unsub()
  File "/usr/src/homeassistant/homeassistant/components/camera/__init__.py", line 854, in close_webrtc_session
    self._webrtc_provider.async_close_session(session_id)
  File "/usr/src/homeassistant/homeassistant/components/go2rtc/__init__.py", line 245, in async_close_session
    ws_client = self._sessions.pop(session_id)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: '01JBSN3JD5T4MVZ3DC7PJ9A73R'
2024-11-03 10:38:45.470 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [140712495597024] Error unsubscribing from subscription: functools.partial(<bound method Camera.close_webrtc_session of <entity camera.garage=streaming>>, '01JBSN3JD5ARAVBVBC60NNYQP7')
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/connection.py", line 248, in async_handle_close
    unsub()
  File "/usr/src/homeassistant/homeassistant/components/camera/__init__.py", line 854, in close_webrtc_session
    self._webrtc_provider.async_close_session(session_id)
  File "/usr/src/homeassistant/homeassistant/components/go2rtc/__init__.py", line 245, in async_close_session
    ws_client = self._sessions.pop(session_id)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: '01JBSN3JD5ARAVBVBC60NNYQP7'
2024-11-03 10:38:45.474 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [140712495597024] Error unsubscribing from subscription: functools.partial(<bound method Camera.close_webrtc_session of <entity camera.front_door=recording>>, '01JBSN3JD69VJYF95KW2D0FZ77')
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/connection.py", line 248, in async_handle_close
    unsub()
  File "/usr/src/homeassistant/homeassistant/components/camera/__init__.py", line 854, in close_webrtc_session
    self._webrtc_provider.async_close_session(session_id)
  File "/usr/src/homeassistant/homeassistant/components/go2rtc/__init__.py", line 245, in async_close_session
    ws_client = self._sessions.pop(session_id)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: '01JBSN3JD69VJYF95KW2D0FZ77'
2024-11-03 10:38:45.477 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [140712495597024] Error unsubscribing from subscription: functools.partial(<bound method Camera.close_webrtc_session of <entity camera.front_path=recording>>, '01JBSN3JD6ATD0V6ZB5ASQHNM2')
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/connection.py", line 248, in async_handle_close
    unsub()
  File "/usr/src/homeassistant/homeassistant/components/camera/__init__.py", line 854, in close_webrtc_session
    self._webrtc_provider.async_close_session(session_id)
  File "/usr/src/homeassistant/homeassistant/components/go2rtc/__init__.py", line 245, in async_close_session
    ws_client = self._sessions.pop(session_id)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: '01JBSN3JD6ATD0V6ZB5ASQHNM2'
2024-11-03 10:38:45.478 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [140712495597024] Error unsubscribing from subscription: functools.partial(<bound method Camera.close_webrtc_session of <entity camera.back_door=recording>>, '01JBSN3JD6SX8HB7DY8TDE009H')
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/connection.py", line 248, in async_handle_close
    unsub()
  File "/usr/src/homeassistant/homeassistant/components/camera/__init__.py", line 854, in close_webrtc_session
    self._webrtc_provider.async_close_session(session_id)
  File "/usr/src/homeassistant/homeassistant/components/go2rtc/__init__.py", line 245, in async_close_session
    ws_client = self._sessions.pop(session_id)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: '01JBSN3JD6SX8HB7DY8TDE009H'
2024-11-03 10:38:45.480 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [140712495597024] Error unsubscribing from subscription: functools.partial(<bound method Camera.close_webrtc_session of <entity camera.garage=streaming>>, '01JBSN3JD7HRTMSVQF2BF8FJ0R')
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/connection.py", line 248, in async_handle_close
    unsub()
  File "/usr/src/homeassistant/homeassistant/components/camera/__init__.py", line 854, in close_webrtc_session
    self._webrtc_provider.async_close_session(session_id)
  File "/usr/src/homeassistant/homeassistant/components/go2rtc/__init__.py", line 245, in async_close_session
    ws_client = self._sessions.pop(session_id)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: '01JBSN3JD7HRTMSVQF2BF8FJ0R'
2024-11-03 10:38:45.482 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [140712495597024] Error unsubscribing from subscription: functools.partial(<bound method Camera.close_webrtc_session of <entity camera.front_path=recording>>, '01JBSN3JD7027JPK4A9X2HPD2R')
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/connection.py", line 248, in async_handle_close
    unsub()
  File "/usr/src/homeassistant/homeassistant/components/camera/__init__.py", line 854, in close_webrtc_session
    self._webrtc_provider.async_close_session(session_id)
  File "/usr/src/homeassistant/homeassistant/components/go2rtc/__init__.py", line 245, in async_close_session
    ws_client = self._sessions.pop(session_id)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: '01JBSN3JD7027JPK4A9X2HPD2R'
2024-11-03 10:38:45.486 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [140712495597024] Error unsubscribing from subscription: functools.partial(<bound method Camera.close_webrtc_session of <entity camera.garage=streaming>>, '01JBSN3JD8DQMPP2JEQMZY2KR6')
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/connection.py", line 248, in async_handle_close
    unsub()
  File "/usr/src/homeassistant/homeassistant/components/camera/__init__.py", line 854, in close_webrtc_session
    self._webrtc_provider.async_close_session(session_id)
  File "/usr/src/homeassistant/homeassistant/components/go2rtc/__init__.py", line 245, in async_close_session
    ws_client = self._sessions.pop(session_id)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: '01JBSN3JD8DQMPP2JEQMZY2KR6'
2024-11-03 10:38:45.489 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [140712495597024] Error unsubscribing from subscription: functools.partial(<bound method Camera.close_webrtc_session of <entity camera.front_door=recording>>, '01JBSN3JD8EY24BCSGCTVG62JZ')
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/connection.py", line 248, in async_handle_close
    unsub()
  File "/usr/src/homeassistant/homeassistant/components/camera/__init__.py", line 854, in close_webrtc_session
    self._webrtc_provider.async_close_session(session_id)
  File "/usr/src/homeassistant/homeassistant/components/go2rtc/__init__.py", line 245, in async_close_session
    ws_client = self._sessions.pop(session_id)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: '01JBSN3JD8EY24BCSGCTVG62JZ'
2024-11-03 10:38:45.492 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [140712495597024] Error unsubscribing from subscription: functools.partial(<bound method Camera.close_webrtc_session of <entity camera.front_path=recording>>, '01JBSN3JD9NFQ33V8ZGWE5JNWZ')
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/connection.py", line 248, in async_handle_close
    unsub()
  File "/usr/src/homeassistant/homeassistant/components/camera/__init__.py", line 854, in close_webrtc_session
    self._webrtc_provider.async_close_session(session_id)
  File "/usr/src/homeassistant/homeassistant/components/go2rtc/__init__.py", line 245, in async_close_session
    ws_client = self._sessions.pop(session_id)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: '01JBSN3JD9NFQ33V8ZGWE5JNWZ'
2024-11-03 10:38:45.494 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [140712495597024] Error unsubscribing from subscription: functools.partial(<bound method Camera.close_webrtc_session of <entity camera.back_door=recording>>, '01JBSN3JD9HFX9QF39V012KN8F')
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/connection.py", line 248, in async_handle_close
    unsub()
  File "/usr/src/homeassistant/homeassistant/components/camera/__init__.py", line 854, in close_webrtc_session
    self._webrtc_provider.async_close_session(session_id)
  File "/usr/src/homeassistant/homeassistant/components/go2rtc/__init__.py", line 245, in async_close_session
    ws_client = self._sessions.pop(session_id)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: '01JBSN3JD9HFX9QF39V012KN8F'
2024-11-03 10:38:45.496 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [140712495597024] Error unsubscribing from subscription: functools.partial(<bound method Camera.close_webrtc_session of <entity camera.garage=streaming>>, '01JBSN3JD9AQGDQ5E7X706N4EC')
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/connection.py", line 248, in async_handle_close
    unsub()
  File "/usr/src/homeassistant/homeassistant/components/camera/__init__.py", line 854, in close_webrtc_session
    self._webrtc_provider.async_close_session(session_id)
  File "/usr/src/homeassistant/homeassistant/components/go2rtc/__init__.py", line 245, in async_close_session
    ws_client = self._sessions.pop(session_id)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: '01JBSN3JD9AQGDQ5E7X706N4EC'
2024-11-03 10:38:45.499 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [140712495597024] Error unsubscribing from subscription: functools.partial(<bound method Camera.close_webrtc_session of <entity camera.front_path=recording>>, '01JBSN3JDASEA2XXJVSR169JXG')
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/connection.py", line 248, in async_handle_close
    unsub()
  File "/usr/src/homeassistant/homeassistant/components/camera/__init__.py", line 854, in close_webrtc_session
    self._webrtc_provider.async_close_session(session_id)
  File "/usr/src/homeassistant/homeassistant/components/go2rtc/__init__.py", line 245, in async_close_session
    ws_client = self._sessions.pop(session_id)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: '01JBSN3JDASEA2XXJVSR169JXG'
2024-11-03 10:38:45.500 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [140712495597024] Error unsubscribing from subscription: functools.partial(<bound method Camera.close_webrtc_session of <entity camera.back_door=recording>>, '01JBSN3JDAC5ZQY918G13MZCNW')
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/connection.py", line 248, in async_handle_close
    unsub()
  File "/usr/src/homeassistant/homeassistant/components/camera/__init__.py", line 854, in close_webrtc_session
    self._webrtc_provider.async_close_session(session_id)
  File "/usr/src/homeassistant/homeassistant/components/go2rtc/__init__.py", line 245, in async_close_session
    ws_client = self._sessions.pop(session_id)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: '01JBSN3JDAC5ZQY918G13MZCNW'
2024-11-03 10:38:45.501 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [140712495597024] Error unsubscribing from subscription: functools.partial(<bound method Camera.close_webrtc_session of <entity camera.garage=streaming>>, '01JBSN3JDACZBGPS94K1YB68M1')
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/connection.py", line 248, in async_handle_close
    unsub()
  File "/usr/src/homeassistant/homeassistant/components/camera/__init__.py", line 854, in close_webrtc_session
    self._webrtc_provider.async_close_session(session_id)
  File "/usr/src/homeassistant/homeassistant/components/go2rtc/__init__.py", line 245, in async_close_session
    ws_client = self._sessions.pop(session_id)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: '01JBSN3JDACZBGPS94K1YB68M1'
2024-11-03 10:38:45.503 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [140712495597024] Error unsubscribing from subscription: functools.partial(<bound method Camera.close_webrtc_session of <entity camera.garage=streaming>>, '01JBSN3JDEJTVCK6C863Q686YT')
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/connection.py", line 248, in async_handle_close
    unsub()
  File "/usr/src/homeassistant/homeassistant/components/camera/__init__.py", line 854, in close_webrtc_session
    self._webrtc_provider.async_close_session(session_id)
  File "/usr/src/homeassistant/homeassistant/components/go2rtc/__init__.py", line 245, in async_close_session
    ws_client = self._sessions.pop(session_id)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: '01JBSN3JDEJTVCK6C863Q686YT'
2024-11-03 10:38:45.506 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [140712495597024] Error unsubscribing from subscription: functools.partial(<bound method Camera.close_webrtc_session of <entity camera.garage=streaming>>, '01JBSN3JDEBBMRVEKEJWPSPR4A')
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/connection.py", line 248, in async_handle_close
    unsub()
  File "/usr/src/homeassistant/homeassistant/components/camera/__init__.py", line 854, in close_webrtc_session
    self._webrtc_provider.async_close_session(session_id)
  File "/usr/src/homeassistant/homeassistant/components/go2rtc/__init__.py", line 245, in async_close_session
    ws_client = self._sessions.pop(session_id)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: '01JBSN3JDEBBMRVEKEJWPSPR4A'
2024-11-03 10:38:45.508 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [140712495597024] Error unsubscribing from subscription: functools.partial(<bound method Camera.close_webrtc_session of <entity camera.master_bedroom=recording>>, '01JBSN3JDEH51YT66CBTATFA4Y')
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/connection.py", line 248, in async_handle_close
    unsub()
  File "/usr/src/homeassistant/homeassistant/components/camera/__init__.py", line 854, in close_webrtc_session
    self._webrtc_provider.async_close_session(session_id)
  File "/usr/src/homeassistant/homeassistant/components/go2rtc/__init__.py", line 245, in async_close_session
    ws_client = self._sessions.pop(session_id)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: '01JBSN3JDEH51YT66CBTATFA4Y'
2024-11-03 10:38:45.510 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [140712495597024] Error unsubscribing from subscription: functools.partial(<bound method Camera.close_webrtc_session of <entity camera.front_door=recording>>, '01JBSN3JDF6JN8G8GQ815GV9FF')
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/connection.py", line 248, in async_handle_close
    unsub()
  File "/usr/src/homeassistant/homeassistant/components/camera/__init__.py", line 854, in close_webrtc_session
    self._webrtc_provider.async_close_session(session_id)
  File "/usr/src/homeassistant/homeassistant/components/go2rtc/__init__.py", line 245, in async_close_session
    ws_client = self._sessions.pop(session_id)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: '01JBSN3JDF6JN8G8GQ815GV9FF'
2024-11-03 10:38:45.511 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [140712495597024] Error unsubscribing from subscription: functools.partial(<bound method Camera.close_webrtc_session of <entity camera.master_bedroom=recording>>, '01JBSN3JDM4R7GFG6TBS324M1Y')
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/connection.py", line 248, in async_handle_close
    unsub()
  File "/usr/src/homeassistant/homeassistant/components/camera/__init__.py", line 854, in close_webrtc_session
    self._webrtc_provider.async_close_session(session_id)
  File "/usr/src/homeassistant/homeassistant/components/go2rtc/__init__.py", line 245, in async_close_session
    ws_client = self._sessions.pop(session_id)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: '01JBSN3JDM4R7GFG6TBS324M1Y'
2024-11-03 10:38:45.512 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [140712495597024] Error unsubscribing from subscription: functools.partial(<bound method Camera.close_webrtc_session of <entity camera.front_door=recording>>, '01JBSN3JDNTV4BZCRZ575EK8FA')
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/connection.py", line 248, in async_handle_close
    unsub()
  File "/usr/src/homeassistant/homeassistant/components/camera/__init__.py", line 854, in close_webrtc_session
    self._webrtc_provider.async_close_session(session_id)
  File "/usr/src/homeassistant/homeassistant/components/go2rtc/__init__.py", line 245, in async_close_session
    ws_client = self._sessions.pop(session_id)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: '01JBSN3JDNTV4BZCRZ575EK8FA'
2024-11-03 10:38:45.514 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [140712495597024] Error unsubscribing from subscription: functools.partial(<bound method Camera.close_webrtc_session of <entity camera.front_path=recording>>, '01JBSN3JDPAZ41312BMHZZ8SNJ')
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/connection.py", line 248, in async_handle_close
    unsub()
  File "/usr/src/homeassistant/homeassistant/components/camera/__init__.py", line 854, in close_webrtc_session
    self._webrtc_provider.async_close_session(session_id)
  File "/usr/src/homeassistant/homeassistant/components/go2rtc/__init__.py", line 245, in async_close_session
    ws_client = self._sessions.pop(session_id)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: '01JBSN3JDPAZ41312BMHZZ8SNJ'
2024-11-03 10:38:45.515 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [140712495597024] Error unsubscribing from subscription: functools.partial(<bound method Camera.close_webrtc_session of <entity camera.back_door=recording>>, '01JBSN3JDPXJBRDN795R7ZT9YF')
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/connection.py", line 248, in async_handle_close
    unsub()
  File "/usr/src/homeassistant/homeassistant/components/camera/__init__.py", line 854, in close_webrtc_session
    self._webrtc_provider.async_close_session(session_id)
  File "/usr/src/homeassistant/homeassistant/components/go2rtc/__init__.py", line 245, in async_close_session
    ws_client = self._sessions.pop(session_id)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: '01JBSN3JDPXJBRDN795R7ZT9YF'
2024-11-03 10:38:45.517 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [140712495597024] Error unsubscribing from subscription: functools.partial(<bound method Camera.close_webrtc_session of <entity camera.garage=streaming>>, '01JBSN3JDPY6TGZ50CNVS9KP49')
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/connection.py", line 248, in async_handle_close
    unsub()
  File "/usr/src/homeassistant/homeassistant/components/camera/__init__.py", line 854, in close_webrtc_session
    self._webrtc_provider.async_close_session(session_id)
  File "/usr/src/homeassistant/homeassistant/components/go2rtc/__init__.py", line 245, in async_close_session
    ws_client = self._sessions.pop(session_id)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: '01JBSN3JDPY6TGZ50CNVS9KP49'

Additional information

No response

@home-assistant
Copy link

home-assistant bot commented Nov 4, 2024

Hey there @home-assistant/core, mind taking a look at this issue as it has been labeled with an integration (go2rtc) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of go2rtc can trigger bot actions by commenting:

  • @home-assistant close Closes the issue.
  • @home-assistant rename Awesome new title Renames the issue.
  • @home-assistant reopen Reopen the issue.
  • @home-assistant unassign go2rtc Removes the current integration label and assignees on the issue, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


go2rtc documentation
go2rtc source
(message by IssueLinks)

@joostlek joostlek added this to the 2024.11.0 milestone Nov 4, 2024
@edenhaus
Copy link
Contributor

edenhaus commented Nov 4, 2024

Can you please specify which camera entity you have the issue with and which integration/domain created the camera?

@rccoleman
Copy link
Contributor Author

They're created with the Frigate CC and it seems to repeat for all of them. I can open an issue in their repo if you think it's related to the integration.

@github-actions github-actions bot locked and limited conversation to collaborators Dec 5, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants