immich-app / immich

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

IOS Crash #10410

Closed Custardcs closed 2 months ago

Custardcs commented 2 months ago

The bug

so basically when you have icloud enabled all your photos are downloading then trying to upload to the server it crashes the iphone app.

The OS that Immich Server is running on

Debian Dockercontainer

Version of Immich Server

v1.06

Version of Immich Mobile App

v1.06

Platform with the issue

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: 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:
      - stack.env
    ports:
      - 2283:3001
    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:
      - model-cache:/cache
    env_file:
      - stack.env
    restart: always

  redis:
    container_name: immich_redis
    image: docker.io/redis:6.2-alpine@sha256:d6c2911ac51b289db208767581a5d154544f2b2fe4914ea5056443f62dc6e900
    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:
      - ${DB_DATA_LOCATION}:/var/lib/postgresql/data
    healthcheck:
      test: pg_isready --dbname='${DB_DATABASE_NAME}' || exit 1; Chksum="$$(psql --dbname='${DB_DATABASE_NAME}' --username='${DB_USERNAME}' --tuples-only --no-align --command='SELECT SUM(checksum_failures) 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

UPLOAD_LOCATION=/mnt/raid6/Photos
DB_DATA_LOCATION=/mnt/ssd1/immich_db
IMMICH_VERSION=release
DB_PASSWORD=xxxxxxxxx
DB_USERNAME=postgres
DB_DATABASE_NAME=immich

Reproduction steps

1.  open ios phone app
2. select every single folder possble
3. backup options -> turn off foreground -> enable background wifi / charging
4. make sure it downloads icloud photos.
5. now open the app and hit the start backup button and watch the magic happen
...

Relevant log output

2024-06-16 22:55:33.595191 | INFO     | AssetNotifier        | Load assets: 842ms |
2024-06-16 22:55:33.595149 | INFO     | AlbumService         | Syncing completed. Changes: false |
2024-06-16 22:55:33.434677 | INFO     | AlbumService         | Found 17 device albums |
2024-06-16 22:55:04.151098 | INFO     | AssetNotifier        | Load assets: 689ms |
2024-06-16 22:55:04.151060 | INFO     | AlbumService         | Syncing completed. Changes: false |
2024-06-16 22:55:03.996580 | INFO     | AlbumService         | Found 17 device albums |
2024-06-16 22:52:53.617355 | INFO     | BackupNotifier       | _getBackupAlbumsInfo: Found 24 available albums |
2024-06-16 22:52:53.616741 | INFO     | BackupNotifier       | Found 24 local albums |
2024-06-16 22:52:52.713621 | INFO     | AssetNotifier        | Load assets: 111406ms |
2024-06-16 22:52:52.713577 | INFO     | AlbumService         | Syncing completed. Changes: false |
2024-06-16 22:52:52.592527 | INFO     | AlbumService         | Found 17 device albums |
2024-06-16 22:52:51.953911 | INFO     | AlbumService         | refreshDeviceAlbums is already in progress |
2024-06-16 22:52:51.911520 | WARNING  | UserService          | Failed to refresh users |
2024-06-16 22:52:51.911456 | WARNING  | UserService          | Failed to refresh users |
2024-06-16 22:52:51.822272 | WARNING  | PartnerService       | Failed to get partners for direction PartnerDirection.sharedBy | ApiException 400: HTTP connection failed: GET /partners (Inner exception: Bad file descriptor)

#0      IOClient.send (package:http/src/io_client.dart:96)
<asynchronous suspension>
#1      BaseClient._sendUnstreamed (package:http/src/base_client.dart:93)
<asynchronous suspension>
#2      ApiClient.invokeAPI (package:openapi/api_client.dart:101)
<asynchronous suspension>
#3      PartnersApi.getPartners (package:openapi/api/partners_api.dart:102)
<asynchronous suspension>
#4      PartnerService.getPartners (package:immich_mobile/services/partner.service.dart:38)
<asynchronous suspension>
#5      UserService.getUsersFromServer (package:immich_mobile/services/user.service.dart:76)
<asynchronous suspension>
#6      UserService.refreshUsers (package:immich_mobile/services/user.service.dart:115)
<asynchronous suspension>
#7      AlbumService.refreshRemoteAlbums (package:immich_mobile/services/album.service.dart:153)
<asynchronous suspension>
#8      Future.wait.<anonymous closure> (dart:async/future.dart:524)
<asynchronous suspension>
 |
2024-06-16 22:52:51.820912 | WARNING  | PartnerService       | Failed to get partners for direction PartnerDirection.sharedBy | ApiException 400: HTTP connection failed: GET /partners (Inner exception: Bad file descriptor)

#0      IOClient.send (package:http/src/io_client.dart:96)
<asynchronous suspension>
#1      BaseClient._sendUnstreamed (package:http/src/base_client.dart:93)
<asynchronous suspension>
#2      ApiClient.invokeAPI (package:openapi/api_client.dart:101)
<asynchronous suspension>
#3      PartnersApi.getPartners (package:openapi/api/partners_api.dart:102)
<asynchronous suspension>
#4      PartnerService.getPartners (package:immich_mobile/services/partner.service.dart:38)
<asynchronous suspension>
#5      UserService.getUsersFromServer (package:immich_mobile/services/user.service.dart:76)
<asynchronous suspension>
#6      UserService.refreshUsers (package:immich_mobile/services/user.service.dart:115)
<asynchronous suspension>
#7      AssetNotifier.getAllAsset (package:immich_mobile/providers/asset.provider.dart:53)
<asynchronous suspension>
 |
2024-06-16 22:51:01.144492 | INFO     | ApiService           | Pinging server with response code 200 |
2024-06-16 22:42:33.380739 | INFO     | AssetNotifier        | Load assets: 2978ms |
2024-06-16 22:42:33.380718 | INFO     | AlbumService         | Syncing completed. Changes: true |
2024-06-16 22:42:33.380692 | INFO     | SyncService          | Removed 380 and updated 93 local assets from DB |
2024-06-16 22:42:33.312793 | INFO     | SyncService          | Synced changes of local album Favorites to DB |
2024-06-16 22:42:33.134606 | INFO     | SyncService          | Synced changes of local album Videos to DB |
2024-06-16 22:42:33.116734 | WARNING  | SyncService          | Ignored 1 duplicate assets on device |
2024-06-16 22:42:33.116588 | INFO     | SyncService          | Ignoring duplicate assets on device:
{
  "id": "N/A",
  "remoteId": "N/A",
  "localId": "C7BE5B03-0EF8-4BAA-BFF5-26ECFA14F9EF/L0/001",
  "checksum": "Vcc108c2gwaqgTBthbpzIafK1uI=",
  "ownerId": -70510785793649910,
  "livePhotoVideoId": "N/A",
  "stackCount": "0",
  "stackParentId": "N/A",
  "fileCreatedAt": "2022-09-20 17:15:53.000",
  "fileModifiedAt": "2024-02-02 16:13:17.000",
  "updatedAt": "2024-02-02 16:13:17.000",
  "durationInSeconds": 13,
  "type": "AssetType.video",
  "fileName": "",
  "isFavorite": false,
  "isRemote": false,
  "storage": "AssetState.local",
  "width": 1080,
  "height": 1920,
  "isArchived": false,
  "isTrashed": false,
  "isOffline": false,
}
{
  "id": "N/A",
  "remoteId": "N/A",
  "localId": "808A4A95-9355-4A87-AEA3-289B4B4B1FAE/L0/001",
  "checksum": "Vcc108c2gwaqgTBthbpzIafK1uI=",
  "ownerId": -70510785793649910,
  "livePhotoVideoId": "N/A",
  "stackCount": "0",
  "stackParentId": "N/A",
  "fileCreatedAt": "2022-09-20 17:15:53.000",
  "fileModifiedAt": "2024-02-02 16:14:40.000",
  "updatedAt": "2024-02-02 16:14:40.000",
  "durationInSeconds": 13,
  "type": "AssetType.video",
  "fileName": "",
  "isFavorite": false,
  "isRemote": false,
  "storage": "AssetState.local",
  "width": 1080,
  "height": 1920,
  "isArchived": false,
  "isTrashed": false,
  "isOffline": false,
} |
Custardcs commented 2 months ago

I was on version 106.2 -> i see now there is 106.4 ill update and revert back :D sorry

Custardcs commented 2 months ago

okay so its still happeing but its not everytime like before 👯

Custardcs commented 2 months ago

I stand corrected its now crashing more

mmomjian commented 2 months ago

seems to be a duplicate of #8141 and #3842