immich-app / immich

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

Mobile Apps: Error while getting remote assets (from AssetServices) #9652

Closed macross5 closed 5 months ago

macross5 commented 5 months ago

The bug

On IOS and on Android i cant use the Immich App. He uploads the assets right. I can check it in the browser version. But...

The OS that Immich Server is running on

Docker

Version of Immich Server

v1.105.1

Version of Immich Mobile App

v1.105.0 build.139

Platform with the issue

Your docker-compose.yml content

version: "3.8"

name: immich

services:
  immich-server:
    container_name: immich_server
    image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}
    command: [ "start.sh", "immich" ]
    volumes:
      - /etc/localtime:/etc/localtime:ro
      # immich files
      - ./data:/usr/src/app/upload

      # immich uploads
      - [hidden]:/usr/src/app/upload/library
      - /usr/src/app/upload/library/@eaDir
      - /usr/src/app/upload/library/#recycle

      # extern photos album
      - [hidden]:/usr/src/app/external/hb_album:ro
      - /usr/src/app/external/hb_album/@eaDir
      - /usr/src/app/external/hb_album/#recycle
    env_file:
      - container.env
    environment:
      - NODE_OPTIONS=--max-old-space-size=8192
    ports:
      - [hidden]:3001
    depends_on:
      - redis
      - database
    restart: always

  redis:
    container_name: immich_redis
    image: registry.hub.docker.com/library/redis:6.2-alpine@sha256:84882e87b54734154586e5f8abd4dce69fe7311315e2fc6d67c29614c8de2672
    ports:
      - [hidden]:6379
    restart: always
    deploy:
      resources:
        limits:
          memory: 5G

  database:
    container_name: immich_postgres
    image: registry.hub.docker.com/tensorchord/pgvecto-rs:pg14-v0.2.0@sha256:90724186f0a3517cf6914295b5ab410db9ce23190a2d9d0b9dd6463e3fa298f0
    environment:
      POSTGRES_PASSWORD: [hidden]
      POSTGRES_USER: [hidden]
      POSTGRES_DB: immich
    volumes:
      - ./pgdata:/var/lib/postgresql/data
    ports:
      - [hidden]:5432
    restart: always

Your .env content

UPLOAD_LOCATION=./library

IMMICH_VERSION=v1.103.1 
TZ=Europe/Berlin

DB_PASSWORD=[hidden]

DB_HOSTNAME=immich_postgres
DB_USERNAME=postgres
DB_DATABASE_NAME=immich
DB_DATA_LOCATION=./postgres

REDIS_HOSTNAME=immich_redis

IMMICH_METRICS=true
NODE_OPTIONS=--max-old-space-size=8192

Reproduction steps

1. Set up immich with ~750k photos and ~70k videos
2. Starting android app

Relevant log output

ApiException 400: HTTP connection failed: POST /sync/full-sync (Inner exception: Connection closed before full header was received)

#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:96)
<asynchronous suspension>
#3      SyncApi.getFullSyncForUser (package:openapi/api/sync_api.dart:99)
<asynchronous suspension>
#4      AssetService._getRemoteAssets (package:immich_mobile/services/asset.service.dart:116)
<asynchronous suspension>
#5      SyncService._syncRemoteAssetsForUser (package:immich_mobile/services/sync.service.dart:241)
<asynchronous suspension>
#6      SyncService._syncRemoteAssetsFull (package:immich_mobile/services/sync.service.dart:231)
<asynchronous suspension>
#7      SyncService.syncRemoteAssetsToDb.<anonymous closure> (package:immich_mobile/services/sync.service.dart:56)
<asynchronous suspension>
#8      AssetService.refreshRemoteAssets (package:immich_mobile/services/asset.service.dart:55)
<asynchronous suspension>
#9      AssetNotifier.getAllAsset (package:immich_mobile/providers/asset.provider.dart:54)
<asynchronous suspension>

STACK TRACE
#0      ApiClient.invokeAPI (package:openapi/api_client.dart:125)
<asynchronous suspension>
#1      SyncApi.getFullSyncForUser (package:openapi/api/sync_api.dart:99)
<asynchronous suspension>
#2      AssetService._getRemoteAssets (package:immich_mobile/services/asset.service.dart:116)
<asynchronous suspension>
#3      SyncService._syncRemoteAssetsForUser (package:immich_mobile/services/sync.service.dart:241)
<asynchronous suspension>
#4      SyncService._syncRemoteAssetsFull (package:immich_mobile/services/sync.service.dart:231)
<asynchronous suspension>
#5      SyncService.syncRemoteAssetsToDb.<anonymous closure> (package:immich_mobile/services/sync.service.dart:56)
<asynchronous suspension>
#6      AssetService.refreshRemoteAssets (package:immich_mobile/services/asset.service.dart:55)
<asynchronous suspension>
#7      AssetNotifier.getAllAsset (package:immich_mobile/providers/asset.provider.dart:54)
<asynchronous suspension>

Additional information

bo0tzz commented 5 months ago

You say you're on 1.105.1 but your env file still lists 1.103.1. 1.105.0 included an overhaul of the app sync mechanism, so please update to that.

macross5 commented 5 months ago

You are right @bo0tzz . My webclient showed the newest version, but my env files was on 103. Sorry.