[BUG] Expiry date must be a Date instance #996

Closed
opened 2026-02-04 23:50:36 +03:00 by OVERLORD · 2 comments
Owner

Originally created by @Pheggas on GitHub (Jun 24, 2023).

The bug

In server version of v1.63.0 i noticed i can't share assets if i set expiry date other than Never. It writes this error shown below:
image

Unluckily, if i look into Immich server container logs, i see nothing describing this error. The weird thing is i remember i was sharing some assets on 1.62.0 (i guess) and it worked just fine. I even have some share links history that has already expired as proof it worked fine until now.
image

The OS that Immich Server is running on

Ubuntu Server 22.04 LTS

Version of Immich Server

v1.63.0 (worked fine on previous versions)

Version of Immich Mobile App

v1.63.0

Platform with the issue

  • Server
  • Web
  • Mobile

Your docker-compose.yml content

version: "3.8"

services:
  immich-server:
    container_name: immich_server
    image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}
    command: ["start-server.sh"]
    volumes:
      - ${UPLOAD_LOCATION}:/usr/src/app/upload
    env_file:
      - stack.env

    labels:
      - "traefik.enable=true"
      - "traefik.docker.network=proxy"
      - "com.centurylinklabs.watchtower.enable=false"
    depends_on:
      - redis
      - database
      - typesense
    networks:

      - immich
    restart: always

  immich-microservices:
    container_name: immich_microservices
    image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}
    command: ["start-microservices.sh"]
    volumes:
      - ${UPLOAD_LOCATION}:/usr/src/app/upload
    env_file:
      - stack.env
    labels:
      - "com.centurylinklabs.watchtower.enable=false"
    depends_on:
      - redis
      - database
      - typesense
    networks:
      - immich
    restart: always

  immich-machine-learning:
    container_name: immich_machine_learning
    image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release}
    volumes:
      - ${UPLOAD_LOCATION}:/usr/src/app/upload
      - /home/docker/docker_immich/model-cache:/cache
    env_file:
      - stack.env
    labels:
      - "com.centurylinklabs.watchtower.enable=false"
    networks:
      - immich
    restart: always

  immich-web:
    container_name: immich_web
    image: ghcr.io/immich-app/immich-web:${IMMICH_VERSION:-release}
    env_file:
      - stack.env
    labels:
      - "com.centurylinklabs.watchtower.enable=false"
    networks:
      - immich
    restart: always

  typesense:
    container_name: immich_typesense
    image: typesense/typesense:0.24.0
    environment:
      - TYPESENSE_API_KEY=${TYPESENSE_API_KEY}
      - TYPESENSE_DATA_DIR=/data
    labels:
      - "com.centurylinklabs.watchtower.enable=false"
    logging:
      driver: none
    volumes:
      - /home/docker/docker_immich/tsdata:/data
    networks:
      - immich
    restart: always

  redis:
    container_name: immich_redis
    image: redis:6.2
    labels:
      - "com.centurylinklabs.watchtower.enable=false"
    networks:
      - immich
    restart: always

  database:
    container_name: immich_postgres
    image: postgres:14
    env_file:
      - stack.env
    labels:
      - "com.centurylinklabs.watchtower.enable=false"
    environment:
      POSTGRES_PASSWORD: ${DB_PASSWORD}
      POSTGRES_USER: ${DB_USERNAME}
      POSTGRES_DB: ${DB_DATABASE_NAME}
      PG_DATA: /var/lib/postgresql/data
    stdin_open: true # docker run -i
    tty: true        # docker run -t
    networks:
      - immich
    volumes:
      - /home/docker/docker_immich/pgdata:/var/lib/postgresql/data
    restart: always

  immich-proxy:
    container_name: immich_proxy
    image: ghcr.io/immich-app/immich-proxy:${IMMICH_VERSION:-release}
    environment:
      # Make sure these values get passed through from the env file
      - IMMICH_SERVER_URL
      - IMMICH_WEB_URL
    labels:
      - "com.centurylinklabs.watchtower.enable=false"
      - "traefik.enable=true"
      - "traefik.http.routers.immich-local.rule=Host(`immich.local.example.eu`)"
      - "traefik.http.routers.immich-local.entrypoints=web, websecure"
      - "traefik.http.routers.immich-local.tls=true"
      - "traefik.http.routers.immich-local.tls.certresolver=cloudflare"
      - "traefik.http.routers.immich-local.tls.domains[0].main=local.example.eu"
      - "traefik.http.routers.immich-local.tls.domains[0].sans=*.local.example.eu"
      - "traefik.http.routers.immich.entrypoints=web, websecure"
      - "traefik.http.routers.immich.rule=Host(`immich.services.example.eu`)"
      - "traefik.http.routers.immich.tls=true"
      - "traefik.http.routers.immich.tls.certresolver=staging"
      - "traefik.docker.network=proxy"
    networks:
      - proxy
      - immich
    ports:
      - 2283:8080
    depends_on:
      - immich-server
    restart: always

networks:
  immich:
  proxy:
    external: true

Your .env content

DB_HOSTNAME=redacted
DB_USERNAME=redacted
DB_PASSWORD=redacted
DB_DATABASE_NAME=redacted
REDIS_HOSTNAME=immich_redis
UPLOAD_LOCATION=/mnt/Backups/immich
TYPESENSE_API_KEY=redacted
PUBLIC_LOGIN_PAGE_MESSAGE="It works!"
IMMICH_WEB_URL=http://immich-web:3000
IMMICH_SERVER_URL=http://immich-server:3001
IMMICH_MACHINE_LEARNING_URL=http://immich-machine-learning:3003
TZ=Europe/Bratislava

Reproduction steps

1. Update your Immich version to v1.63.0
2. Select some assets (or one asset)
3. Click `Share` button
4. Set `Expire after` to anything other than `Never`
5. Click `Create Link` and see the error

Additional information

No response

Originally created by @Pheggas on GitHub (Jun 24, 2023). ### The bug In server version of v1.63.0 i noticed i can't share assets if i set expiry date other than `Never`. It writes this error shown below: ![image](https://github.com/immich-app/immich/assets/9994511/40d9f083-44df-40d7-b983-b5de038ee2a3) Unluckily, if i look into Immich server container logs, i see nothing describing this error. The weird thing is i remember i was sharing some assets on 1.62.0 (i guess) and it worked just fine. I even have some share links history that has already expired as proof it worked fine until now. ![image](https://github.com/immich-app/immich/assets/9994511/d15f7bce-9622-4781-8711-f8c767ee1462) ### The OS that Immich Server is running on Ubuntu Server 22.04 LTS ### Version of Immich Server v1.63.0 (worked fine on previous versions) ### Version of Immich Mobile App v1.63.0 ### Platform with the issue - [X] Server - [X] Web - [ ] Mobile ### Your docker-compose.yml content ```YAML version: "3.8" services: immich-server: container_name: immich_server image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release} command: ["start-server.sh"] volumes: - ${UPLOAD_LOCATION}:/usr/src/app/upload env_file: - stack.env labels: - "traefik.enable=true" - "traefik.docker.network=proxy" - "com.centurylinklabs.watchtower.enable=false" depends_on: - redis - database - typesense networks: - immich restart: always immich-microservices: container_name: immich_microservices image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release} command: ["start-microservices.sh"] volumes: - ${UPLOAD_LOCATION}:/usr/src/app/upload env_file: - stack.env labels: - "com.centurylinklabs.watchtower.enable=false" depends_on: - redis - database - typesense networks: - immich restart: always immich-machine-learning: container_name: immich_machine_learning image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release} volumes: - ${UPLOAD_LOCATION}:/usr/src/app/upload - /home/docker/docker_immich/model-cache:/cache env_file: - stack.env labels: - "com.centurylinklabs.watchtower.enable=false" networks: - immich restart: always immich-web: container_name: immich_web image: ghcr.io/immich-app/immich-web:${IMMICH_VERSION:-release} env_file: - stack.env labels: - "com.centurylinklabs.watchtower.enable=false" networks: - immich restart: always typesense: container_name: immich_typesense image: typesense/typesense:0.24.0 environment: - TYPESENSE_API_KEY=${TYPESENSE_API_KEY} - TYPESENSE_DATA_DIR=/data labels: - "com.centurylinklabs.watchtower.enable=false" logging: driver: none volumes: - /home/docker/docker_immich/tsdata:/data networks: - immich restart: always redis: container_name: immich_redis image: redis:6.2 labels: - "com.centurylinklabs.watchtower.enable=false" networks: - immich restart: always database: container_name: immich_postgres image: postgres:14 env_file: - stack.env labels: - "com.centurylinklabs.watchtower.enable=false" environment: POSTGRES_PASSWORD: ${DB_PASSWORD} POSTGRES_USER: ${DB_USERNAME} POSTGRES_DB: ${DB_DATABASE_NAME} PG_DATA: /var/lib/postgresql/data stdin_open: true # docker run -i tty: true # docker run -t networks: - immich volumes: - /home/docker/docker_immich/pgdata:/var/lib/postgresql/data restart: always immich-proxy: container_name: immich_proxy image: ghcr.io/immich-app/immich-proxy:${IMMICH_VERSION:-release} environment: # Make sure these values get passed through from the env file - IMMICH_SERVER_URL - IMMICH_WEB_URL labels: - "com.centurylinklabs.watchtower.enable=false" - "traefik.enable=true" - "traefik.http.routers.immich-local.rule=Host(`immich.local.example.eu`)" - "traefik.http.routers.immich-local.entrypoints=web, websecure" - "traefik.http.routers.immich-local.tls=true" - "traefik.http.routers.immich-local.tls.certresolver=cloudflare" - "traefik.http.routers.immich-local.tls.domains[0].main=local.example.eu" - "traefik.http.routers.immich-local.tls.domains[0].sans=*.local.example.eu" - "traefik.http.routers.immich.entrypoints=web, websecure" - "traefik.http.routers.immich.rule=Host(`immich.services.example.eu`)" - "traefik.http.routers.immich.tls=true" - "traefik.http.routers.immich.tls.certresolver=staging" - "traefik.docker.network=proxy" networks: - proxy - immich ports: - 2283:8080 depends_on: - immich-server restart: always networks: immich: proxy: external: true ``` ### Your .env content ```Shell DB_HOSTNAME=redacted DB_USERNAME=redacted DB_PASSWORD=redacted DB_DATABASE_NAME=redacted REDIS_HOSTNAME=immich_redis UPLOAD_LOCATION=/mnt/Backups/immich TYPESENSE_API_KEY=redacted PUBLIC_LOGIN_PAGE_MESSAGE="It works!" IMMICH_WEB_URL=http://immich-web:3000 IMMICH_SERVER_URL=http://immich-server:3001 IMMICH_MACHINE_LEARNING_URL=http://immich-machine-learning:3003 TZ=Europe/Bratislava ``` ### Reproduction steps ```bash 1. Update your Immich version to v1.63.0 2. Select some assets (or one asset) 3. Click `Share` button 4. Set `Expire after` to anything other than `Never` 5. Click `Create Link` and see the error ``` ### Additional information _No response_
Author
Owner

@uhthomas commented on GitHub (Jun 24, 2023):

Fixed by https://github.com/immich-app/immich/pull/2934

@uhthomas commented on GitHub (Jun 24, 2023): Fixed by https://github.com/immich-app/immich/pull/2934
Author
Owner

@Pheggas commented on GitHub (Jun 24, 2023):

amazing!

@Pheggas commented on GitHub (Jun 24, 2023): amazing!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: immich-app/immich#996