immich-app / immich

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

[BUG] iOS App - Error while getting remote assets #2013

Closed bibinisacmohan closed 1 year ago

bibinisacmohan commented 1 year ago

The bug

I believe this is a timeout error of some sort. The app does connect, but the sync for remote assets fails.

Tried the following

Here is the image of what is displayed on the iOS app log- IMG_2025

Also, the server log is attached. Immich-server.csv

The OS that Immich Server is running on

Synology 920+ Docker

Version of Immich Server

1.50.1

Version of Immich Mobile App

1.50.0 build.88

Platform with the issue

Your docker-compose.yml content

version: "3.9"
services:
  immich-redis:
    image: redis
    container_name: Immich-redis
    hostname: immich-redis
    security_opt:
      - no-new-privileges:true
    healthcheck:
      test: ["CMD-SHELL", "redis-cli ping || exit 1"]
    user: 1026:100
    environment:
      - TZ=America/New_York
    volumes:
      - /volume1/docker/immich/redis:/data
    restart: always

  immich-db:
    image: postgres
    container_name: Immich-db
    hostname: immich-db
    security_opt:
      - no-new-privileges:true
    healthcheck:
      test: ["CMD", "pg_isready", "-q", "-d", "immich", "-U", "immichuser"]
      interval: 10s
      timeout: 5s
      retries: 5
    user: 1026:100
    volumes:
      - /volume1/docker/immich/db:/var/lib/postgresql/data
    environment:
      - TZ=America/New_York
      - POSTGRES_DB=
      - POSTGRES_USER=
      - POSTGRES_PASSWORD=
    restart: always

  immich-server:
    image: altran1502/immich-server:release
    entrypoint: ["/bin/sh", "./start-server.sh"]
    container_name: Immich-server
    hostname: immich-server
    user: 1026:100
    security_opt:
      - no-new-privileges:true
    env_file:
      - stack.env
    volumes:
      - /volume1/docker/immich/upload:/usr/src/app/upload
    restart: always
    depends_on:
      immich-redis:
        condition: service_healthy
      immich-db:
        condition: service_started

  immich-microservices:
    image: altran1502/immich-server:release
    entrypoint: ["/bin/sh", "./start-microservices.sh"]
    container_name: Immich-microservices
    hostname: immich-microservices
    user: 1026:100
    security_opt:
      - no-new-privileges:true
    env_file:
      - stack.env
    volumes:
      - /volume1/docker/immich/upload:/usr/src/app/upload
      - /volume1/docker/immich/micro:/usr/src/app/.reverse-geocoding-dump
    restart: always
    depends_on:
      immich-redis:
        condition: service_healthy
      immich-db:
        condition: service_started

  immich-machine-learning:
    image: altran1502/immich-machine-learning:release
    command: [ "python", "src/main.py" ]
    container_name: Immich-learning
    hostname: immich-machine-learning
    user: 1026:100
    security_opt:
      - no-new-privileges:true
    env_file:
      - stack.env
    volumes:
      - /volume1/docker/immich/data:/usr/src/app/upload
      - model-cache:/cache
    restart: always
    depends_on:
      immich-db:
        condition: service_started

  immich-web:
    image: altran1502/immich-web:release
    entrypoint: ["/bin/sh", "./entrypoint.sh"]
    container_name: Immich-web
    hostname: immich-web
    user: 1026:100
    security_opt:
      - no-new-privileges:true
    healthcheck:
      test: wget --no-verbose --tries=1 --spider http://localhost:3000/ || exit 1
    env_file:
      - stack.env
    restart: always
    depends_on:
      - immich-server

  immich-proxy:
    image: altran1502/immich-proxy:release
    logging:
      driver: none
    container_name: Immich-proxy
    hostname: immich-proxy
    security_opt:
      - no-new-privileges:true
    healthcheck:
      test: curl -f http://localhost:8080/ || exit 1
    environment:
      - IMMICH_SERVER_URL=http://immich-server:3001
      - IMMICH_WEB_URL=http://immich-web:3000
    ports:
      - 8212:8080
    restart: always
    depends_on:
      - immich-server

volumes:
  pgdata:
  model-cache:

Your .env content

NODE_ENV=production
TZ=Europe/Bucharest

###################################################################################
# Database
###################################################################################

DB_HOSTNAME=immich-db
DB_USERNAME=
DB_PASSWORD=
DB_DATABASE_NAME=

# Optional Database settings:
# DB_PORT=5432

###################################################################################
# Redis
###################################################################################

REDIS_HOSTNAME=immich-redis

# Optional Redis settings:
# REDIS_PORT=6379
# REDIS_DBINDEX=0
# REDIS_PASSWORD=
# REDIS_SOCKET=

###################################################################################
# Log message level - [simple|verbose]
###################################################################################

LOG_LEVEL=simple

###################################################################################
# JWT SECRET
###################################################################################

# This JWT_SECRET is used to sign the authentication keys for user login
# You should set it to a long randomly generated value
# You can use this command to generate one: openssl rand -base64 128
JWT_SECRET=xia7jNMRT50PgcShC0BTuFxTLPamoYnQO8OKH8jUff4iD0AdtbC8HTZp/Rv4LSdpV7kXbYTvxNrw24NzJJiag2nisYbUmEV8XbJEEboag98z+6KR5djhPPC4/oztoSJHOB2rpPXjv4VNwCAT0PvTKUo3gSY8rDja85DGugYqJ0c=

###################################################################################
# Reverse Geocoding
####################################################################################

# DISABLE_REVERSE_GEOCODING=false

# Reverse geocoding is done locally which has a small impact on memory usage
# This memory usage can be altered by changing the REVERSE_GEOCODING_PRECISION variable
# This ranges from 0-3 with 3 being the most precise
# 3 - Cities > 500 population: ~200MB RAM
# 2 - Cities > 1000 population: ~150MB RAM
# 1 - Cities > 5000 population: ~80MB RAM
# 0 - Cities > 15000 population: ~40MB RAM

DISABLE_REVERSE_GEOCODING=false
REVERSE_GEOCODING_PRECISION=3

####################################################################################
# WEB - Optional
####################################################################################

# Custom message on the login page, should be written in HTML form.
# For example PUBLIC_LOGIN_PAGE_MESSAGE="This is a demo instance of Immich.<br><br>Email: <i>demo@demo.de</i><br>Password: <i>demo</i>"

PUBLIC_LOGIN_PAGE_MESSAGE=

####################################################################################
# Alternative Service Addresses - Optional
#
# This is an advanced feature for users who may be running their immich services on different hosts.
# It will not change which address or port that services bind to within their containers, but it will change where other services look for their peers.
# Note: immich-microservices is bound to 3002, but no references are made
####################################################################################

IMMICH_WEB_URL=http://immich-web:3000
IMMICH_SERVER_URL=http://immich-server:3001
IMMICH_MACHINE_LEARNING_URL=http://immich-machine-learning:3003

####################################################################################
# OAuth Setting - Optional
#
# These setting will enable OAuth login for your instance of Immich
# Folow the instructions in the page https://immich.app/docs/usage/oauth to set up your OAuth provider
####################################################################################

# OAUTH_ENABLED=false
# OAUTH_ISSUER_URL=
# OAUTH_CLIENT_ID=
# OAUTH_CLIENT_SECRET=
# OAUTH_BUTTON_TEXT=Login with OAuth
# OAUTH_AUTO_REGISTER=true
# OAUTH_SCOPE="openid profile email"

Reproduction steps

1. Install the server and all other components
2. Sign into iOS App
3. Wait for the sync

Additional information

No response

alextran1502 commented 1 year ago

If you use the default docker-compose file, do you encounter the error?

bibinisacmohan commented 1 year ago

Yes. I think it might be because of either the number of assets (hence the timeout) or bad metadata related to some assets. For example, Google Photos tagged some of the assets with 2046 as the year.

On Sat, Mar 18, 2023 at 10:41 AM, Alex @.***> wrote:

If you use the default docker-compose file, do you encounter the error?

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

alextran1502 commented 1 year ago

Can you share the mobile log in csv form, you can use the share function on the top right of the log page.

bibinisacmohan commented 1 year ago

The share log option brings up the share card. But no options work from that point. I have tried airdrop, files, and messaging myself. Not sure if it's just me or if anyone else has a problem with share.

On Sat, Mar 18, 2023 at 10:54 AM, Alex @.***> wrote:

Can you share the mobile log in csv form, you can use the share function on the top right of the log page.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

bjw-s commented 1 year ago

The share log option brings up the share card. But no options work from that point. I have tried airdrop, files, and messaging myself. Not sure if it's just me or if anyone else has a problem with share.

Adding a +1 for the sharing of mobile app log file seemingly not working on iOS :(

alextran1502 commented 1 year ago

I believe this issue is fixed in 1.54

bibinisacmohan commented 1 year ago

This is still occurring. Based on what I am seeing, the app is not downloading any of the remote assets. Here is the stack trace- #0      ApiClient.invokeAPI (package:openapi/api_client.dart:125)#1      WithETag.getAllAssetsWithETag (package:immich_mobile/utils/openapi_extensions.dart:20)#2      AssetService._getRemoteAssets (package:immich_mobile/shared/services/asset.service.dart:64)#3      AssetService.refreshRemoteAssets. (package:immich_mobile/shared/services/asset.service.dart:49)#4      SyncService._syncRemoteAssetsToDb (package:immich_mobile/shared/services/sync.service.dart:155)#5      AssetService.refreshRemoteAssets (package:immich_mobile/shared/services/asset.service.dart:48)#6      AssetNotifier.getAllAsset (package:immich_mobile/shared/providers/asset.provider.dart:116)I can confirm that the issue only happens when you have a large remote asset set.Thanks.On Apr 22, 2023, at 10:28 PM, Alex @.***> wrote: I believe this issue is fixed in 1.54

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>

alextran1502 commented 1 year ago

@bibinisacmohan hello what version of the app are you on and can you help us share the whole log please?

bibinisacmohan commented 1 year ago

Please see the version info belowThe log is attached.Thanks!On Apr 23, 2023, at 1:25 PM, Alex @.***> wrote: @bibinisacmohan hello what version of the app are you on and can you help us share the whole log please?

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>

alextran1502 commented 1 year ago

@bibinisacmohan Hello i don't think sending the log through email reply would work for GitHub issue. You will have to do it from GitHub

bibinisacmohan commented 1 year ago

Immich_log_2023-04-23T17:43:01.771548.csv

Here you go! Thanks for the hint.

fyfrey commented 1 year ago

There are HTTP BadRequest errors, so either the connection was unstable OR there were errors on the server (that should be visible in the logs of immich-server)

jrasm91 commented 1 year ago

Closing, as it's likely a version/deployment issue, not an immich bug.