Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to v1.125.1 Breaks Time Based Memories and live image upload #15598

Closed
2 of 3 tasks
gthelding opened this issue Jan 24, 2025 · 2 comments
Closed
2 of 3 tasks

Update to v1.125.1 Breaks Time Based Memories and live image upload #15598

gthelding opened this issue Jan 24, 2025 · 2 comments

Comments

@gthelding
Copy link

gthelding commented Jan 24, 2025

The bug

I upgraded to v1.125.1:

  • time-based memories causes an error
  • live image upload fails

The OS that Immich Server is running on

Docker on Debian stable server

Version of Immich Server

v1.125.1

Version of Immich Mobile App

latest

Platform with the issue

  • Server
  • Web
  • Mobile

Your docker-compose.yml content

#
# WARNING: Make sure to use the docker-compose.yml of the current release:
#
# https://github.com/immich-app/immich/releases/latest/download/docker-compose.yml
#
# The compose file on main may not be compatible with the latest release.
#

name: immich

services:
  immich-server:
    container_name: immich_server
    image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}
    extends:
       file: hwaccel.transcoding.yml
       service: nvenc # set to one of [nvenc, quicksync, rkmpp, vaapi, vaapi-wsl] for accelerated transcoding
    volumes:
      # Do not edit the next line. If you want to change the media storage location on your system, edit the value of UPLOAD_LOC
ATION in the .env file
      - ${UPLOAD_LOCATION}:/usr/src/app/upload
      - /etc/localtime:/etc/localtime:ro
    env_file:
      - .env
    ports:
      - '172.16.21.57:2283:2283'
    depends_on:
      - redis
      - database
    restart: always
    healthcheck:
      disable: false

  immich-machine-learning:
    container_name: immich_machine_learning
    image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release}-cuda
    extends:
       file: hwaccel.ml.yml
       service: cuda # set to one of [armnn, cuda, openvino, openvino-wsl] for accelerated inference - use the `-wsl` version fo
r WSL2 where applicable
    volumes:
      - model-cache:/cache
    env_file:
      - .env
    restart: always
    healthcheck:
      disable: false

  redis:
    container_name: immich_redis
    image: docker.io/redis:6.2-alpine@sha256:eaba718fecd1196d88533de7ba49bf903ad33664a92debb24660a922ecd9cac8
    healthcheck:
      test: redis-cli ping || exit 1
    restart: always

  database:
    container_name: immich_postgres
    image: docker.io/tensorchord/pgvecto-rs:pg14-v0.2.0@sha256:90724186f0a3517cf6914295b5ab410db9ce23190a2d9d0b9dd6463e3fa298f0
    environment:
      POSTGRES_PASSWORD: ${DB_PASSWORD}
      POSTGRES_USER: ${DB_USERNAME}
      POSTGRES_DB: ${DB_DATABASE_NAME}
      POSTGRES_INITDB_ARGS: '--data-checksums'
    volumes:
      # Do not edit the next line. If you want to change the database storage location on your system, edit the value of DB_DATA
_LOCATION in the .env file
      - ${DB_DATA_LOCATION}:/var/lib/postgresql/data
    healthcheck:
      test: >-
        pg_isready --dbname="$${POSTGRES_DB}" --username="$${POSTGRES_USER}" || exit 1;
        Chksum="$$(psql --dbname="$${POSTGRES_DB}" --username="$${POSTGRES_USER}" --tuples-only --no-align
        --command='SELECT COALESCE(SUM(checksum_failures), 0) FROM pg_stat_database')";
        echo "checksum failure count is $$Chksum";
        [ "$$Chksum" = '0' ] || exit 1
      interval: 5m
      start_interval: 30s
      start_period: 5m
    command: >-
      postgres
      -c shared_preload_libraries=vectors.so
      -c 'search_path="$$user", public, vectors'
      -c logging_collector=on
      -c max_wal_size=2GB
      -c shared_buffers=512MB
      -c wal_compression=on
    restart: always

volumes:
  model-cache:

Your .env content

# The location where your uploaded files are stored
UPLOAD_LOCATION=/opt/immich/library
# The location where your database files are stored
DB_DATA_LOCATION=/opt/immichdb

# To set a timezone, uncomment the next line and change Etc/UTC to a TZ identifier from this list: https://en.wikipedia.org/wiki
/List_of_tz_database_time_zones#List
TZ=America/Chicago

# The Immich version to use. You can pin this to a specific version like "v1.71.0"
#IMMICH_VERSION=release
IMMICH_VERSION=v1.124.2
#IMMICH_VERSION=release

# Connection secret for postgres. You should change it to a random password
# Please use only the characters `A-Za-z0-9`, without special characters or spaces
DB_PASSWORD=rjl7nsJmJMpol6

# The values below this line do not need to be changed
###################################################################################

Reproduction steps

  1. run docker compose pull && docker compose up -d
  2. access web interface
  3. see no memories and see error in log for immich server
  4. I try to use the app to sync a new live image from iPhone and I get a log error and the image looks like this in the web interface:
    Image
    ...

Relevant log output

THIS IS FOR TIME BASED MEMORY ERROR:
[Nest] 17  - 01/24/2025, 7:36:25 AM     LOG [Api:EventRepository] Websocket Connect:    o-vFB8ayge75FwdVAAAD
Query failed : {
  durationMs: 47.91581099999894,
  error: PostgresError: date field value out of range: 0-01-24
      at ErrorResponse (/usr/src/app/node_modules/postgres/cjs/src/connection.js:788:26)
      at handle (/usr/src/app/node_modules/postgres/cjs/src/connection.js:474:6)
      at Socket.data (/usr/src/app/node_modules/postgres/cjs/src/connection.js:315:9)
      at Socket.emit (node:events:524:28)
      at addChunk (node:internal/streams/readable:561:12)
      at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)
      at Readable.push (node:internal/streams/readable:392:5)
      at TCP.onStreamRead (node:internal/stream_base_commons:189:23)
      at TCP.callbackTrampoline (node:internal/async_hooks:130:17) {
    severity_local: 'ERROR',
    severity: 'ERROR',
    code: '22008',
    file: 'date.c',
    line: '258',
    routine: 'make_date'
  },
  sql: `with "res" as (with "today" as (select make_date(year::int, $1::int, $2::int) as "date" from generate_series((select date_part('year', min(("localDateTime" at time zone 'UTC')::date))::int from assets), date_part('year', current_date)::int - 1) as "year") select "a".*, to_json("exif") as "exifInfo" from "today" inner join lateral (select "assets".* from "assets" inner join "asset_job_status" on "assets"."id" = "asset_job_status"."assetId" where "asset_job_status"."previewAt" is not null and (assets."localDateTime" at time zone 'UTC')::date = today.date and "assets"."ownerId" = any($3::uuid[]) and "assets"."isVisible" = $4 and "assets"."isArchived" = $5 and exists (select from "asset_files" where "assetId" = "assets"."id" and "asset_files"."type" = $6) and "assets"."deletedAt" is null limit $7) as "a" on true inner join "exif" on "a"."id" = "exif"."assetId") select ((now() at time zone 'UTC')::date - ("localDateTime" at time zone 'UTC')::date) / 365 as "yearsAgo", json_agg("res") as "assets" from "res" group by ("localDateTime" at time zone 'UTC')::date order by ("localDateTime" at time zone 'UTC')::date desc limit $8`,
  params: [
    1,
    24,
    '{7d2b2c7d-72d0-4b81-9457-3fc86ab29be4}',
�
THIS IS FOR LIVE IMAGE ERROR:
[Nest] 7  - 01/24/2025, 8:15:58 AM   ERROR [Microservices:JobService] Unable to run job handler (metadataExtraction/link-live-photos): Error: UNDEFINED_VALUE: Undefined values are not allowed

[Nest] 7  - 01/24/2025, 8:15:58 AM   ERROR [Microservices:JobService] Error: UNDEFINED_VALUE: Undefined values are not allowed

    at handleValue (/usr/src/app/node_modules/postgres/cjs/src/types.js:83:20)

    at /usr/src/app/node_modules/postgres/cjs/src/connection.js:225:38

    at Array.forEach (<anonymous>)

    at build (/usr/src/app/node_modules/postgres/cjs/src/connection.js:225:25)

    at Object.execute (/usr/src/app/node_modules/postgres/cjs/src/connection.js:167:7)

    at Query.handler (/usr/src/app/node_modules/postgres/cjs/src/index.js:229:13)

    at Query.handle (/usr/src/app/node_modules/postgres/cjs/src/query.js:140:65)

    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)

[Nest] 7  - 01/24/2025, 8:15:58 AM   ERROR [Microservices:JobService] Object:

{

  "id": "045a86ff-0fa0-4d94-ba84-80fd94636324",

  "source": "upload"

}

Additional information

I can turn off the time based memories and then there is no error with that, but live images still will not upload. If I roll back to v1.124.2, the errors are gone.

@alextran1502
Copy link
Contributor

cc @mertalev

@alextran1502
Copy link
Contributor

alextran1502 commented Jan 24, 2025

fixed in #15612

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants