blakeblackshear / frigate

NVR with realtime local object detection for IP cameras
https://frigate.video
MIT License
19.12k stars 1.75k forks source link

[Support]: Issue with Frigate crashing since 2022.12.1 update #4665

Closed Moondevil-ha closed 1 year ago

Moondevil-ha commented 1 year ago

Describe the problem you are having

Problems logged with HomeAssistant github here: https://github.com/home-assistant/core/issues/83661

May or may not be General video streaming related (something broken in 2022.12.x) but Frigate appears to be crashing with memory leak/cpu issues

Version

DEBUG 0.10.1-83481AF

Frigate config file

# frigate.yml
mqtt:
  host: 192.168.1.248
  user: mqtt-user
  password: xxxxxxxx

birdseye:
  # Optional: Enable birdseye view (default: shown below)
  enabled: False
  # Optional: Width of the output resolution (default: shown below)
  width: 1280
  # Optional: Height of the output resolution (default: shown below)
  height: 720
  # Optional: Encoding quality of the mpeg1 feed (default: shown below)
  # 1 is the highest quality, and 31 is the lowest. Lower quality feeds utilize less CPU resources.
  quality: 8
  # Optional: Mode of the view. Available options are: objects, motion, and continuous
  #   objects - cameras are included if they have had a tracked object within the last 30 seconds
  #   motion - cameras are included if motion was detected in the last 30 seconds
  #   continuous - all cameras are included always
  mode: continuous

cameras:
  Back_Garden:
    rtmp:
      enabled: false
    ffmpeg:
      hwaccel_args:
        - -hwaccel
        - vaapi
        - -hwaccel_device
        - /dev/dri/renderD128
        - -hwaccel_output_format
        - yuv420p
      input_args:
        - -avoid_negative_ts
        - make_zero
        #- live_flv
      #  - -fflags
      #  - nobuffer+genpts+discardcorrupt
      #  - -flags
      #  - low_delay
      #  - -strict
      #  - experimental
      #  - -analyzeduration
      #  - 1000M
      #  - -probesize
      #  - 1000M
      #  - -rw_timeout
      #  - "5000000"
      output_args:
        record: -f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c copy

      inputs:
      #  - path: rtsp://admin:xxxxxxxx@192.168.1.75:554
        - path: rtmp://192.168.1.75/bcs/channel0_main.bcs?channel=0&stream=0&user=admin&password=xxxxxxxx
      #  - path: http://192.168.1.75/flv?port=1935&app=bcs&stream=channel0_main.bcs&user=admin&password=xxxxxxxx
          roles: 
            - detect
            - record
    detect:
      width: 2560
      height: 1920
      fps: 5
    objects:
      track:
        - person
        - dog
        - cat
      filters:
        person:
          min_score: 0.75

    snapshots:
      enabled: True
      timestamp: True
    record:
      # Optional: Enable recording (default: shown below)
      enabled: True
      # Optional: Number of days to retain recordings regardless of events (default: shown below)
      # NOTE: This should be set to 0 and retention should be defined in events section below
      #       if you only want to retain recordings of events.
      retain_days: 5
      # Optional: Event recording settings
      events:
        # Optional: Maximum length of time to retain video during long events. (default: shown below)
        # NOTE: If an object is being tracked for longer than this amount of time, the retained recordings
        #       will be the last x seconds of the event unless retain_days under record is > 0.
        max_seconds: 300
        # Optional: Number of seconds before the event to include (default: shown below)
        pre_capture: 5
        # Optional: Number of seconds after the event to include (default: shown below)
        post_capture: 5
        # Optional: Objects to save recordings for. (default: all tracked objects)
        objects:
          - person
          - cat
          - dog
        # Optional: Restrict recordings to objects that entered any of the listed zones (default: no required zones)
        required_zones: []
        # Optional: Retention settings for recordings of events
        retain:
          # Required: Default retention days (default: shown below)
          default: 10
          # Optional: Per object retention days
          objects:
            person: 15
    motion:
      mask:
        - 0,410,710,390,876,1158,379,1920,0,1920
        - 2560,234,1891,214,2560,633
  Sideway:
    rtmp:
      enabled: false
    ffmpeg:
      hwaccel_args:
        - -hwaccel
        - vaapi
        - -hwaccel_device
        - /dev/dri/renderD128
        - -hwaccel_output_format
        - yuv420p
      input_args:
        - -avoid_negative_ts
        - make_zero
        #- live_flv
      output_args:
        record: -f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c copy
      inputs:
      #  - path: rtsp://admin:xxxxxxxx@192.168.1.11:554
        - path: rtmp://192.168.1.11/bcs/channel0_main.bcs?channel=0&stream=0&user=admin&password=xxxxxxxx
          roles: 
            - detect
            - record
    detect:
      width: 2560
      height: 1440
      fps: 5
    objects:
      track:
        - person
        - dog
        - cat
      filters:
        person:
          min_score: 0.75
          mask:
            - 2389,1440,1588,818,1233,519,2560,0,2560,1440

    snapshots:
      enabled: True
      timestamp: True
    record:
      # Optional: Enable recording (default: shown below)
      enabled: True
      # Optional: Number of days to retain recordings regardless of events (default: shown below)
      # NOTE: This should be set to 0 and retention should be defined in events section below
      #       if you only want to retain recordings of events.
      retain_days: 5
      # Optional: Event recording settings
      events:
        # Optional: Maximum length of time to retain video during long events. (default: shown below)
        # NOTE: If an object is being tracked for longer than this amount of time, the retained recordings
        #       will be the last x seconds of the event unless retain_days under record is > 0.
        max_seconds: 300
        # Optional: Number of seconds before the event to include (default: shown below)
        pre_capture: 5
        # Optional: Number of seconds after the event to include (default: shown below)
        post_capture: 5
        # Optional: Objects to save recordings for. (default: all tracked objects)
        objects:
          - person
          - cat
          - dog
        # Optional: Restrict recordings to objects that entered any of the listed zones (default: no required zones)
        required_zones: []
        # Optional: Retention settings for recordings of events
        retain:
          # Required: Default retention days (default: shown below)
          default: 10
          # Optional: Per object retention days
          objects:
            person: 15
    motion:
      mask:
        - 2389,1440,1588,818,1233,519,2560,0,2560,1440

  Front_Yard:
    rtmp:
      enabled: false
    ffmpeg:
      hwaccel_args:
        - -hwaccel
        - vaapi
        - -hwaccel_device
        - /dev/dri/renderD128
        - -hwaccel_output_format
        - yuv420p
      input_args:
        - -avoid_negative_ts
        - make_zero
        #- live_flv
      output_args:
        record: -f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c copy
      inputs:
      #  - path: rtsp://admin:xxxxxxxx@192.168.1.8:554
        - path: rtmp://192.168.1.8/bcs/channel0_main.bcs?channel=0&stream=0&user=admin&password=xxxxxxxx
          roles: 
            - detect
            - record
    detect:
      width: 2560
      height: 1920
      fps: 5
    objects:
      track:
        - person
        - dog
        - cat
      filters:
        person:
          min_score: 0.75

    snapshots:
      enabled: True
      timestamp: True
    record:
            # Optional: Enable recording (default: shown below)
      enabled: True
            # Optional: Number of days to retain recordings regardless of events (default: shown below)
            # NOTE: This should be set to 0 and retention should be defined in events section below
            #       if you only want to retain recordings of events.
      retain_days: 5
            # Optional: Event recording settings
      events:
              # Optional: Maximum length of time to retain video during long events. (default: shown below)
              # NOTE: If an object is being tracked for longer than this amount of time, the retained recordings
              #       will be the last x seconds of the event unless retain_days under record is > 0.
        max_seconds: 300
              # Optional: Number of seconds before the event to include (default: shown below)
        pre_capture: 5
              # Optional: Number of seconds after the event to include (default: shown below)
        post_capture: 5
              # Optional: Objects to save recordings for. (default: all tracked objects)
        objects:
          - person
          - cat
          - dog
              # Optional: Restrict recordings to objects that entered any of the listed zones (default: no required zones)
        required_zones: []
        # Optional: Retention settings for recordings of events
        retain:
                # Required: Default retention days (default: shown below)
          default: 10
                # Optional: Per object retention days
          objects:
            person: 15

detectors:
  coral_pci:
    type: edgetpu
    device: pci
  coral_usb:
    type: edgetpu
    device: usb

Relevant log output

2022-12-10 18:09:13.000 CRITICAL (SyncWorker_1) [homeassistant.components.profiler] Memory Growth: [('ReferenceType', 25199, 318), ('builtin_function_or_method', 10707, 251), ('tuple', 107593, 97), ('Context', 2866, 83), ('list', 51256, 63), ('Task', 407, 43), ('PosixPath', 1712, 32), ('coroutine', 653, 29), ('itemgetter', 568, 14), ('TemplateState', 82, 14), ('_ORMColumnEntity', 58, 14), ('State', 1856, 12), ('frozenset', 2873, 10), ('set', 9312, 8), ('Struct', 886, 8), ('dict', 100938, 7), ('Node', 447, 6), ('Statement', 55, 6), ('BindParameter', 238, 5), ('prefix_anon_map', 37, 4), ('Select', 80, 4), ('function', 110643, 3), ('lock', 293, 3), ('LambdaOptions', 32, 3), ('Comparator', 160, 2), ('BinaryExpression', 181, 2), ('SQLiteCompiler', 26, 2), ('CacheKey', 26, 2), ('ORMSelectCompileState', 17, 2), ('FromLinter', 17, 2), ('CursorResultMetaData', 17, 2), ('default_compile_options', 20, 2), ('DNSText', 61, 2), ('Script', 43, 2), ('StatementLambdaElement', 11, 2), ('Pattern', 1163, 1), ('WeakValueDictionary', 17, 1), ('builtin_method', 123, 1), ('slice', 36, 1), ('LRUCache', 16, 1), ('TemplateEnvironment', 3, 1), ('Thread', 57, 1), ('SessionEventsDispatch', 5, 1), ('_anonymous_label', 112, 1), ('Session', 8, 1), ('_ConnectionRecord', 4, 1), ('Cache', 25, 1), ('MimeType', 12, 1), ('AllStates', 2, 1), ('async_generator', 3, 1), ('DomainStates', 3, 1), ('AnalyzedCode', 23, 1), ('AnalyzedFunction', 28, 1), ('PyWrapper', 32, 1), ('LinkedLambdaElement', 21, 1), ('FileResponse', 8, 1), ('WeakInstanceDict', 4, 1), ('_BatchOperationTag', 3, 1), ('ReceiveInitialMetadataOperation', 1, 1)]
2022-12-10 18:09:44.045 CRITICAL (SyncWorker_0) [homeassistant.components.profiler] Memory Growth: [('ReferenceType', 25230, 31), ('State', 1866, 10)]
2022-12-10 18:09:57.749 DEBUG (MainThread) [custom_components.solis.soliscloud_api] Fetching data for serial: 6031050221230050
2022-12-10 18:09:57.924 DEBUG (MainThread) [custom_components.solis.service] Scheduling next update in 2 minutes.
2022-12-10 18:10:14.095 CRITICAL (SyncWorker_20) [homeassistant.components.profiler] Memory Growth: [('Struct', 890, 4), ('State', 1868, 2), ('function', 110644, 1), ('Life360Data', 2, 1), ('TemplateState', 83, 1), ('ServerDisconnectedError', 1, 1)]
2022-12-10 18:10:21.654 ERROR (SyncWorker_22) [homeassistant.components.nut] Failure getting NUT ups alias, 
2022-12-10 18:10:43.833 CRITICAL (SyncWorker_11) [homeassistant.components.profiler] Memory Growth: [('ReadOnlyDict', 3982, 123), ('coroutine', 656, 3), ('Task', 410, 3), ('WSMessage', 12, 1)]
2022-12-10 18:11:14.064 CRITICAL (SyncWorker_19) [homeassistant.components.profiler] Memory Growth: [('Struct', 894, 4), ('TemplateState', 85, 2)]
2022-12-10 18:11:44.121 CRITICAL (SyncWorker_33) [homeassistant.components.profiler] Memory Growth: [('tuple', 107614, 21), ('list', 51259, 3), ('coroutine', 659, 3), ('Struct', 896, 2), ('Task', 412, 2), ('State', 1870, 2), ('DNSText', 63, 2), ('TemplateState', 86, 1)]
2022-12-10 18:11:51.656 ERROR (SyncWorker_18) [homeassistant.components.nut] Failure getting NUT ups alias, 
2022-12-10 18:11:57.924 DEBUG (MainThread) [custom_components.solis.soliscloud_api] Fetching data for serial: 6031050221230050
2022-12-10 18:11:58.264 DEBUG (MainThread) [custom_components.solis.service] Scheduling next update in 2 minutes.
2022-12-10 18:12:14.114 CRITICAL (SyncWorker_0) [homeassistant.components.profiler] Memory Growth: [('dict', 101055, 117), ('list', 51344, 85), ('coroutine', 701, 42), ('tuple', 107639, 25), ('Task', 422, 10), ('MultiDictProxy', 67, 9), ('ResponseHandler', 34, 7), ('HttpResponseParser', 34, 7), ('deque', 765, 6), ('hamt', 156, 6), ('StreamReader', 37, 6), ('SplitResult', 102, 5), ('hamt_bitmap_node', 160, 5), ('CIMultiDict', 386, 5), ('TimerContext', 39, 5), ('Struct', 900, 4), ('URL', 93, 4), ('SelectorKey', 89, 4), ('MultiDict', 43, 4), ('socket', 104, 3), ('TransportSocket', 67, 3), ('_SelectorSocketTransport', 55, 3), ('UrlMappingMatchInfo', 38, 3), ('function', 110646, 2), ('partial', 496, 2), ('RawRequestMessage', 39, 2), ('frame', 447, 2), ('KeyedRef', 148, 2), ('Request', 41, 2), ('FutureIter', 66, 2), ('TemplateState', 88, 2), ('builtin_function_or_method', 10708, 1), ('generator', 22, 1), ('MimeType', 13, 1), ('_GeneratorContextManager', 18, 1), ('FileResponse', 9, 1)]
2022-12-10 18:12:43.972 CRITICAL (SyncWorker_38) [homeassistant.components.profiler] Memory Growth: [('coroutine', 714, 13), ('frame', 458, 11), ('partial', 498, 2), ('function', 110647, 1), ('Task', 423, 1)]
2022-12-10 18:13:13.970 CRITICAL (SyncWorker_0) [homeassistant.components.profiler] Memory Growth: [('coroutine', 718, 4), ('Task', 427, 4), ('TemplateState', 89, 1)]
2022-12-10 18:13:21.658 ERROR (SyncWorker_8) [homeassistant.components.nut] Failure getting NUT ups alias, 
2022-12-10 18:13:44.109 CRITICAL (SyncWorker_10) [homeassistant.components.profiler] Memory Growth: [('ReferenceType', 25259, 29), ('State', 1876, 6), ('function', 110649, 2)]
2022-12-10 18:13:58.265 DEBUG (MainThread) [custom_components.solis.soliscloud_api] Fetching data for serial: 6031050221230050
2022-12-10 18:13:58.446 DEBUG (MainThread) [custom_components.solis.service] Scheduling next update in 2 minutes.
2022-12-10 18:14:13.921 CRITICAL (SyncWorker_25) [homeassistant.components.profiler] Memory Growth: [('coroutine', 728, 10), ('Task', 437, 10), ('set', 9314, 2), ('TemplateState', 90, 1)]
2022-12-10 18:14:44.035 CRITICAL (SyncWorker_20) [homeassistant.components.profiler] Memory Growth: [('Task', 440, 3)]
2022-12-10 18:14:51.661 ERROR (SyncWorker_22) [homeassistant.components.nut] Failure getting NUT ups alias, 
2022-12-10 18:15:14.063 CRITICAL (SyncWorker_37) [homeassistant.components.profiler] Memory Growth: [('Context', 2884, 18), ('coroutine', 732, 4), ('Task', 444, 4), ('TemplateState', 93, 3)]
2022-12-10 18:15:44.035 CRITICAL (SyncWorker_19) [homeassistant.components.profiler] Memory Growth: [('coroutine', 762, 30), ('frame', 475, 17), ('set', 9324, 10), ('Task', 452, 8), ('SimpleCookie', 61, 6), ('State', 1880, 4), ('coroutine_wrapper', 12, 3), ('ClientRequest', 14, 3), ('Timeout', 22, 2), ('TimeoutHandle', 15, 2), ('RequestInfo', 13, 1), ('HassClientResponse', 12, 1), ('method', 7397, 1), ('Connection', 20, 1), ('DNSQuestion', 14, 1)]
2022-12-10 18:15:58.447 DEBUG (MainThread) [custom_components.solis.soliscloud_api] Fetching data for serial: 6031050221230050
2022-12-10 18:15:58.647 DEBUG (MainThread) [custom_components.solis.service] Scheduling next update in 2 minutes.
2022-12-10 18:16:14.120 CRITICAL (SyncWorker_8) [homeassistant.components.profiler] Memory Growth: [('Context', 2919, 35), ('ReferenceType', 25266, 7), ('partial', 502, 4), ('State', 1882, 2), ('ConnectionKey', 19, 1), ('TemplateState', 94, 1)]
2022-12-10 18:16:21.662 ERROR (SyncWorker_32) [homeassistant.components.nut] Failure getting NUT ups alias, 
2022-12-10 18:16:44.044 CRITICAL (SyncWorker_34) [homeassistant.components.profiler] Memory Growth: [('Context', 2936, 17), ('lock', 299, 6), ('builtin_function_or_method', 10711, 3), ('Condition', 136, 3), ('builtin_method', 126, 3), ('Thread', 60, 3), ('State', 1883, 1)]
2022-12-10 18:17:14.044 CRITICAL (SyncWorker_46) [homeassistant.components.profiler] Memory Growth: [('dict', 101182, 127), ('coroutine', 859, 97), ('frame', 565, 90), ('method', 7475, 78), ('Context', 3000, 64), ('list', 51401, 57), ('CIMultiDict', 429, 43), ('cell', 69800, 37), ('Task', 489, 37), ('tuple', 107674, 35), ('builtin_function_or_method', 10738, 27), ('SimpleCookie', 81, 20), ('FutureIter', 84, 18), ('SplitResult', 117, 15), ('Future', 104, 14), ('URL', 104, 11), ('CIMultiDictProxy', 313, 10), ('ConnectionKey', 28, 9), ('ClientTimeout', 17, 8), ('Connection', 27, 7), ('RequestInfo', 20, 7), ('TimeoutHandle', 22, 7), ('ClientRequest', 21, 7), ('HassClientResponse', 19, 7), ('coroutine_wrapper', 19, 7), ('lock', 305, 6), ('SSLProtocol', 42, 6), ('MemoryBIO', 64, 6), ('_SSLProtocolTransport', 42, 6), ('SSLObject', 43, 5), ('_SSLSocket', 51, 5), ('_SSLPipe', 31, 4), ('Condition', 139, 3), ('builtin_method', 129, 3), ('Thread', 63, 3), ('RequestHandler', 34, 3), ('AccessLogger', 34, 3), ('TemplateState', 96, 2), ('partial', 503, 1), ('socket', 105, 1), ('SelectorKey', 90, 1), ('TimerContext', 40, 1), ('HeadersParser', 5, 1), ('HttpRequestParser', 23, 1)]
2022-12-10 18:17:44.146 CRITICAL (SyncWorker_45) [homeassistant.components.profiler] Memory Growth: [('PosixPath', 1726, 14), ('function', 110657, 8), ('FileResponse', 15, 6), ('lock', 309, 4), ('slice', 39, 3), ('Condition', 141, 2), ('builtin_method', 131, 2), ('Thread', 65, 2), ('IntegrationPlatform', 8, 1)]
2022-12-10 18:17:51.665 ERROR (SyncWorker_17) [homeassistant.components.nut] Failure getting NUT ups alias, 
2022-12-10 18:17:58.649 DEBUG (MainThread) [custom_components.solis.soliscloud_api] Fetching data for serial: 6031050221230050
2022-12-10 18:17:58.829 DEBUG (MainThread) [custom_components.solis.service] Scheduling next update in 2 minutes.
2022-12-10 18:18:14.021 CRITICAL (SyncWorker_22) [homeassistant.components.profiler] Memory Growth: [('partial', 516, 13), ('function', 110664, 7), ('generator', 25, 3), ('RequestHandler', 37, 3), ('AccessLogger', 37, 3), ('_GeneratorContextManager', 21, 3), ('SSLProtocol', 44, 2), ('SSLObject', 45, 2), ('_SSLSocket', 53, 2), ('_SSLProtocolTransport', 44, 2), ('deque', 766, 1), ('TemplateState', 97, 1)]
2022-12-10 18:18:44.232 CRITICAL (SyncWorker_45) [homeassistant.components.profiler] Memory Growth: [('dict', 101218, 36), ('partial', 534, 18), ('deque', 778, 12), ('tuple', 107682, 8), ('RequestHandler', 44, 7), ('AccessLogger', 44, 7), ('StreamResponse', 23, 7), ('coroutine', 865, 6), ('Handle', 100, 5), ('function', 110669, 5), ('cell', 69804, 4), ('StreamWriter', 42, 4), ('frame', 568, 3), ('RawRequestMessage', 42, 3), ('generator', 28, 3), ('MultiDictProxy', 70, 3), ('MultiDict', 46, 3), ('SSLProtocol', 47, 3), ('SSLObject', 48, 3), ('_SSLSocket', 56, 3), ('Request', 44, 3), ('_SSLProtocolTransport', 47, 3), ('HttpRequestParser', 26, 3), ('UrlMappingMatchInfo', 41, 3), ('_GeneratorContextManager', 24, 3)]
2022-12-10 18:19:14.184 CRITICAL (SyncWorker_6) [homeassistant.components.profiler] Memory Growth: [('TemplateState', 98, 1)]
2022-12-10 18:19:21.666 ERROR (SyncWorker_29) [homeassistant.components.nut] Failure getting NUT ups alias, 
2022-12-10 18:19:58.830 DEBUG (MainThread) [custom_components.solis.soliscloud_api] Fetching data for serial: 6031050221230050
2022-12-10 18:19:59.005 DEBUG (MainThread) [custom_components.solis.service] Scheduling next update in 2 minutes.
2022-12-10 18:20:48.258 ERROR (MainThread) [custom_components.frigate.api] Timeout error fetching information from http://ccab4aaf-frigate:5000/api/events?camera=Front_Yard&limit=50&has_clip=1&include_thumbnails=0: 
2022-12-10 18:20:48.287 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [140323839065008] Error handling message: Unknown error (unknown_error) from 192.168.1.39 (Mozilla/5.0 (Linux; Android 10; MAX_10 Build/QP1A.190711.020; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/107.0.5304.141 Safari/537.36)
Traceback (most recent call last):
  File "/config/custom_components/frigate/api.py", line 192, in api_wrapper
    response = await func(
  File "/usr/local/lib/python3.10/site-packages/aiohttp/client.py", line 560, in _request
    await resp.start(conn)
  File "/usr/local/lib/python3.10/site-packages/aiohttp/client_reqrep.py", line 899, in start
    message, payload = await protocol.read()  # type: ignore[union-attr]
  File "/usr/local/lib/python3.10/site-packages/aiohttp/streams.py", line 616, in read
    await self._waiter
asyncio.exceptions.CancelledError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/config/custom_components/frigate/api.py", line 189, in api_wrapper
    async with async_timeout.timeout(TIMEOUT):
  File "/usr/local/lib/python3.10/site-packages/async_timeout/__init__.py", line 129, in __aexit__
    self._do_exit(exc_type)
  File "/usr/local/lib/python3.10/site-packages/async_timeout/__init__.py", line 212, in _do_exit
    raise asyncio.TimeoutError
asyncio.exceptions.TimeoutError

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/config/custom_components/frigate/media_source.py", line 693, in async_browse_media
    events = await self._get_client(identifier).async_get_events(
  File "/config/custom_components/frigate/api.py", line 81, in async_get_events
    await self.api_wrapper(
  File "/config/custom_components/frigate/api.py", line 205, in api_wrapper
    raise FrigateApiClientError from exc
custom_components.frigate.api.FrigateApiClientError

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/decorators.py", line 27, in _handle_async_response
    await func(hass, connection, msg)
  File "/usr/src/homeassistant/homeassistant/components/media_source/__init__.py", line 170, in websocket_browse_media
    media = await async_browse_media(hass, msg.get("media_content_id", ""))
  File "/usr/src/homeassistant/homeassistant/components/media_source/__init__.py", line 121, in async_browse_media
    item = await _get_media_item(hass, media_content_id, None).async_browse()
  File "/usr/src/homeassistant/homeassistant/components/media_source/models.py", line 79, in async_browse
    return await self.async_media_source().async_browse_media(self)
  File "/config/custom_components/frigate/media_source.py", line 703, in async_browse_media
    raise MediaSourceError from exc
homeassistant.components.media_source.error.MediaSourceError
2022-12-10 18:20:51.669 ERROR (SyncWorker_23) [homeassistant.components.nut] Failure getting NUT ups alias, 
2022-12-10 18:20:53.432 ERROR (MainThread) [custom_components.frigate.api] Timeout error fetching information from http://ccab4aaf-frigate:5000/api/events/summary?has_clip=1: 
2022-12-10 18:20:53.433 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [140323839065008] Error handling message: Unknown error (unknown_error) from 192.168.1.39 (Mozilla/5.0 (Linux; Android 10; MAX_10 Build/QP1A.190711.020; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/107.0.5304.141 Safari/537.36)
Traceback (most recent call last):
  File "/config/custom_components/frigate/api.py", line 192, in api_wrapper
    response = await func(
  File "/usr/local/lib/python3.10/site-packages/aiohttp/client.py", line 560, in _request
    await resp.start(conn)
  File "/usr/local/lib/python3.10/site-packages/aiohttp/client_reqrep.py", line 899, in start
    message, payload = await protocol.read()  # type: ignore[union-attr]
  File "/usr/local/lib/python3.10/site-packages/aiohttp/streams.py", line 616, in read
    await self._waiter
asyncio.exceptions.CancelledError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/config/custom_components/frigate/api.py", line 189, in api_wrapper
    async with async_timeout.timeout(TIMEOUT):
  File "/usr/local/lib/python3.10/site-packages/async_timeout/__init__.py", line 129, in __aexit__
    self._do_exit(exc_type)
  File "/usr/local/lib/python3.10/site-packages/async_timeout/__init__.py", line 212, in _do_exit
    raise asyncio.TimeoutError
asyncio.exceptions.TimeoutError

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/config/custom_components/frigate/media_source.py", line 734, in _get_event_summary_data
    summary_data = await self._get_client(identifier).async_get_event_summary(
  File "/config/custom_components/frigate/api.py", line 106, in async_get_event_summary
    await self.api_wrapper(
  File "/config/custom_components/frigate/api.py", line 205, in api_wrapper
    raise FrigateApiClientError from exc
custom_components.frigate.api.FrigateApiClientError

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/decorators.py", line 27, in _handle_async_response
    await func(hass, connection, msg)
  File "/usr/src/homeassistant/homeassistant/components/media_source/__init__.py", line 170, in websocket_browse_media
    media = await async_browse_media(hass, msg.get("media_content_id", ""))
  File "/usr/src/homeassistant/homeassistant/components/media_source/__init__.py", line 121, in async_browse_media
    item = await _get_media_item(hass, media_content_id, None).async_browse()
  File "/usr/src/homeassistant/homeassistant/components/media_source/models.py", line 79, in async_browse
    return await self.async_media_source().async_browse_media(self)
  File "/config/custom_components/frigate/media_source.py", line 706, in async_browse_media
    await self._get_event_summary_data(identifier), identifier, events
  File "/config/custom_components/frigate/media_source.py", line 738, in _get_event_summary_data
    raise MediaSourceError from exc
homeassistant.components.media_source.error.MediaSourceError
2022-12-10 18:20:54.480 ERROR (MainThread) [custom_components.frigate.api] Timeout error fetching information from http://ccab4aaf-frigate:5000/api/events/summary?has_clip=1: 
2022-12-10 18:20:54.481 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [140323839065008] Error handling message: Unknown error (unknown_error) from 192.168.1.39 (Mozilla/5.0 (Linux; Android 10; MAX_10 Build/QP1A.190711.020; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/107.0.5304.141 Safari/537.36)
Traceback (most recent call last):
  File "/config/custom_components/frigate/api.py", line 192, in api_wrapper
    response = await func(
  File "/usr/local/lib/python3.10/site-packages/aiohttp/client.py", line 560, in _request
    await resp.start(conn)
  File "/usr/local/lib/python3.10/site-packages/aiohttp/client_reqrep.py", line 899, in start
    message, payload = await protocol.read()  # type: ignore[union-attr]
  File "/usr/local/lib/python3.10/site-packages/aiohttp/streams.py", line 616, in read
    await self._waiter
asyncio.exceptions.CancelledError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/config/custom_components/frigate/api.py", line 189, in api_wrapper
    async with async_timeout.timeout(TIMEOUT):
  File "/usr/local/lib/python3.10/site-packages/async_timeout/__init__.py", line 129, in __aexit__
    self._do_exit(exc_type)
  File "/usr/local/lib/python3.10/site-packages/async_timeout/__init__.py", line 212, in _do_exit
    raise asyncio.TimeoutError
asyncio.exceptions.TimeoutError

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/config/custom_components/frigate/media_source.py", line 734, in _get_event_summary_data
    summary_data = await self._get_client(identifier).async_get_event_summary(
  File "/config/custom_components/frigate/api.py", line 106, in async_get_event_summary
    await self.api_wrapper(
  File "/config/custom_components/frigate/api.py", line 205, in api_wrapper
    raise FrigateApiClientError from exc
custom_components.frigate.api.FrigateApiClientError

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/decorators.py", line 27, in _handle_async_response
    await func(hass, connection, msg)
  File "/usr/src/homeassistant/homeassistant/components/media_source/__init__.py", line 170, in websocket_browse_media
    media = await async_browse_media(hass, msg.get("media_content_id", ""))
  File "/usr/src/homeassistant/homeassistant/components/media_source/__init__.py", line 121, in async_browse_media
    item = await _get_media_item(hass, media_content_id, None).async_browse()
  File "/usr/src/homeassistant/homeassistant/components/media_source/models.py", line 79, in async_browse
    return await self.async_media_source().async_browse_media(self)
  File "/config/custom_components/frigate/media_source.py", line 706, in async_browse_media
    await self._get_event_summary_data(identifier), identifier, events
  File "/config/custom_components/frigate/media_source.py", line 738, in _get_event_summary_data
    raise MediaSourceError from exc
homeassistant.components.media_source.error.MediaSourceError
2022-12-10 18:20:58.410 ERROR (MainThread) [custom_components.frigate.api] Timeout error fetching information from http://ccab4aaf-frigate:5000/api/events?camera=Front_Yard&limit=50&has_clip=1&include_thumbnails=0: 
2022-12-10 18:20:58.411 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [140323839065008] Error handling message: Unknown error (unknown_error) from 192.168.1.39 (Mozilla/5.0 (Linux; Android 10; MAX_10 Build/QP1A.190711.020; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/107.0.5304.141 Safari/537.36)
Traceback (most recent call last):
  File "/config/custom_components/frigate/api.py", line 192, in api_wrapper
    response = await func(
  File "/usr/local/lib/python3.10/site-packages/aiohttp/client.py", line 560, in _request
    await resp.start(conn)
  File "/usr/local/lib/python3.10/site-packages/aiohttp/client_reqrep.py", line 899, in start
    message, payload = await protocol.read()  # type: ignore[union-attr]
  File "/usr/local/lib/python3.10/site-packages/aiohttp/streams.py", line 616, in read
    await self._waiter
asyncio.exceptions.CancelledError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/config/custom_components/frigate/api.py", line 189, in api_wrapper
    async with async_timeout.timeout(TIMEOUT):
  File "/usr/local/lib/python3.10/site-packages/async_timeout/__init__.py", line 129, in __aexit__
    self._do_exit(exc_type)
  File "/usr/local/lib/python3.10/site-packages/async_timeout/__init__.py", line 212, in _do_exit
    raise asyncio.TimeoutError
asyncio.exceptions.TimeoutError

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/config/custom_components/frigate/media_source.py", line 693, in async_browse_media
    events = await self._get_client(identifier).async_get_events(
  File "/config/custom_components/frigate/api.py", line 81, in async_get_events
    await self.api_wrapper(
  File "/config/custom_components/frigate/api.py", line 205, in api_wrapper
    raise FrigateApiClientError from exc
custom_components.frigate.api.FrigateApiClientError

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/decorators.py", line 27, in _handle_async_response
    await func(hass, connection, msg)
  File "/usr/src/homeassistant/homeassistant/components/media_source/__init__.py", line 170, in websocket_browse_media
    media = await async_browse_media(hass, msg.get("media_content_id", ""))
  File "/usr/src/homeassistant/homeassistant/components/media_source/__init__.py", line 121, in async_browse_media
    item = await _get_media_item(hass, media_content_id, None).async_browse()
  File "/usr/src/homeassistant/homeassistant/components/media_source/models.py", line 79, in async_browse
    return await self.async_media_source().async_browse_media(self)
  File "/config/custom_components/frigate/media_source.py", line 703, in async_browse_media
    raise MediaSourceError from exc
homeassistant.components.media_source.error.MediaSourceError

FFprobe output from your camera

Not available

Frigate stats

No response

Operating system

HassOS

Install method

HassOS Addon

Coral version

USB

Network connection

Wireless

Camera make and model

Reolink

Any other information that may be helpful

Just dropping this in as 2022.12.x may have exposed a bug elsewhere. I think the logs above are the relevant pieces.

NickM-27 commented 1 year ago

For one it looks like you're on an old version, 0.11.1 is out now.

In any case, if anything the issue would be the frigate integration, the frigate addon is not affected by ha core updates

NickM-27 commented 1 year ago

I'd move this to the integration repo