[iOS] when App is in Background, the App logt out from server #2021

Closed
opened 2026-02-20 01:00:58 -05:00 by deekerman · 3 comments
Owner

Originally created by @Happyfeet01 on GitHub (Jan 19, 2024).

The bug

The problem occurs as soon as the app runs in the background on the iOS device for a while. If you then open the app again, you have to enter the access data again.

The OS that Immich Server is running on

Debian 12

Version of Immich Server

v1.92.1

Version of Immich Mobile App

v1.92.1

Platform with the issue

  • Server
  • Web
  • Mobile

Your docker-compose.yml content

version: "3.8"

#
# 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}
    command: [ "start.sh", "immich" ]
    volumes:
      - ${UPLOAD_LOCATION}:/usr/src/app/upload
      - /etc/localtime:/etc/localtime:ro
    env_file:
      - .env
    ports:
      - 2283:3001
    depends_on:
      - redis
      - database
    restart: always

  immich-microservices:
    container_name: immich_microservices
    image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}
    # extends:
    #   file: hwaccel.yml
    #   service: hwaccel
    command: [ "start.sh", "microservices" ]
    volumes:
      - ${UPLOAD_LOCATION}:/usr/src/app/upload
      - /etc/localtime:/etc/localtime:ro
    env_file:
      - .env
    depends_on:
      - redis
      - database
    restart: always

  immich-machine-learning:
    container_name: immich_machine_learning
    image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release}
    volumes:
      - model-cache:/cache
    env_file:
      - .env
    restart: always

  redis:
    container_name: immich_redis
    image: redis:6.2-alpine@sha256:c5a607fb6e1bb15d32bbcf14db22787d19e428d59e31a5da67511b49bb0f1ccc
    restart: always

  database:
    container_name: immich_postgres
    image: tensorchord/pgvecto-rs:pg14-v0.1.11@sha256:0335a1a22f8c5dd1b697f14f079934f5152eaaa216c09b61e293be285491f8ee
    env_file:
      - .env
    environment:
      POSTGRES_PASSWORD: ${DB_PASSWORD}
      POSTGRES_USER: ${DB_USERNAME}
      POSTGRES_DB: ${DB_DATABASE_NAME}
    volumes:
      - pgdata:/var/lib/postgresql/data
    restart: always

volumes:
  pgdata:
  model-cache:

Your .env content

# You can find documentation for all the supported env variables at https://immich.app/docs/install/environment-variables

# The location where your uploaded files are stored
UPLOAD_LOCATION=./library

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

# Connection secret for postgres. You should change it to a random password
DB_PASSWORD=<redacted>

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

REDIS_HOSTNAME=immich_redis

Reproduction steps

1. Login with the iOS App
2. let running the App in Background 
3. after some time, open the App again 
4. your must insert your login Data again.
...

Additional information

Log from App

PlatformDispatcher - Catch all error: ApiException 400: TLS/SSL communication failed: GET /album/25f4ffa5-6435-43b9-b23c-4e4445d49522 (Inner exception: HandshakeException: Connection terminated during handshake)

#0 ApiClient.invokeAPI (package:openapi/api_client.dart:111) <asynchronous suspension> #1 AlbumApi.getAlbumInfo (package:openapi/api/album_api.dart:311) <asynchronous suspension> #2 AlbumService.refreshRemoteAlbums.<anonymous closure> (package:immich_mobile/modules/album/services/album.service.dart:164) <asynchronous suspension> #3 SyncService._syncRemoteAlbum (package:immich_mobile/shared/services/sync.service.dart:308) <asynchronous suspension> #4 diffSortedLists (package:immich_mobile/utils/diff.dart:19) <asynchronous suspension> #5 SyncService._syncRemoteAlbumsToDb (package:immich_mobile/shared/services/sync.service.dart:267) <asynchronous suspension> #6 AlbumService.refreshRemoteAlbums (package:immich_mobile/modules/album/services/album.service.dart:159) <asynchronous suspension> #7 Future.wait.<anonymous closure> (dart:async/future.dart:525) <asynchronous suspension>

`Unable to get user information from the server.

FROM

AuthenticationNotifier`

Originally created by @Happyfeet01 on GitHub (Jan 19, 2024). ### The bug The problem occurs as soon as the app runs in the background on the iOS device for a while. If you then open the app again, you have to enter the access data again. ### The OS that Immich Server is running on Debian 12 ### Version of Immich Server v1.92.1 ### Version of Immich Mobile App v1.92.1 ### Platform with the issue - [ ] Server - [ ] Web - [X] Mobile ### Your docker-compose.yml content ```YAML version: "3.8" # # 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} command: [ "start.sh", "immich" ] volumes: - ${UPLOAD_LOCATION}:/usr/src/app/upload - /etc/localtime:/etc/localtime:ro env_file: - .env ports: - 2283:3001 depends_on: - redis - database restart: always immich-microservices: container_name: immich_microservices image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release} # extends: # file: hwaccel.yml # service: hwaccel command: [ "start.sh", "microservices" ] volumes: - ${UPLOAD_LOCATION}:/usr/src/app/upload - /etc/localtime:/etc/localtime:ro env_file: - .env depends_on: - redis - database restart: always immich-machine-learning: container_name: immich_machine_learning image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release} volumes: - model-cache:/cache env_file: - .env restart: always redis: container_name: immich_redis image: redis:6.2-alpine@sha256:c5a607fb6e1bb15d32bbcf14db22787d19e428d59e31a5da67511b49bb0f1ccc restart: always database: container_name: immich_postgres image: tensorchord/pgvecto-rs:pg14-v0.1.11@sha256:0335a1a22f8c5dd1b697f14f079934f5152eaaa216c09b61e293be285491f8ee env_file: - .env environment: POSTGRES_PASSWORD: ${DB_PASSWORD} POSTGRES_USER: ${DB_USERNAME} POSTGRES_DB: ${DB_DATABASE_NAME} volumes: - pgdata:/var/lib/postgresql/data restart: always volumes: pgdata: model-cache: ``` ### Your .env content ```Shell # You can find documentation for all the supported env variables at https://immich.app/docs/install/environment-variables # The location where your uploaded files are stored UPLOAD_LOCATION=./library # The Immich version to use. You can pin this to a specific version like "v1.71.0" IMMICH_VERSION=release # Connection secret for postgres. You should change it to a random password DB_PASSWORD=<redacted> # The values below this line do not need to be changed ################################################################################### DB_HOSTNAME=immich_postgres DB_USERNAME=postgres DB_DATABASE_NAME=immich REDIS_HOSTNAME=immich_redis ``` ### Reproduction steps ```bash 1. Login with the iOS App 2. let running the App in Background 3. after some time, open the App again 4. your must insert your login Data again. ... ``` ### Additional information Log from App `PlatformDispatcher - Catch all error: ApiException 400: TLS/SSL communication failed: GET /album/25f4ffa5-6435-43b9-b23c-4e4445d49522 (Inner exception: HandshakeException: Connection terminated during handshake) ` `#0 ApiClient.invokeAPI (package:openapi/api_client.dart:111) <asynchronous suspension> #1 AlbumApi.getAlbumInfo (package:openapi/api/album_api.dart:311) <asynchronous suspension> #2 AlbumService.refreshRemoteAlbums.<anonymous closure> (package:immich_mobile/modules/album/services/album.service.dart:164) <asynchronous suspension> #3 SyncService._syncRemoteAlbum (package:immich_mobile/shared/services/sync.service.dart:308) <asynchronous suspension> #4 diffSortedLists (package:immich_mobile/utils/diff.dart:19) <asynchronous suspension> #5 SyncService._syncRemoteAlbumsToDb (package:immich_mobile/shared/services/sync.service.dart:267) <asynchronous suspension> #6 AlbumService.refreshRemoteAlbums (package:immich_mobile/modules/album/services/album.service.dart:159) <asynchronous suspension> #7 Future.wait.<anonymous closure> (dart:async/future.dart:525) <asynchronous suspension> ` `Unable to get user information from the server. FROM AuthenticationNotifier`
deekerman 2026-02-20 01:00:58 -05:00
Author
Owner

@4f1sh3r commented on GitHub (Feb 9, 2024):

I have the same problem with this error message in the log. It happens every 2-3 days and after relogin it need to build the timeline from scratch again.
`

2024-02-09 15:29:08.518336 | LogLevel.SEVERE | ImmichErrorLogger | PlatformDispatcher - Catch all error: ApiException 400: HTTP connection failed: GET /album/d103f7cf-a5da-40ef-8586-1754e8818056 (Inner exception: Bad file descriptor) #0      IOClient.send (package:http/src/io_client.dart:90) #1      BaseClient._sendUnstreamed (package:http/src/base_client.dart:93) #2      ApiClient.invokeAPI (package:openapi/api_client.dart:101) #3      AlbumApi.getAlbumInfo (package:openapi/api/album_api.dart:311) #4      AlbumService.refreshRemoteAlbums. (package:immich_mobile/modules/album/services/album.service.dart:164) #5      SyncService._syncRemoteAlbum (package:immich_mobile/shared/services/sync.service.dart:308) #6      diffSortedLists (package:immich_mobile/utils/diff.dart:19) #7      SyncService._syncRemoteAlbumsToDb (package:immich_mobile/shared/services/sync.service.dart:267) #8      AlbumService.refreshRemoteAlbums (package:immich_mobile/modules/album/services/album.service.dart:159) #9      Future.wait. (dart:async/future.dart:523) | #0      ApiClient.invokeAPI (package:openapi/api_client.dart:125) #1      AlbumApi.getAlbumInfo (package:openapi/api/album_api.dart:311) #2      AlbumService.refreshRemoteAlbums. (package:immich_mobile/modules/album/services/album.service.dart:164) #3      SyncService._syncRemoteAlbum (package:immich_mobile/shared/services/sync.service.dart:308) #4      diffSortedLists (package:immich_mobile/utils/diff.dart:19) #5      SyncService._syncRemoteAlbumsToDb (package:immich_mobile/shared/services/sync.service.dart:267) #6      AlbumService.refreshRemoteAlbums (package:immich_mobile/modules/album/services/album.service.dart:159) #7      Future.wait. (dart:async/future.dart:523)


`

@4f1sh3r commented on GitHub (Feb 9, 2024): I have the same problem with this error message in the log. It happens every 2-3 days and after relogin it need to build the timeline from scratch again. ` 2024-02-09 15:29:08.518336 | LogLevel.SEVERE | ImmichErrorLogger | PlatformDispatcher - Catch all error: ApiException 400: HTTP connection failed: GET /album/d103f7cf-a5da-40ef-8586-1754e8818056 (Inner exception: Bad file descriptor) #0      IOClient.send (package:http/src/io_client.dart:90) <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      AlbumApi.getAlbumInfo (package:openapi/api/album_api.dart:311) <asynchronous suspension> #4      AlbumService.refreshRemoteAlbums.<anonymous closure> (package:immich_mobile/modules/album/services/album.service.dart:164) <asynchronous suspension> #5      SyncService._syncRemoteAlbum (package:immich_mobile/shared/services/sync.service.dart:308) <asynchronous suspension> #6      diffSortedLists (package:immich_mobile/utils/diff.dart:19) <asynchronous suspension> #7      SyncService._syncRemoteAlbumsToDb (package:immich_mobile/shared/services/sync.service.dart:267) <asynchronous suspension> #8      AlbumService.refreshRemoteAlbums (package:immich_mobile/modules/album/services/album.service.dart:159) <asynchronous suspension> #9      Future.wait.<anonymous closure> (dart:async/future.dart:523) <asynchronous suspension> | #0      ApiClient.invokeAPI (package:openapi/api_client.dart:125) <asynchronous suspension> #1      AlbumApi.getAlbumInfo (package:openapi/api/album_api.dart:311) <asynchronous suspension> #2      AlbumService.refreshRemoteAlbums.<anonymous closure> (package:immich_mobile/modules/album/services/album.service.dart:164) <asynchronous suspension> #3      SyncService._syncRemoteAlbum (package:immich_mobile/shared/services/sync.service.dart:308) <asynchronous suspension> #4      diffSortedLists (package:immich_mobile/utils/diff.dart:19) <asynchronous suspension> #5      SyncService._syncRemoteAlbumsToDb (package:immich_mobile/shared/services/sync.service.dart:267) <asynchronous suspension> #6      AlbumService.refreshRemoteAlbums (package:immich_mobile/modules/album/services/album.service.dart:159) <asynchronous suspension> #7      Future.wait.<anonymous closure> (dart:async/future.dart:523) <asynchronous suspension> <br class="Apple-interchange-newline" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-tap-highlight-color: rgba(26, 26, 26, 0.3); -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none;">`
Author
Owner

@ALMAAAAA commented on GitHub (May 19, 2024):

Same error here, both Server and client run on version 1.105.1. But my timeline never finishes, it seems to be spinning forever.

@ALMAAAAA commented on GitHub (May 19, 2024): Same error here, both Server and client run on version 1.105.1. But my timeline never finishes, it seems to be spinning forever.
Author
Owner

@jrasm91 commented on GitHub (Sep 5, 2024):

I believe this has been fixed with #11431

@jrasm91 commented on GitHub (Sep 5, 2024): I believe this has been fixed with #11431
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/immich#2021
No description provided.