Query failed error while uploading assets using immich-go #7800

Closed
opened 2026-02-05 13:18:52 +03:00 by OVERLORD · 2 comments
Owner

Originally created by @sebasb21 on GitHub (Nov 10, 2025).

I have searched the existing issues, both open and closed, to make sure this is not a duplicate report.

  • Yes

The bug

during a immich-go migration from immich server to immich server, using a date range

The OS that Immich Server is running on

truenas

Version of Immich Server

1.10.12

Version of Immich Mobile App

na

Platform with the issue

  • Server
  • Web
  • Mobile

Device make and model

No response

Your docker-compose.yml content

na

Your .env content

na

Reproduction steps

immich-go upload from immich server

Relevant log output

Query failed : {
2025-11-10 17:01:42.389906+00:00durationMs: 1.3471150000113994,
2025-11-10 17:01:42.389928+00:00error: PostgresError: date/time field value out of range: "0000-12-31T16:07:02-07:52"
2025-11-10 17:01:42.389944+00:00at ErrorResponse (/usr/src/app/server/node_modules/.pnpm/postgres@3.4.7/node_modules/postgres/cjs/src/connection.js:794:26)
2025-11-10 17:01:42.389960+00:00at handle (/usr/src/app/server/node_modules/.pnpm/postgres@3.4.7/node_modules/postgres/cjs/src/connection.js:480:6)
2025-11-10 17:01:42.389977+00:00at Socket.data (/usr/src/app/server/node_modules/.pnpm/postgres@3.4.7/node_modules/postgres/cjs/src/connection.js:315:9)
2025-11-10 17:01:42.389992+00:00at Socket.emit (node:events:518:28)
2025-11-10 17:01:42.390007+00:00at addChunk (node:internal/streams/readable:561:12)
2025-11-10 17:01:42.390023+00:00at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)
2025-11-10 17:01:42.390039+00:00at Readable.push (node:internal/streams/readable:392:5)
2025-11-10 17:01:42.390059+00:00at TCP.onStreamRead (node:internal/stream_base_commons:189:23)
2025-11-10 17:01:42.390076+00:00at TCP.callbackTrampoline (node:internal/async_hooks:130:17) {
2025-11-10 17:01:42.390091+00:00severity_local: 'ERROR',
2025-11-10 17:01:42.390109+00:00severity: 'ERROR',
2025-11-10 17:01:42.390124+00:00code: '22008',
2025-11-10 17:01:42.390140+00:00where: "unnamed portal parameter $2 = '...'",
2025-11-10 17:01:42.390155+00:00file: 'datetime.c',
2025-11-10 17:01:42.390171+00:00line: '4021',
2025-11-10 17:01:42.390186+00:00routine: 'DateTimeParseError'
2025-11-10 17:01:42.390202+00:00},
2025-11-10 17:01:42.390218+00:00sql: 'insert into "asset_exif" ("assetId", "dateTimeOriginal") values ($1::uuid, $2) on conflict ("assetId") do update set "dateTimeOriginal" = "excluded"."dateTimeOriginal"',
2025-11-10 17:01:42.390238+00:00params: [
2025-11-10 17:01:42.390254+00:00'7dafa4a6-de8e-46de-abda-7247dc044b6f',
2025-11-10 17:01:42.390270+00:00'0000-12-31T16:07:02-07:52'
2025-11-10 17:01:42.390287+00:00]
2025-11-10 17:01:42.390311+00:00}
2025-11-10 17:01:42.390331+00:00[Nest] 80  - 11/10/2025, 5:01:42 PM   ERROR [Api:ErrorInterceptor~1gzmg064] Unknown error: PostgresError: date/time field value out of range: "0000-12-31T16:07:02-07:52"

Additional information

No response

Originally created by @sebasb21 on GitHub (Nov 10, 2025). ### I have searched the existing issues, both open and closed, to make sure this is not a duplicate report. - [x] Yes ### The bug during a immich-go migration from immich server to immich server, using a date range ### The OS that Immich Server is running on truenas ### Version of Immich Server 1.10.12 ### Version of Immich Mobile App na ### Platform with the issue - [x] Server - [ ] Web - [ ] Mobile ### Device make and model _No response_ ### Your docker-compose.yml content ```YAML na ``` ### Your .env content ```Shell na ``` ### Reproduction steps immich-go upload from immich server ### Relevant log output ```shell Query failed : { 2025-11-10 17:01:42.389906+00:00durationMs: 1.3471150000113994, 2025-11-10 17:01:42.389928+00:00error: PostgresError: date/time field value out of range: "0000-12-31T16:07:02-07:52" 2025-11-10 17:01:42.389944+00:00at ErrorResponse (/usr/src/app/server/node_modules/.pnpm/postgres@3.4.7/node_modules/postgres/cjs/src/connection.js:794:26) 2025-11-10 17:01:42.389960+00:00at handle (/usr/src/app/server/node_modules/.pnpm/postgres@3.4.7/node_modules/postgres/cjs/src/connection.js:480:6) 2025-11-10 17:01:42.389977+00:00at Socket.data (/usr/src/app/server/node_modules/.pnpm/postgres@3.4.7/node_modules/postgres/cjs/src/connection.js:315:9) 2025-11-10 17:01:42.389992+00:00at Socket.emit (node:events:518:28) 2025-11-10 17:01:42.390007+00:00at addChunk (node:internal/streams/readable:561:12) 2025-11-10 17:01:42.390023+00:00at readableAddChunkPushByteMode (node:internal/streams/readable:512:3) 2025-11-10 17:01:42.390039+00:00at Readable.push (node:internal/streams/readable:392:5) 2025-11-10 17:01:42.390059+00:00at TCP.onStreamRead (node:internal/stream_base_commons:189:23) 2025-11-10 17:01:42.390076+00:00at TCP.callbackTrampoline (node:internal/async_hooks:130:17) { 2025-11-10 17:01:42.390091+00:00severity_local: 'ERROR', 2025-11-10 17:01:42.390109+00:00severity: 'ERROR', 2025-11-10 17:01:42.390124+00:00code: '22008', 2025-11-10 17:01:42.390140+00:00where: "unnamed portal parameter $2 = '...'", 2025-11-10 17:01:42.390155+00:00file: 'datetime.c', 2025-11-10 17:01:42.390171+00:00line: '4021', 2025-11-10 17:01:42.390186+00:00routine: 'DateTimeParseError' 2025-11-10 17:01:42.390202+00:00}, 2025-11-10 17:01:42.390218+00:00sql: 'insert into "asset_exif" ("assetId", "dateTimeOriginal") values ($1::uuid, $2) on conflict ("assetId") do update set "dateTimeOriginal" = "excluded"."dateTimeOriginal"', 2025-11-10 17:01:42.390238+00:00params: [ 2025-11-10 17:01:42.390254+00:00'7dafa4a6-de8e-46de-abda-7247dc044b6f', 2025-11-10 17:01:42.390270+00:00'0000-12-31T16:07:02-07:52' 2025-11-10 17:01:42.390287+00:00] 2025-11-10 17:01:42.390311+00:00} 2025-11-10 17:01:42.390331+00:00[Nest] 80 - 11/10/2025, 5:01:42 PM  ERROR [Api:ErrorInterceptor~1gzmg064] Unknown error: PostgresError: date/time field value out of range: "0000-12-31T16:07:02-07:52" ``` ### Additional information _No response_
Author
Owner

@bo0tzz commented on GitHub (Nov 10, 2025):

This is an asset with a datetime in the year 0; you'll want to fix that metadata before uploading it. If immich-go is causing the wrong metadata then you should report it there.

@bo0tzz commented on GitHub (Nov 10, 2025): This is an asset with a datetime in the year 0; you'll want to fix that metadata before uploading it. If immich-go is causing the wrong metadata then you should report it there.
Author
Owner

@sebasb21 commented on GitHub (Nov 10, 2025):

mm ok, but this image is already in immich, can you spare a few minutes and explain a bit what you think is happening here? maybe i can fix the source (old immich server) so i can export -> upload to the destination (new immich server)

@sebasb21 commented on GitHub (Nov 10, 2025): mm ok, but this image is already in immich, can you spare a few minutes and explain a bit what you think is happening here? maybe i can fix the source (old immich server) so i can export -> upload to the destination (new immich server)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: immich-app/immich#7800