[BUG] Foreground and Background Uploads Don't work on IOS #1310

Closed
opened 2026-02-05 01:13:46 +03:00 by OVERLORD · 2 comments
Owner

Originally created by @treverehrfurth on GitHub (Sep 7, 2023).

The bug

I attempted Immich months ago and stopped because I got so frustrated that IOS background and foreground uploading never worked. Hoped by now this issue was fixed and I see its not. I was on an Iphone XS Max months ago and now I'm on a 13 Pro, still same issue.

I have background app refresh turned on in settings for WIFI and Cellular and its enabled on Immich.
I have both Automatic background backup with only while charging disabled as well as foreground backup turned on.
I can take photos(s)/video(s) and days later its never uploaded. But once I open the App... it uploads.

How has this issue not been solved yet?

The OS that Immich Server is running on

Ubuntu, docker

Version of Immich Server

1.77

Version of Immich Mobile App

1.76 build.116

Platform with the issue

  • Server
  • Web
  • Mobile

Your docker-compose.yml content

version: "3.8"

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
    env_file:
      - stack.env
    depends_on:
      - redis
      - database
      - typesense
    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
    env_file:
      - stack.env
    depends_on:
      - redis
      - database
      - typesense
    restart: always

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

  immich-web:
    container_name: immich_web
    image: ghcr.io/immich-app/immich-web:${IMMICH_VERSION:-release}
    env_file:
      - stack.env
    restart: always

  typesense:
    container_name: immich_typesense
    image: typesense/typesense:0.24.1@sha256:9bcff2b829f12074426ca044b56160ca9d777a0c488303469143dd9f8259d4dd
    environment:
      - TYPESENSE_API_KEY=${TYPESENSE_API_KEY}
      - TYPESENSE_DATA_DIR=/data
      # remove this to get debug messages
      - GLOG_minloglevel=1
    volumes:
      - /mnt/share/dockerdata/immich/tsdata/_data:/data
    restart: always

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

  database:
    container_name: immich_postgres
    image: postgres:14-alpine@sha256:28407a9961e76f2d285dc6991e8e48893503cc3836a4755bbc2d40bcc272a441
    env_file:
      - stack.env
    environment:
      POSTGRES_PASSWORD: ${DB_PASSWORD}
      POSTGRES_USER: ${DB_USERNAME}
      POSTGRES_DB: ${DB_DATABASE_NAME}
    volumes:
      - /mnt/share/dockerdata/immich/pgdata/_data:/var/lib/postgresql/data
    restart: always

  immich-proxy:
    container_name: immich_proxy
    image: ghcr.io/immich-app/immich-proxy:${IMMICH_VERSION:-release}
    environment:
      # Make sure these values get passed through from the env file
      - IMMICH_SERVER_URL
      - IMMICH_WEB_URL
    ports:
      - 2283:8080
    depends_on:
      - immich-server
      - immich-web
    restart: always

volumes:
  pgdata:
  model-cache:
  tsdata:

Your .env content

UPLOAD_LOCATION=/mnt/share/treshare/Trecloud/Media/immich2
IMMICH_VERSION=release
TYPESENSE_API_KEY=some-random-text
DB_PASSWORD=E7D^ba49!%bnvKanQUvfW2MAX
DB_HOSTNAME=immich_postgres
DB_USERNAME=postgres
DB_DATABASE_NAME=immich
REDIS_HOSTNAME=immich_redis

Reproduction steps

Take picture
Wait, check immich not from mobile app to see if uploaded.
no file uploaded until Immich ios app is opened.

Additional information

No response

Originally created by @treverehrfurth on GitHub (Sep 7, 2023). ### The bug I attempted Immich months ago and stopped because I got so frustrated that IOS background and foreground uploading never worked. Hoped by now this issue was fixed and I see its not. I was on an Iphone XS Max months ago and now I'm on a 13 Pro, still same issue. I have background app refresh turned on in settings for WIFI and Cellular and its enabled on Immich. I have both Automatic background backup with only while charging disabled as well as foreground backup turned on. I can take photos(s)/video(s) and days later its never uploaded. But once I open the App... it uploads. How has this issue not been solved yet? ### The OS that Immich Server is running on Ubuntu, docker ### Version of Immich Server 1.77 ### Version of Immich Mobile App 1.76 build.116 ### Platform with the issue - [ ] Server - [ ] Web - [X] Mobile ### Your docker-compose.yml content ```YAML version: "3.8" 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 env_file: - stack.env depends_on: - redis - database - typesense 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 env_file: - stack.env depends_on: - redis - database - typesense restart: always immich-machine-learning: container_name: immich_machine_learning image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release} volumes: - /mnt/share/dockerdata/immich/model-cache/_data:/cache env_file: - stack.env restart: always immich-web: container_name: immich_web image: ghcr.io/immich-app/immich-web:${IMMICH_VERSION:-release} env_file: - stack.env restart: always typesense: container_name: immich_typesense image: typesense/typesense:0.24.1@sha256:9bcff2b829f12074426ca044b56160ca9d777a0c488303469143dd9f8259d4dd environment: - TYPESENSE_API_KEY=${TYPESENSE_API_KEY} - TYPESENSE_DATA_DIR=/data # remove this to get debug messages - GLOG_minloglevel=1 volumes: - /mnt/share/dockerdata/immich/tsdata/_data:/data restart: always redis: container_name: immich_redis image: redis:6.2-alpine@sha256:70a7a5b641117670beae0d80658430853896b5ef269ccf00d1827427e3263fa3 restart: always database: container_name: immich_postgres image: postgres:14-alpine@sha256:28407a9961e76f2d285dc6991e8e48893503cc3836a4755bbc2d40bcc272a441 env_file: - stack.env environment: POSTGRES_PASSWORD: ${DB_PASSWORD} POSTGRES_USER: ${DB_USERNAME} POSTGRES_DB: ${DB_DATABASE_NAME} volumes: - /mnt/share/dockerdata/immich/pgdata/_data:/var/lib/postgresql/data restart: always immich-proxy: container_name: immich_proxy image: ghcr.io/immich-app/immich-proxy:${IMMICH_VERSION:-release} environment: # Make sure these values get passed through from the env file - IMMICH_SERVER_URL - IMMICH_WEB_URL ports: - 2283:8080 depends_on: - immich-server - immich-web restart: always volumes: pgdata: model-cache: tsdata: ``` ### Your .env content ```Shell UPLOAD_LOCATION=/mnt/share/treshare/Trecloud/Media/immich2 IMMICH_VERSION=release TYPESENSE_API_KEY=some-random-text DB_PASSWORD=E7D^ba49!%bnvKanQUvfW2MAX DB_HOSTNAME=immich_postgres DB_USERNAME=postgres DB_DATABASE_NAME=immich REDIS_HOSTNAME=immich_redis ``` ### Reproduction steps ```bash Take picture Wait, check immich not from mobile app to see if uploaded. no file uploaded until Immich ios app is opened. ``` ### Additional information _No response_
Author
Owner

@alextran1502 commented on GitHub (Sep 7, 2023):

@Pray4Tre The background upload works, but it heavily depends on the scheduler of iOS when it can run, and we don't have control over this. Usually, when the phone is not plugged it, the scheduler allows the background task to run every 10 or so minutes, and it can run around 30 seconds or so before getting killed by the OS.

The frequency of when the background task can run also depends on the user's usage behavior and how other apps are being used.

I advise you use foreground upload for initial bulk upload and use background upload for incremental upload after ward.

@alextran1502 commented on GitHub (Sep 7, 2023): @Pray4Tre The background upload works, but it heavily depends on the scheduler of iOS when it can run, and we don't have control over this. Usually, when the phone is not plugged it, the scheduler allows the background task to run every 10 or so minutes, and it can run around 30 seconds or so before getting killed by the OS. The frequency of when the background task can run also depends on the user's usage behavior and how other apps are being used. I advise you use foreground upload for initial bulk upload and use background upload for incremental upload after ward.
Author
Owner

@treverehrfurth commented on GitHub (Sep 7, 2023):

If thats true... why does it never upload, for days on end. Both plugged in and not?
Saying "it works" and then closing the request doesn't solve anything.

@treverehrfurth commented on GitHub (Sep 7, 2023): If thats true... why does it never upload, for days on end. Both plugged in and not? Saying "it works" and then closing the request doesn't solve anything.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: immich-app/immich#1310