immich-app / immich

High performance self-hosted photo and video management solution.
https://immich.app
GNU Affero General Public License v3.0
44.76k stars 2.17k forks source link

Many photos and videos are showing "Error Loading Image" #12174

Closed ahmadyusuf closed 2 weeks ago

ahmadyusuf commented 2 weeks ago

The bug

I imported all my Google photos to immich and they used to work very well, but now, I can't open many photos and videos, they just show "Error Loading Image" I tried refreshing thumbnails and rerunning all the jobs but nothing works. Even album photos are not showing and some people photos as well.

I am very concerned because I deleted all my photos from Google after I though they were successfully imported

I am running Immich as a docker image

image

The OS that Immich Server is running on

Docker version 27.1.1, build 6312585 on Ubuntu 22.04.4 LTS

Version of Immich Server

v1.113.0

Version of Immich Mobile App

v1.112.1 build.154

Platform with the issue

Your docker-compose.yml content

####################################
# Immich Server
####################################

  immich-server:
    container_name: immich_server
    image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}
    # extends:
    #   file: hwaccel.transcoding.yml
    #   service: cpu # set to one of [nvenc, quicksync, rkmpp, vaapi, vaapi-wsl] for accelerated transcoding
    volumes:
      - ${UPLOAD_LOCATION}:/usr/src/app/upload
      - /etc/localtime:/etc/localtime:ro
    env_file:
      - ${docker_home}/immich_app/.env
    ports:
      - 2283:3001
    depends_on:
      - redis
      - database
    restart: always

####################################
# Immich Microservices
####################################
  immich-microservices:
    container_name: immich_microservices
    image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}
    # extends: # uncomment this section for hardware acceleration - see https://immich.app/docs/features/hardware-transcoding
    #   file: hwaccel.transcoding.yml
    #   service: cpu # set to one of [nvenc, quicksync, rkmpp, vaapi, vaapi-wsl] for accelerated transcoding
    command: ['start.sh', 'microservices']
    volumes:
      - ${UPLOAD_LOCATION}:/usr/src/app/upload
      - /etc/localtime:/etc/localtime:ro
    env_file:
      - ${docker_home}/immich_app/.env
    depends_on:
      - redis
      - database
    restart: always

  immich-machine-learning:
    container_name: immich_machine_learning
    # For hardware acceleration, add one of -[armnn, cuda, openvino] to the image tag.
    # Example tag: ${IMMICH_VERSION:-release}-cuda
    image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release}
    # extends: # uncomment this section for hardware acceleration - see https://immich.app/docs/features/ml-hardware-acceleration
    #   file: hwaccel.ml.yml
    #   service: cpu # set to one of [armnn, cuda, openvino, openvino-wsl] for accelerated inference - use the `-wsl` version for WSL2 where applicable
    volumes:
      - ${docker_home}/immich_app/model-cache:/cache
    env_file:
      - ${docker_home}/immich_app/.env
    restart: always

####################################
# Immich Redis
####################################

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

####################################
# Immich Postgress
####################################

  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:
      - ${DB_DATA_LOCATION}:/var/lib/postgresql/data
    healthcheck:
      test: pg_isready --dbname='${DB_DATABASE_NAME}' --username='${DB_USERNAME}' || exit 1; Chksum="$$(psql --dbname='${DB_DATABASE_NAME}' --username='${DB_USERNAME}' --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
    ports:
      - "3011:5432"

Your .env content

IMMICH_HOME=/mnt/external_ssd/Photos/immich_home
# The location where your uploaded files are stored
UPLOAD_LOCATION=$IMMICH_HOME/library
# The location where your database files are stored
DB_DATA_LOCATION=${docker_home}/immich_app/postgres

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

# The values below this line do not need to be changed
DB_USERNAME=postgres
DB_DATABASE_NAME=immich

Reproduction steps

1. 2. 3. ...

Relevant log output

Error: ENOENT: no such file or directory, access 'upload/upload/c73446a5-f6fc-4835-910c-720c573782b5/84/d1/84d1f6c0-87e3-4cb7-8a01-ba2fe585fd5e.mp4'
    at async access (node:internal/fs/promises:606:10)
    at async sendFile (/usr/src/app/dist/utils/file.js:55:9)
    at async AssetMediaController.playAssetVideo (/usr/src/app/dist/controllers/asset-media.controller.js:60:9)
[Nest] 17  - 08/31/2024, 5:13:40 AM   ERROR [Api:LoggerRepository~zbdhaxoh] Unable to send file: Error
Error: ENOENT: no such file or directory, access 'upload/upload/c73446a5-f6fc-4835-910c-720c573782b5/9d/d7/9dd73553-643d-4cf9-ae2b-806a2c3b6517.mp4'
    at async access (node:internal/fs/promises:606:10)
    at async sendFile (/usr/src/app/dist/utils/file.js:55:9)
    at async AssetMediaController.playAssetVideo (/usr/src/app/dist/controllers/asset-media.controller.js:60:9)
[Nest] 17  - 08/31/2024, 5:13:40 AM    WARN [Api:ExpressAdapter~zbdhaxoh] Content-Type doesn't match Reply body, you might need a custom ExceptionFilter for non-JSON responses
[Nest] 17  - 08/31/2024, 5:13:40 AM   ERROR [Api:ExceptionsHandler~zbdhaxoh] ENOENT: no such file or directory, access 'upload/upload/c73446a5-f6fc-4835-910c-720c573782b5/9d/d7/9dd73553-643d-4cf9-ae2b-806a2c3b6517.mp4'
Error: ENOENT: no such file or directory, access 'upload/upload/c73446a5-f6fc-4835-910c-720c573782b5/9d/d7/9dd73553-643d-4cf9-ae2b-806a2c3b6517.mp4'
    at async access (node:internal/fs/promises:606:10)
    at async sendFile (/usr/src/app/dist/utils/file.js:55:9)
    at async AssetMediaController.playAssetVideo (/usr/src/app/dist/controllers/asset-media.controller.js:60:9)
[Nest] 17  - 08/31/2024, 5:13:40 AM   ERROR [Api:LoggerRepository~6906itr7] Unable to send file: Error
Error: ENOENT: no such file or directory, access 'upload/upload/c73446a5-f6fc-4835-910c-720c573782b5/fb/dc/fbdc519f-0b9c-4d31-8c81-f23bb1194ea9.mp4'
    at async access (node:internal/fs/promises:606:10)
    at async sendFile (/usr/src/app/dist/utils/file.js:55:9)
    at async AssetMediaController.playAssetVideo (/usr/src/app/dist/controllers/asset-media.controller.js:60:9)
[Nest] 17  - 08/31/2024, 5:13:40 AM    WARN [Api:ExpressAdapter~6906itr7] Content-Type doesn't match Reply body, you might need a custom ExceptionFilter for non-JSON responses
[Nest] 17  - 08/31/2024, 5:13:40 AM   ERROR [Api:ExceptionsHandler~6906itr7] ENOENT: no such file or directory, access 'upload/upload/c73446a5-f6fc-4835-910c-720c573782b5/fb/dc/fbdc519f-0b9c-4d31-8c81-f23bb1194ea9.mp4'

Additional information

No response

alextran1502 commented 2 weeks ago

Your docker-compose file is out of date