[BUG] EXIF date/time parsing error #1350

Closed
opened 2026-02-05 01:22:42 +03:00 by OVERLORD · 12 comments
Owner

Originally created by @daniele-athome on GitHub (Sep 21, 2023).

The bug

Some pictures causes the metadata extraction job to fail.

immich-microservices  | [Nest] 7  - 09/21/2023, 7:29:13 PM   ERROR [JobService] Unable to run job handler (metadataExtraction/metadata-extraction): QueryFailedError: invalid input syntax for type timestamp with time zone: "0NaN-NaN-NaNTNaN:NaN:NaN.NaN+NaN:NaN"
immich-microservices  | [Nest] 7  - 09/21/2023, 7:29:13 PM   ERROR [JobService] QueryFailedError: invalid input syntax for type timestamp with time zone: "0NaN-NaN-NaNTNaN:NaN:NaN.NaN+NaN:NaN"
immich-microservices  |     at PostgresQueryRunner.query (/usr/src/app/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js:211:19)
immich-microservices  |     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
immich-microservices  |     at async InsertQueryBuilder.execute (/usr/src/app/node_modules/typeorm/query-builder/InsertQueryBuilder.js:106:33)
immich-microservices  |     at async AssetRepository.upsertExif (/usr/src/app/dist/infra/repositories/asset.repository.js:37:9)
immich-microservices  |     at async MetadataExtractionProcessor.handleMetadataExtraction (/usr/src/app/dist/microservices/processors/metadata-extraction.processor.js:154:9)
immich-microservices  |     at async /usr/src/app/dist/domain/job/job.service.js:107:37
immich-microservices  |     at async Worker.processJob (/usr/src/app/node_modules/bullmq/dist/cjs/classes/worker.js:346:28)
immich-microservices  |     at async Worker.retryIfFailed (/usr/src/app/node_modules/bullmq/dist/cjs/classes/worker.js:531:24)
immich-microservices  | [Nest] 7  - 09/21/2023, 7:29:13 PM   ERROR [JobService] Object:
immich-microservices  | {
immich-microservices  |   "id": "ce598bfb-6151-4079-9249-2864a7a7ebb9"
immich-microservices  | }

Enabling verbose log microservices will dump the extract tags:

{
  "SourceFile": "/usr/src/app/upload/upload/303c1cf6-df37-475d-a03f-3f6035e16fdc/b14156d2-74c0-42f9-aa15-7eca399526dc.jpg",
  "errors": [],
  "tz": "UTC+4:03",
  "tzSource": "CreateDate",
  "Orientation": 1,
  "FocalLength": 6.3,
  "ExifToolVersion": 12.65,
  "FileName": "b14156d2-74c0-42f9-aa15-7eca399526dc.jpg",
  "Directory": "/usr/src/app/upload/upload/303c1cf6-df37-475d-a03f-3f6035e16fdc",
  "FileSize": "1337 kB",
  "FileModifyDate": {
    "_ctor": "ExifDateTime",
    "year": 2023,
    "month": 9,
    "day": 21,
    "hour": 17,
    "minute": 3,
    "second": 27,
    "tzoffsetMinutes": 0,
    "rawValue": "2023:09:21 17:03:27+00:00",
    "zoneName": "UTC",
    "inferredZone": false
  },
  "FileAccessDate": {
    "_ctor": "ExifDateTime",
    "year": 2023,
    "month": 9,
    "day": 21,
    "hour": 17,
    "minute": 3,
    "second": 27,
    "tzoffsetMinutes": 0,
    "rawValue": "2023:09:21 17:03:27+00:00",
    "zoneName": "UTC",
    "inferredZone": false
  },
  "FileInodeChangeDate": {
    "_ctor": "ExifDateTime",
    "year": 2023,
    "month": 9,
    "day": 21,
    "hour": 17,
    "minute": 3,
    "second": 27,
    "tzoffsetMinutes": 0,
    "rawValue": "2023:09:21 17:03:27+00:00",
    "zoneName": "UTC",
    "inferredZone": false
  },
  "FilePermissions": "-rw-r--r--",
  "FileType": "JPEG",
  "FileTypeExtension": "jpg",
  "MIMEType": "image/jpeg",
  "ExifByteOrder": "Little-endian (Intel, II)",
  "ProcessingSoftware": "digiKam-8.1.0",
  "ImageDescription": "          ",
  "Make": "NIKON",
  "Model": "COOLPIX L1",
  "XResolution": 300,
  "YResolution": 300,
  "ResolutionUnit": "inches",
  "Software": "COOLPIX L1  V1.3",
  "YCbCrPositioning": "Co-sited",
  "ExposureTime": "1/72",
  "FNumber": 2.9,
  "ExposureProgram": "Program AE",
  "ISO": 112,
  "ExifVersion": "0220",
  "ComponentsConfiguration": "Y, Cb, Cr, -",
  "CompressedBitsPerPixel": 2,
  "ExposureCompensation": 0,
  "MaxApertureValue": 2.8,
  "MeteringMode": "Multi-segment",
  "LightSource": "Unknown",
  "Flash": "Auto, Fired",
  "MakerNoteVersion": 2,
  "ColorMode": "Color",
  "Quality": "Normal",
  "WhiteBalance": "Auto",
  "FocusMode": "AF-S",
  "FlashSetting": "Normal",
  "ISOSelection": "Auto",
  "Compression": "JPEG (old-style)",
  "PreviewImageStart": 1718,
  "PreviewImageLength": 17663,
  "ImageProcessing": "",
  "ImageAdjustment": "Auto",
  "AuxiliaryLens": "Off",
  "DigitalZoom": 1,
  "AFAreaMode": "Single Area",
  "AFPoint": "Center",
  "AFPointsInFocus": "(none)",
  "SceneMode": "",
  "SaturationAdj": 0,
  "NoiseReduction": "Off",
  "WB_RBGGLevels": "0 0 0 0",
  "SceneAssist": "",
  "DateStampMode": "Off",
  "RetouchHistory": "None",
  "UserComment": "",
  "FlashpixVersion": "0100",
  "ColorSpace": "sRGB",
  "ExifImageWidth": 2112,
  "ExifImageHeight": 2816,
  "InteropIndex": "R98 - DCF basic file (sRGB)",
  "InteropVersion": "0100",
  "FileSource": "Digital Camera",
  "SceneType": "Directly photographed",
  "CustomRendered": "Normal",
  "ExposureMode": "Auto",
  "DigitalZoomRatio": 0,
  "FocalLengthIn35mmFormat": "38 mm",
  "SceneCaptureType": "Standard",
  "GainControl": "Low gain up",
  "Contrast": "Normal",
  "Saturation": "Normal",
  "Sharpness": "Normal",
  "SubjectDistanceRange": "Unknown",
  "ThumbnailOffset": 19642,
  "ThumbnailLength": 4332,
  "XMPToolkit": "XMP Core 4.4.0-Exiv2",
  "CreatorTool": "digiKam-8.1.0",
  "CurrentIPTCDigest": "00000000000000000000000000000000",
  "OriginatingProgram": "digiKam",
  "ProgramVersion": "8.1.0",
  "ImageWidth": 2112,
  "ImageHeight": 2816,
  "EncodingProcess": "Baseline DCT, Huffman coding",
  "BitsPerSample": 8,
  "ColorComponents": 3,
  "YCbCrSubSampling": "YCbCr4:4:0 (1 2)",
  "Aperture": 2.9,
  "ImageSize": "2112x2816",
  "Megapixels": 5.9,
  "PreviewImage": {
    "_ctor": "BinaryField",
    "bytes": 17663,
    "rawValue": "(Binary data 17663 bytes, use -b option to extract)"
  },
  "ScaleFactor35efl": 6,
  "ShutterSpeed": "1/72",
  "ThumbnailImage": {
    "_ctor": "BinaryField",
    "bytes": 4332,
    "rawValue": "(Binary data 4332 bytes, use -b option to extract)"
  },
  "CreateDate": {
    "_ctor": "ExifDateTime",
    "year": 2010,
    "month": 1,
    "day": 2,
    "hour": 11,
    "minute": 4,
    "second": 3,
    "tzoffsetMinutes": 243,
    "rawValue": "2010:01:02 11:04:03",
    "zoneName": "UTC+4:3",
    "inferredZone": true
  },
  "DateTimeOriginal": {
    "_ctor": "ExifDateTime",
    "year": 2010,
    "month": 1,
    "day": 2,
    "hour": 11,
    "minute": 4,
    "second": 3,
    "tzoffsetMinutes": 243,
    "rawValue": "2010:01:02 11:04:03",
    "zoneName": "UTC+4:3",
    "inferredZone": true
  },
  "ModifyDate": {
    "_ctor": "ExifDateTime",
    "year": 2010,
    "month": 1,
    "day": 2,
    "hour": 11,
    "minute": 4,
    "second": 3,
    "tzoffsetMinutes": 243,
    "rawValue": "2010:01:02 11:04:03",
    "zoneName": "UTC+4:3",
    "inferredZone": true
  },
  "CircleOfConfusion": "0.005 mm",
  "FOV": "50.7 deg",
  "FocalLength35efl": "6.3 mm (35 mm equivalent: 38.0 mm)",
  "HyperfocalDistance": "2.75 m",
  "LightValue": 9.1
}

The OS that Immich Server is running on

Debian

Version of Immich Server

v1.79.0

Version of Immich Mobile App

(not applicable)

Platform with the issue

  • Server
  • Web
  • Mobile

Your docker-compose.yml content

(standard)

Your .env content

(standard)

Reproduction steps

1. (cannot provide the original image and it doesn't happen with every asset)

Additional information

No response

Originally created by @daniele-athome on GitHub (Sep 21, 2023). ### The bug Some pictures causes the metadata extraction job to fail. ``` immich-microservices | [Nest] 7 - 09/21/2023, 7:29:13 PM ERROR [JobService] Unable to run job handler (metadataExtraction/metadata-extraction): QueryFailedError: invalid input syntax for type timestamp with time zone: "0NaN-NaN-NaNTNaN:NaN:NaN.NaN+NaN:NaN" immich-microservices | [Nest] 7 - 09/21/2023, 7:29:13 PM ERROR [JobService] QueryFailedError: invalid input syntax for type timestamp with time zone: "0NaN-NaN-NaNTNaN:NaN:NaN.NaN+NaN:NaN" immich-microservices | at PostgresQueryRunner.query (/usr/src/app/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js:211:19) immich-microservices | at process.processTicksAndRejections (node:internal/process/task_queues:95:5) immich-microservices | at async InsertQueryBuilder.execute (/usr/src/app/node_modules/typeorm/query-builder/InsertQueryBuilder.js:106:33) immich-microservices | at async AssetRepository.upsertExif (/usr/src/app/dist/infra/repositories/asset.repository.js:37:9) immich-microservices | at async MetadataExtractionProcessor.handleMetadataExtraction (/usr/src/app/dist/microservices/processors/metadata-extraction.processor.js:154:9) immich-microservices | at async /usr/src/app/dist/domain/job/job.service.js:107:37 immich-microservices | at async Worker.processJob (/usr/src/app/node_modules/bullmq/dist/cjs/classes/worker.js:346:28) immich-microservices | at async Worker.retryIfFailed (/usr/src/app/node_modules/bullmq/dist/cjs/classes/worker.js:531:24) immich-microservices | [Nest] 7 - 09/21/2023, 7:29:13 PM ERROR [JobService] Object: immich-microservices | { immich-microservices | "id": "ce598bfb-6151-4079-9249-2864a7a7ebb9" immich-microservices | } ``` Enabling verbose log microservices will dump the extract tags: ```json { "SourceFile": "/usr/src/app/upload/upload/303c1cf6-df37-475d-a03f-3f6035e16fdc/b14156d2-74c0-42f9-aa15-7eca399526dc.jpg", "errors": [], "tz": "UTC+4:03", "tzSource": "CreateDate", "Orientation": 1, "FocalLength": 6.3, "ExifToolVersion": 12.65, "FileName": "b14156d2-74c0-42f9-aa15-7eca399526dc.jpg", "Directory": "/usr/src/app/upload/upload/303c1cf6-df37-475d-a03f-3f6035e16fdc", "FileSize": "1337 kB", "FileModifyDate": { "_ctor": "ExifDateTime", "year": 2023, "month": 9, "day": 21, "hour": 17, "minute": 3, "second": 27, "tzoffsetMinutes": 0, "rawValue": "2023:09:21 17:03:27+00:00", "zoneName": "UTC", "inferredZone": false }, "FileAccessDate": { "_ctor": "ExifDateTime", "year": 2023, "month": 9, "day": 21, "hour": 17, "minute": 3, "second": 27, "tzoffsetMinutes": 0, "rawValue": "2023:09:21 17:03:27+00:00", "zoneName": "UTC", "inferredZone": false }, "FileInodeChangeDate": { "_ctor": "ExifDateTime", "year": 2023, "month": 9, "day": 21, "hour": 17, "minute": 3, "second": 27, "tzoffsetMinutes": 0, "rawValue": "2023:09:21 17:03:27+00:00", "zoneName": "UTC", "inferredZone": false }, "FilePermissions": "-rw-r--r--", "FileType": "JPEG", "FileTypeExtension": "jpg", "MIMEType": "image/jpeg", "ExifByteOrder": "Little-endian (Intel, II)", "ProcessingSoftware": "digiKam-8.1.0", "ImageDescription": " ", "Make": "NIKON", "Model": "COOLPIX L1", "XResolution": 300, "YResolution": 300, "ResolutionUnit": "inches", "Software": "COOLPIX L1 V1.3", "YCbCrPositioning": "Co-sited", "ExposureTime": "1/72", "FNumber": 2.9, "ExposureProgram": "Program AE", "ISO": 112, "ExifVersion": "0220", "ComponentsConfiguration": "Y, Cb, Cr, -", "CompressedBitsPerPixel": 2, "ExposureCompensation": 0, "MaxApertureValue": 2.8, "MeteringMode": "Multi-segment", "LightSource": "Unknown", "Flash": "Auto, Fired", "MakerNoteVersion": 2, "ColorMode": "Color", "Quality": "Normal", "WhiteBalance": "Auto", "FocusMode": "AF-S", "FlashSetting": "Normal", "ISOSelection": "Auto", "Compression": "JPEG (old-style)", "PreviewImageStart": 1718, "PreviewImageLength": 17663, "ImageProcessing": "", "ImageAdjustment": "Auto", "AuxiliaryLens": "Off", "DigitalZoom": 1, "AFAreaMode": "Single Area", "AFPoint": "Center", "AFPointsInFocus": "(none)", "SceneMode": "", "SaturationAdj": 0, "NoiseReduction": "Off", "WB_RBGGLevels": "0 0 0 0", "SceneAssist": "", "DateStampMode": "Off", "RetouchHistory": "None", "UserComment": "", "FlashpixVersion": "0100", "ColorSpace": "sRGB", "ExifImageWidth": 2112, "ExifImageHeight": 2816, "InteropIndex": "R98 - DCF basic file (sRGB)", "InteropVersion": "0100", "FileSource": "Digital Camera", "SceneType": "Directly photographed", "CustomRendered": "Normal", "ExposureMode": "Auto", "DigitalZoomRatio": 0, "FocalLengthIn35mmFormat": "38 mm", "SceneCaptureType": "Standard", "GainControl": "Low gain up", "Contrast": "Normal", "Saturation": "Normal", "Sharpness": "Normal", "SubjectDistanceRange": "Unknown", "ThumbnailOffset": 19642, "ThumbnailLength": 4332, "XMPToolkit": "XMP Core 4.4.0-Exiv2", "CreatorTool": "digiKam-8.1.0", "CurrentIPTCDigest": "00000000000000000000000000000000", "OriginatingProgram": "digiKam", "ProgramVersion": "8.1.0", "ImageWidth": 2112, "ImageHeight": 2816, "EncodingProcess": "Baseline DCT, Huffman coding", "BitsPerSample": 8, "ColorComponents": 3, "YCbCrSubSampling": "YCbCr4:4:0 (1 2)", "Aperture": 2.9, "ImageSize": "2112x2816", "Megapixels": 5.9, "PreviewImage": { "_ctor": "BinaryField", "bytes": 17663, "rawValue": "(Binary data 17663 bytes, use -b option to extract)" }, "ScaleFactor35efl": 6, "ShutterSpeed": "1/72", "ThumbnailImage": { "_ctor": "BinaryField", "bytes": 4332, "rawValue": "(Binary data 4332 bytes, use -b option to extract)" }, "CreateDate": { "_ctor": "ExifDateTime", "year": 2010, "month": 1, "day": 2, "hour": 11, "minute": 4, "second": 3, "tzoffsetMinutes": 243, "rawValue": "2010:01:02 11:04:03", "zoneName": "UTC+4:3", "inferredZone": true }, "DateTimeOriginal": { "_ctor": "ExifDateTime", "year": 2010, "month": 1, "day": 2, "hour": 11, "minute": 4, "second": 3, "tzoffsetMinutes": 243, "rawValue": "2010:01:02 11:04:03", "zoneName": "UTC+4:3", "inferredZone": true }, "ModifyDate": { "_ctor": "ExifDateTime", "year": 2010, "month": 1, "day": 2, "hour": 11, "minute": 4, "second": 3, "tzoffsetMinutes": 243, "rawValue": "2010:01:02 11:04:03", "zoneName": "UTC+4:3", "inferredZone": true }, "CircleOfConfusion": "0.005 mm", "FOV": "50.7 deg", "FocalLength35efl": "6.3 mm (35 mm equivalent: 38.0 mm)", "HyperfocalDistance": "2.75 m", "LightValue": 9.1 } ``` ### The OS that Immich Server is running on Debian ### Version of Immich Server v1.79.0 ### Version of Immich Mobile App (not applicable) ### Platform with the issue - [X] Server - [ ] Web - [ ] Mobile ### Your docker-compose.yml content ```YAML (standard) ``` ### Your .env content ```Shell (standard) ``` ### Reproduction steps ```bash 1. (cannot provide the original image and it doesn't happen with every asset) ``` ### Additional information _No response_
Author
Owner

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

Upstream bug:

https://github.com/photostructure/exiftool-vendored.js/issues/157

@jrasm91 commented on GitHub (Sep 21, 2023): Upstream bug: https://github.com/photostructure/exiftool-vendored.js/issues/157
Author
Owner

@badbreze commented on GitHub (Sep 22, 2023):

DSCF1976

This photo is affected in my environment

@badbreze commented on GitHub (Sep 22, 2023): ![DSCF1976](https://github.com/immich-app/immich/assets/4717061/ce9cd6a8-28ff-465d-8bcf-8681db485c3f) This photo is affected in my environment
Author
Owner

@ayykamp commented on GitHub (Sep 22, 2023):

Another example image

DSC09312

Error log `[Nest] 8 - 09/21/2023, 11:07:04 PM ERROR [JobService] Unable to run job handler (metadataExtraction/metadata-extraction): QueryFailedError: invalid input syntax for type timestamp with time zone: "0NaN-NaN-NaNTNaN:NaN:NaN.NaN+NaN:NaN" [Nest] 8 - 09/21/2023, 11:07:04 PM ERROR [JobService] QueryFailedError: invalid input syntax for type timestamp with time zone: "0NaN-NaN-NaNTNaN:NaN:NaN.NaN+NaN:NaN" at PostgresQueryRunner.query (/usr/src/app/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js:211:19) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async InsertQueryBuilder.execute (/usr/src/app/node_modules/typeorm/query-builder/InsertQueryBuilder.js:106:33) at async AssetRepository.upsertExif (/usr/src/app/dist/infra/repositories/asset.repository.js:37:9) at async MetadataExtractionProcessor.handleMetadataExtraction (/usr/src/app/dist/microservices/processors/metadata-extraction.processor.js:154:9) at async /usr/src/app/dist/domain/job/job.service.js:107:37 at async Worker.processJob (/usr/src/app/node_modules/bullmq/dist/cjs/classes/worker.js:346:28) at async Worker.retryIfFailed (/usr/src/app/node_modules/bullmq/dist/cjs/classes/worker.js:531:24) [Nest] 8 - 09/21/2023, 11:07:04 PM ERROR [JobService] Object: { "id": "acf712f3-ce00-41c6-bcac-920f2a8aa1bd" }`
@ayykamp commented on GitHub (Sep 22, 2023): <details> <summary>Another example image</summary> ![DSC09312](https://github.com/immich-app/immich/assets/32194363/f68ad235-cc06-4879-b6b3-8ba3da9d9a45) </details> <details> <summary>Error log</summary> `[Nest] 8 - 09/21/2023, 11:07:04 PM ERROR [JobService] Unable to run job handler (metadataExtraction/metadata-extraction): QueryFailedError: invalid input syntax for type timestamp with time zone: "0NaN-NaN-NaNTNaN:NaN:NaN.NaN+NaN:NaN" [Nest] 8 - 09/21/2023, 11:07:04 PM ERROR [JobService] QueryFailedError: invalid input syntax for type timestamp with time zone: "0NaN-NaN-NaNTNaN:NaN:NaN.NaN+NaN:NaN" at PostgresQueryRunner.query (/usr/src/app/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js:211:19) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async InsertQueryBuilder.execute (/usr/src/app/node_modules/typeorm/query-builder/InsertQueryBuilder.js:106:33) at async AssetRepository.upsertExif (/usr/src/app/dist/infra/repositories/asset.repository.js:37:9) at async MetadataExtractionProcessor.handleMetadataExtraction (/usr/src/app/dist/microservices/processors/metadata-extraction.processor.js:154:9) at async /usr/src/app/dist/domain/job/job.service.js:107:37 at async Worker.processJob (/usr/src/app/node_modules/bullmq/dist/cjs/classes/worker.js:346:28) at async Worker.retryIfFailed (/usr/src/app/node_modules/bullmq/dist/cjs/classes/worker.js:531:24) [Nest] 8 - 09/21/2023, 11:07:04 PM ERROR [JobService] Object: { "id": "acf712f3-ce00-41c6-bcac-920f2a8aa1bd" }` </details>
Author
Owner

@yannpub commented on GitHub (Sep 22, 2023):

I am facing the same issue, exact same error message.
I did ran my pics with exiftool 12.60 and 12.67, both were perfectly extracting the meta-data. I compared different pics, but could not identify a specific pattern that would be different on the pics for which the metadata are failing compared to those which are working.

@yannpub commented on GitHub (Sep 22, 2023): I am facing the same issue, exact same error message. I did ran my pics with exiftool 12.60 and 12.67, both were perfectly extracting the meta-data. I compared different pics, but could not identify a specific pattern that would be different on the pics for which the metadata are failing compared to those which are working.
Author
Owner

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

It happens when one date column has a timezone and one doesn't.

@jrasm91 commented on GitHub (Sep 22, 2023): It happens when one date column has a timezone and one doesn't.
Author
Owner

@Cebrain commented on GitHub (Sep 23, 2023):

I tested to set the TZ Variable but no luck

image

@Cebrain commented on GitHub (Sep 23, 2023): I tested to set the TZ Variable but no luck ![image](https://github.com/immich-app/immich/assets/78339531/49c3efc8-9755-41b8-9150-c8b38a3ebd98)
Author
Owner

@badbreze commented on GitHub (Sep 23, 2023):

Reverting the package "exiftool-vendored" to "^22.0.0" seems to fix the problem for me!

it comes from the PR #2908

@badbreze commented on GitHub (Sep 23, 2023): Reverting the package "exiftool-vendored" to "^22.0.0" seems to fix the problem for me! it comes from the PR #2908
Author
Owner

@daniele-athome commented on GitHub (Sep 23, 2023):

@jrasm91 is it doable to downgrade until the upstream bug is fixed?

@daniele-athome commented on GitHub (Sep 23, 2023): @jrasm91 is it doable to downgrade until the upstream bug is fixed?
Author
Owner

@daniele-athome commented on GitHub (Sep 25, 2023):

Supposedly closed by #4210, but see comments over there.

@daniele-athome commented on GitHub (Sep 25, 2023): Supposedly closed by #4210, but [see comments over there](https://github.com/immich-app/immich/pull/4210#issuecomment-1733849383).
Author
Owner

@davidecavestro commented on GitHub (Sep 26, 2023):

I see a lot of similar errors while extracting metadata from XMP sidecar files, mostly regarding the iso field:

immich-database-1        | 2023-09-25 14:28:15.470 UTC [456] ERROR:  invalid input syntax for type integer: "{"500"}"
immich-database-1        | 2023-09-25 14:28:15.470 UTC [456] CONTEXT:  unnamed portal parameter $21 = '...'
immich-database-1        | 2023-09-25 14:28:15.470 UTC [456] STATEMENT:  INSERT INTO "exif"("assetId", "description", "exifImageWidth", "exifImageHeight", "fileSizeInByte", "orientation", "dateTimeOriginal", "modifyDate", "timeZone", "latitude", "longitude", "projectionType", "city", "livePhotoCID", "state", "country", "make", "model", "lensModel", "fNumber", "focalLength", "iso", "exposureTime", "fps", "exifTextSearchableColumn") VALUES ($1, DEFAULT, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22, $23, DEFAULT) ON CONFLICT ( "assetId" ) DO UPDATE SET "assetId" = EXCLUDED."assetId", "exifImageWidth" = EXCLUDED."exifImageWidth", "exifImageHeight" = EXCLUDED."exifImageHeight", "fileSizeInByte" = EXCLUDED."fileSizeInByte", "orientation" = EXCLUDED."orientation", "dateTimeOriginal" = EXCLUDED."dateTimeOriginal", "modifyDate" = EXCLUDED."modifyDate", "timeZone" = EXCLUDED."timeZone", "latitude" = EXCLUDED."latitude", "longitude" = EXCLUDED."longitude", "projectionType" = EXCLUDED."projectionType", "city" = EXCLUDED."city", "livePhotoCID" = EXCLUDED."livePhotoCID", "state" = EXCLUDED."state", "country" = EXCLUDED."country", "make" = EXCLUDED."make", "model" = EXCLUDED."model", "lensModel" = EXCLUDED."lensModel", "fNumber" = EXCLUDED."fNumber", "focalLength" = EXCLUDED."focalLength", "iso" = EXCLUDED."iso", "exposureTime" = EXCLUDED."exposureTime", "fps" = EXCLUDED."fps"  RETURNING "description"
immich_microservices     | [Nest] 7  - 09/25/2023, 2:28:15 PM   ERROR [JobService] Unable to run job handler (metadataExtraction/metadata-extraction): QueryFailedError: invalid input syntax for type integer: "{"500"}"
immich_microservices     | [Nest] 7  - 09/25/2023, 2:28:15 PM   ERROR [JobService] QueryFailedError: invalid input syntax for type integer: "{"500"}"
immich_microservices     |     at PostgresQueryRunner.query (/usr/src/app/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js:211:19)
immich_microservices     |     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
immich_microservices     |     at async InsertQueryBuilder.execute (/usr/src/app/node_modules/typeorm/query-builder/InsertQueryBuilder.js:106:33)
immich_microservices     |     at async AssetRepository.upsertExif (/usr/src/app/dist/infra/repositories/asset.repository.js:37:9)
immich_microservices     |     at async MetadataExtractionProcessor.handleMetadataExtraction (/usr/src/app/dist/microservices/processors/metadata-extraction.processor.js:154:9)
immich_microservices     |     at async /usr/src/app/dist/domain/job/job.service.js:107:37
immich_microservices     |     at async Worker.processJob (/usr/src/app/node_modules/bullmq/dist/cjs/classes/worker.js:346:28)
immich_microservices     |     at async Worker.retryIfFailed (/usr/src/app/node_modules/bullmq/dist/cjs/classes/worker.js:531:24)
immich_microservices     | [Nest] 7  - 09/25/2023, 2:28:15 PM   ERROR [JobService] Object:
immich_microservices     | {
immich_microservices     |   "id": "de31b52b-8069-4a5d-a98a-d6bc6c4f12c4",
immich_microservices     |   "source": "upload"
immich_microservices     | }

where its value on XMP sidecar file is

  <exif:ISOSpeedRatings>
   <rdf:Seq>
    <rdf:li>500</rdf:li>
   </rdf:Seq>
  </exif:ISOSpeedRatings>

Since I've manually generated the XMP based on related contents from Takeout I am going to strip the ISO field, though I wonder whether this is related to having a single value on a list datatype.

@davidecavestro commented on GitHub (Sep 26, 2023): I see a lot of similar errors while extracting metadata from XMP sidecar files, mostly regarding the _iso_ field: ``` immich-database-1 | 2023-09-25 14:28:15.470 UTC [456] ERROR: invalid input syntax for type integer: "{"500"}" immich-database-1 | 2023-09-25 14:28:15.470 UTC [456] CONTEXT: unnamed portal parameter $21 = '...' immich-database-1 | 2023-09-25 14:28:15.470 UTC [456] STATEMENT: INSERT INTO "exif"("assetId", "description", "exifImageWidth", "exifImageHeight", "fileSizeInByte", "orientation", "dateTimeOriginal", "modifyDate", "timeZone", "latitude", "longitude", "projectionType", "city", "livePhotoCID", "state", "country", "make", "model", "lensModel", "fNumber", "focalLength", "iso", "exposureTime", "fps", "exifTextSearchableColumn") VALUES ($1, DEFAULT, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22, $23, DEFAULT) ON CONFLICT ( "assetId" ) DO UPDATE SET "assetId" = EXCLUDED."assetId", "exifImageWidth" = EXCLUDED."exifImageWidth", "exifImageHeight" = EXCLUDED."exifImageHeight", "fileSizeInByte" = EXCLUDED."fileSizeInByte", "orientation" = EXCLUDED."orientation", "dateTimeOriginal" = EXCLUDED."dateTimeOriginal", "modifyDate" = EXCLUDED."modifyDate", "timeZone" = EXCLUDED."timeZone", "latitude" = EXCLUDED."latitude", "longitude" = EXCLUDED."longitude", "projectionType" = EXCLUDED."projectionType", "city" = EXCLUDED."city", "livePhotoCID" = EXCLUDED."livePhotoCID", "state" = EXCLUDED."state", "country" = EXCLUDED."country", "make" = EXCLUDED."make", "model" = EXCLUDED."model", "lensModel" = EXCLUDED."lensModel", "fNumber" = EXCLUDED."fNumber", "focalLength" = EXCLUDED."focalLength", "iso" = EXCLUDED."iso", "exposureTime" = EXCLUDED."exposureTime", "fps" = EXCLUDED."fps" RETURNING "description" immich_microservices | [Nest] 7 - 09/25/2023, 2:28:15 PM ERROR [JobService] Unable to run job handler (metadataExtraction/metadata-extraction): QueryFailedError: invalid input syntax for type integer: "{"500"}" immich_microservices | [Nest] 7 - 09/25/2023, 2:28:15 PM ERROR [JobService] QueryFailedError: invalid input syntax for type integer: "{"500"}" immich_microservices | at PostgresQueryRunner.query (/usr/src/app/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js:211:19) immich_microservices | at process.processTicksAndRejections (node:internal/process/task_queues:95:5) immich_microservices | at async InsertQueryBuilder.execute (/usr/src/app/node_modules/typeorm/query-builder/InsertQueryBuilder.js:106:33) immich_microservices | at async AssetRepository.upsertExif (/usr/src/app/dist/infra/repositories/asset.repository.js:37:9) immich_microservices | at async MetadataExtractionProcessor.handleMetadataExtraction (/usr/src/app/dist/microservices/processors/metadata-extraction.processor.js:154:9) immich_microservices | at async /usr/src/app/dist/domain/job/job.service.js:107:37 immich_microservices | at async Worker.processJob (/usr/src/app/node_modules/bullmq/dist/cjs/classes/worker.js:346:28) immich_microservices | at async Worker.retryIfFailed (/usr/src/app/node_modules/bullmq/dist/cjs/classes/worker.js:531:24) immich_microservices | [Nest] 7 - 09/25/2023, 2:28:15 PM ERROR [JobService] Object: immich_microservices | { immich_microservices | "id": "de31b52b-8069-4a5d-a98a-d6bc6c4f12c4", immich_microservices | "source": "upload" immich_microservices | } ``` where its value on XMP sidecar file is ``` <exif:ISOSpeedRatings> <rdf:Seq> <rdf:li>500</rdf:li> </rdf:Seq> </exif:ISOSpeedRatings> ``` Since I've manually generated the XMP based on related contents from Takeout I am going to strip the ISO field, though I wonder whether this is related to having a single value on a list datatype.
Author
Owner

@daniele-athome commented on GitHub (Sep 26, 2023):

@davidecavestro this might be another bug, please open another issue for tracking, thank you.

@daniele-athome commented on GitHub (Sep 26, 2023): @davidecavestro this might be another bug, please open another issue for tracking, thank you.
Author
Owner

@davidecavestro commented on GitHub (Sep 26, 2023):

@davidecavestro this might be another bug, please open another issue for tracking, thank you.

PLease check https://github.com/immich-app/immich/issues/4245

@davidecavestro commented on GitHub (Sep 26, 2023): > @davidecavestro this might be another bug, please open another issue for tracking, thank you. PLease check https://github.com/immich-app/immich/issues/4245
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: immich-app/immich#1350