[Bug]: Event previews are sometimes not created #22330
-
Checklist
Describe the problem you are having
I've not found a pattern yet - it seems to affect multiple cameras (Hikvision, Reolink, Protect) - but not consistently i.e. the same camera will sometimes. Happy to have a look through code for possible reasons to explore further if you can point me towards what writes the event previews? Steps to reproducen/a Version0.17.0-f0d69f7 In which browser(s) are you experiencing the issue with?No response Frigate config filen/adocker-compose file or Docker CLI commandn/aRelevant Frigate log output...
2026-03-08 19:11:48.064702532 File "/opt/frigate/frigate/api/media.py", line 1487, in event_preview
2026-03-08 19:11:48.064704627 return preview_gif(request, event.camera, start_ts, end_ts)
2026-03-08 19:11:48.064706664 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2026-03-08 19:11:48.064708786 File "/opt/frigate/frigate/api/media.py", line 1520, in preview_gif
2026-03-08 19:11:48.064710265 .get()
2026-03-08 19:11:48.064711830 ^^^^^
2026-03-08 19:11:48.064728590 File "/usr/local/lib/python3.11/dist-packages/peewee.py", line 7298, in get
2026-03-08 19:11:48.064730894 raise self.model.DoesNotExist('%s instance matching query does '
2026-03-08 19:11:48.064733319 frigate.models.PreviewsDoesNotExist: <Model: Previews> instance matching query does not exist:
2026-03-08 19:11:48.064737901 SQL: SELECT "t1"."camera", "t1"."path", "t1"."duration", "t1"."start_time", "t1"."end_time" FROM "previews" AS "t1" WHERE (((("t1"."start_time" BETWEEN ? AND ?) OR ("t1"."end_time" BETWEEN ? AND ?)) OR (("t1"."start_time" < ?) AND ("t1"."end_time" > ?))) AND ("t1"."camera" = ?)) LIMIT ? OFFSET ?
2026-03-08 19:11:48.064740885 Params: [1772990625.184701, 1772990633.158074, 1772990625.184701, 1772990633.158074, 1772990625.184701, 1772990633.158074, 'front_porch', 1, 0]Relevant go2rtc log outputno errorsOperating systemDebian Install methodDocker Compose Network connectionWired Camera make and modelHikvision Screenshots of the Frigate UI's System metrics pagesn/a Any other information that may be helpfulNo response |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 5 replies
-
|
Based on the error you're experiencing, the issue appears to be that Frigate cannot find a matching preview record in the database for the event's time range(1). The error This is a known issue that has been reported before(1). The error occurs when the API endpoint Some events may not have previews created if:
The same underlying cause affects both the API endpoint and the UI hover behavior you're seeing(1). When you hover over a thumbnail in the Review panel and see a black square with a "Preview not found" message, it's because the preview data is missing from the database(1). For troubleshooting, you might want to check your retention settings for recordings, as preview generation depends on having the underlying recordings available(2)(3). The retention mode configuration affects whether recordings are kept based on motion or all the time(2)(3). 📚 Sources:
Have another question? Just tag @inkeep. |
Beta Was this translation helpful? Give feedback.
-
|
Looks like we should probably just put a |
Beta Was this translation helpful? Give feedback.
-
|
Fixed in #22331 |
Beta Was this translation helpful? Give feedback.
-
|
So previews are generated in |
Beta Was this translation helpful? Give feedback.
Fixed in #22331