[BUG] Database errors when extracting google motion videos #1148

Closed
opened 2026-02-05 00:38:16 +03:00 by OVERLORD · 5 comments
Owner

Originally created by @ishioni on GitHub (Jul 24, 2023).

The bug

I've just upgraded to 1.69.0 and started the extract metadata on my library to extract google motion photos. In the microservices containers i see a multitude of database errors. Here's some of them

[Nest] 8  - 07/23/2023, 11:53:51 PM   ERROR [MetadataExtractionProcessor] Failed to extract live photo upload/library/1b01c614-2b7e-445b-8f23-aa005128fdd5/2021/2021-03-09/PXL_20210309_195815971.jpg: QueryFailedError: null value in column "assetId" of relation "asset_faces" violates not-null constraint
[Nest] 8  - 07/23/2023, 11:53:54 PM   ERROR [MetadataExtractionProcessor] Failed to extract live photo upload/library/880127c5-cd3e-418f-97f7-de1d2b02ac1a/2021/2021-07-12/PXL_20210712_080853442.MP.jpg: QueryFailedError: duplicate key value violates unique constraint "UQ_userid_checksum"

Some motion videos DID get extracted by the process, but not all of them

The OS that Immich Server is running on

Talos 1.4.6

Version of Immich Server

1.69.0

Version of Immich Mobile App

1.69.0

Platform with the issue

  • Server
  • Web
  • Mobile

Your docker-compose.yml content

N/A

Your .env content

N/A

Reproduction steps

1. Upgrade to 1.69.0 with google motion photos already in the library
2. Run metadata extraction job

Additional information

No response

Originally created by @ishioni on GitHub (Jul 24, 2023). ### The bug I've just upgraded to 1.69.0 and started the extract metadata on my library to extract google motion photos. In the microservices containers i see a multitude of database errors. Here's some of them ``` [Nest] 8 - 07/23/2023, 11:53:51 PM ERROR [MetadataExtractionProcessor] Failed to extract live photo upload/library/1b01c614-2b7e-445b-8f23-aa005128fdd5/2021/2021-03-09/PXL_20210309_195815971.jpg: QueryFailedError: null value in column "assetId" of relation "asset_faces" violates not-null constraint [Nest] 8 - 07/23/2023, 11:53:54 PM ERROR [MetadataExtractionProcessor] Failed to extract live photo upload/library/880127c5-cd3e-418f-97f7-de1d2b02ac1a/2021/2021-07-12/PXL_20210712_080853442.MP.jpg: QueryFailedError: duplicate key value violates unique constraint "UQ_userid_checksum" ``` Some motion videos DID get extracted by the process, but not all of them ### The OS that Immich Server is running on Talos 1.4.6 ### Version of Immich Server 1.69.0 ### Version of Immich Mobile App 1.69.0 ### Platform with the issue - [X] Server - [ ] Web - [ ] Mobile ### Your docker-compose.yml content ```YAML N/A ``` ### Your .env content ```Shell N/A ``` ### Reproduction steps ```bash 1. Upgrade to 1.69.0 with google motion photos already in the library 2. Run metadata extraction job ``` ### Additional information _No response_
OVERLORD added the 🗄️server label 2026-02-05 00:38:16 +03:00
Author
Owner

@henley-regatta commented on GitHub (Jul 28, 2023):

I'm seeing the same issue on Immich 1.70.0 although in my case I can't find a single motion video that did get extracted...
(Updated docker-compose.yml to make sure I'm pulling the right images etc). Succession of errors on running metadata extraction job including:

[Nest] 7  - 07/28/2023, 10:04:11 AM   ERROR [MetadataExtractionProcessor] Failed to extract live photo upload/library/admin/2023/2023-07-26/PXL_20230726_114828516.MP.jpg: QueryFailedError: duplicate key value violates unique constraint "UQ_userid_checksum"
[Nest] 7  - 07/28/2023, 10:04:11 AM   ERROR [MetadataExtractionProcessor] Failed to extract live photo upload/library/admin/2023/2023-07-26/PXL_20230726_114818693.MP.jpg: QueryFailedError: duplicate key value violates unique constraint "UQ_userid_checksum"
[Nest] 7  - 07/28/2023, 10:04:12 AM   ERROR [MetadataExtractionProcessor] Failed to extract live photo upload/library/admin/2023/2023-07-25/PXL_20230725_192353595.MP.jpg: QueryFailedError: duplicate key value violates unique constraint "UQ_userid_checksum"
[Nest] 7  - 07/28/2023, 10:04:13 AM   ERROR [MetadataExtractionProcessor] Failed to extract live photo upload/library/admin/2023/2023-07-25/PXL_20230725_192402434.MP.jpg: QueryFailedError: duplicate key value violates unique constraint "UQ_userid_checksum"
[Nest] 7  - 07/28/2023, 10:04:14 AM   ERROR [MetadataExtractionProcessor] Failed to extract live photo upload/library/admin/2023/2023-07-23/PXL_20230723_163522737.MP.jpg: QueryFailedError: duplicate key value violates unique constraint "UQ_userid_checksum"

(All photos come from a Pixel 4a5G)

@henley-regatta commented on GitHub (Jul 28, 2023): I'm seeing the same issue on Immich 1.70.0 although in my case I can't find a single motion video that _did_ get extracted... (Updated `docker-compose.yml` to make sure I'm pulling the right images etc). Succession of errors on running metadata extraction job including: ```[Nest] 7 - 07/28/2023, 10:04:11 AM ERROR [MetadataExtractionProcessor] Failed to extract live photo upload/library/admin/2023/2023-07-26/PXL_20230726_114814954.MP.jpg: QueryFailedError: duplicate key value violates unique constraint "UQ_userid_checksum" [Nest] 7 - 07/28/2023, 10:04:11 AM ERROR [MetadataExtractionProcessor] Failed to extract live photo upload/library/admin/2023/2023-07-26/PXL_20230726_114828516.MP.jpg: QueryFailedError: duplicate key value violates unique constraint "UQ_userid_checksum" [Nest] 7 - 07/28/2023, 10:04:11 AM ERROR [MetadataExtractionProcessor] Failed to extract live photo upload/library/admin/2023/2023-07-26/PXL_20230726_114818693.MP.jpg: QueryFailedError: duplicate key value violates unique constraint "UQ_userid_checksum" [Nest] 7 - 07/28/2023, 10:04:12 AM ERROR [MetadataExtractionProcessor] Failed to extract live photo upload/library/admin/2023/2023-07-25/PXL_20230725_192353595.MP.jpg: QueryFailedError: duplicate key value violates unique constraint "UQ_userid_checksum" [Nest] 7 - 07/28/2023, 10:04:13 AM ERROR [MetadataExtractionProcessor] Failed to extract live photo upload/library/admin/2023/2023-07-25/PXL_20230725_192402434.MP.jpg: QueryFailedError: duplicate key value violates unique constraint "UQ_userid_checksum" [Nest] 7 - 07/28/2023, 10:04:14 AM ERROR [MetadataExtractionProcessor] Failed to extract live photo upload/library/admin/2023/2023-07-23/PXL_20230723_163522737.MP.jpg: QueryFailedError: duplicate key value violates unique constraint "UQ_userid_checksum" ``` (All photos come from a Pixel 4a5G)
Author
Owner

@andrewdavies-net commented on GitHub (Jul 28, 2023):

I'm also seeing the same issue on 1.70, Pixel 6.

immich-microservices-5ff84775b-q697v immich-microservices [Nest] 8  - 07/28/2023, 3:33:31 PM   ERROR [MetadataExtractionProcessor] Failed to extract live photo upload/library/andrew/2022/2022-12-24/PXL_20221224_153540174.jpg: QueryFailedError: duplicate key value violates unique constraint "UQ_userid_checksum"
@andrewdavies-net commented on GitHub (Jul 28, 2023): I'm also seeing the same issue on 1.70, Pixel 6. ``` immich-microservices-5ff84775b-q697v immich-microservices [Nest] 8 - 07/28/2023, 3:33:31 PM ERROR [MetadataExtractionProcessor] Failed to extract live photo upload/library/andrew/2022/2022-12-24/PXL_20221224_153540174.jpg: QueryFailedError: duplicate key value violates unique constraint "UQ_userid_checksum" ```
Author
Owner

@Deathproof76 commented on GitHub (Aug 25, 2023):

Can confirm the same on 1.74, Pixel 6 Pro.

2023-08-25T13:33:49.972438167Z [Nest] 1061  - 08/25/2023, 3:33:49 PM   ERROR [MetadataExtractionProcessor] Failed to extract live photo /photos/library/admin/2022/September-19/PXL_20220919_125222045.MP.jpg: QueryFailedError: duplicate key value violates unique constraint "UQ_userid_checksum"
2023-08-25T13:33:49.979970592Z [Nest] 1061  - 08/25/2023, 3:33:49 PM   ERROR [MetadataExtractionProcessor] Failed to extract live photo /photos/library/admin/2022/September-19/PXL_20220919_125222753.MP.jpg: QueryFailedError: duplicate key value violates unique constraint "UQ_userid_checksum"
2023-08-25T13:33:50.179253728Z [Nest] 1061  - 08/25/2023, 3:33:50 PM   ERROR [MetadataExtractionProcessor] Failed to extract live photo /photos/library/admin/2022/July-27/PXL_20220727_170759189.MP.jpg: QueryFailedError: duplicate key value violates unique constraint "UQ_userid_checksum"
2023-08-25T13:33:50.247849738Z [Nest] 1061  - 08/25/2023, 3:33:50 PM   ERROR [MetadataExtractionProcessor] Failed to extract live photo /photos/library/admin/2022/July-27/PXL_20220727_170750080.MP.jpg: QueryFailedError: duplicate key value violates unique constraint "UQ_userid_checksum"
2023-08-25T13:33:50.600472888Z [Nest] 1061  - 08/25/2023, 3:33:50 PM   ERROR [MetadataExtractionProcessor] Failed to extract live photo /photos/library/admin/2022/July-27/PXL_20220727_165506970.MP.jpg: QueryFailedError: duplicate key value violates unique constraint "UQ_userid_checksum"
2023-08-25T13:33:50.603379612Z [Nest] 1061  - 08/25/2023, 3:33:50 PM   ERROR [MetadataExtractionProcessor] Failed to extract live photo /photos/library/admin/2022/July-27/PXL_20220727_165426691.MP.jpg: QueryFailedError: duplicate key value violates unique constraint "UQ_userid_checksum"
2023-08-25T13:33:50.620393456Z [Nest] 1061  - 08/25/2023, 3:33:50 PM   ERROR [MetadataExtractionProcessor] 
@Deathproof76 commented on GitHub (Aug 25, 2023): Can confirm the same on 1.74, Pixel 6 Pro. ``` 2023-08-25T13:33:49.972438167Z [Nest] 1061 - 08/25/2023, 3:33:49 PM ERROR [MetadataExtractionProcessor] Failed to extract live photo /photos/library/admin/2022/September-19/PXL_20220919_125222045.MP.jpg: QueryFailedError: duplicate key value violates unique constraint "UQ_userid_checksum" 2023-08-25T13:33:49.979970592Z [Nest] 1061 - 08/25/2023, 3:33:49 PM ERROR [MetadataExtractionProcessor] Failed to extract live photo /photos/library/admin/2022/September-19/PXL_20220919_125222753.MP.jpg: QueryFailedError: duplicate key value violates unique constraint "UQ_userid_checksum" 2023-08-25T13:33:50.179253728Z [Nest] 1061 - 08/25/2023, 3:33:50 PM ERROR [MetadataExtractionProcessor] Failed to extract live photo /photos/library/admin/2022/July-27/PXL_20220727_170759189.MP.jpg: QueryFailedError: duplicate key value violates unique constraint "UQ_userid_checksum" 2023-08-25T13:33:50.247849738Z [Nest] 1061 - 08/25/2023, 3:33:50 PM ERROR [MetadataExtractionProcessor] Failed to extract live photo /photos/library/admin/2022/July-27/PXL_20220727_170750080.MP.jpg: QueryFailedError: duplicate key value violates unique constraint "UQ_userid_checksum" 2023-08-25T13:33:50.600472888Z [Nest] 1061 - 08/25/2023, 3:33:50 PM ERROR [MetadataExtractionProcessor] Failed to extract live photo /photos/library/admin/2022/July-27/PXL_20220727_165506970.MP.jpg: QueryFailedError: duplicate key value violates unique constraint "UQ_userid_checksum" 2023-08-25T13:33:50.603379612Z [Nest] 1061 - 08/25/2023, 3:33:50 PM ERROR [MetadataExtractionProcessor] Failed to extract live photo /photos/library/admin/2022/July-27/PXL_20220727_165426691.MP.jpg: QueryFailedError: duplicate key value violates unique constraint "UQ_userid_checksum" 2023-08-25T13:33:50.620393456Z [Nest] 1061 - 08/25/2023, 3:33:50 PM ERROR [MetadataExtractionProcessor] ```
Author
Owner

@jrasm91 commented on GitHub (Sep 14, 2023):

Is this still an issue on the latest release?

@jrasm91 commented on GitHub (Sep 14, 2023): Is this still an issue on the latest release?
Author
Owner

@zsolt-donca commented on GitHub (Sep 14, 2023):

I for one no longer have this issue.

@zsolt-donca commented on GitHub (Sep 14, 2023): I for one no longer have this issue.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: immich-app/immich#1148