[BUG] Mobile app backup issues #1438

Closed
opened 2026-02-05 01:49:05 +03:00 by OVERLORD · 12 comments
Owner

Originally created by @Digital39999 on GitHub (Oct 10, 2023).

Mobile app backup issues and button state

I've been experiencing weird stuff while backing up my phone, firstly it got stuck at uploading videos, and on server side it started causing exponential file growth in /library/uploads folder, as shown here:
uwUB9eRYM
6AxKZ2SHM
(this one is few min before or later, sizes changed already)

It successfully backed up all my photos, but kept failing on videos, and also to note, all files in /uploads are videos generated by immich too:
tnotAk9Iz

It has random cpu spikes, but every time it happened i checked jobs and none was running, and i have few disabled too. Logs don't show any bugs or errors, all seems pretty normal.

And another bug is that when having backup page opened, and swiping on notifications, button state and upload progress resets for some reason:
https://github.com/immich-app/immich/assets/65065580/69d01a52-5a67-4306-aed7-8e4326813126

Related Discord threads is here: https://discord.com/channels/979116623879368755/1161292114513121381

The OS that Immich Server is running on

Debian 12, Docker

Version of Immich Server

v1.81.1

Version of Immich Mobile App

v1.81.0 build.104

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
      - /etc/localtime:/etc/localtime:ro
    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
      - /etc/localtime:/etc/localtime:ro
    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:
      - model-cache:/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:
      - tsdata:/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:
      - pgdata:/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=./library
IMMICH_VERSION=release
TYPESENSE_API_KEY=something_yes_i_changes_this
DB_PASSWORD=something_yes_i_changes_this_too
DB_HOSTNAME=immich_postgres
DB_USERNAME=postgres
DB_DATABASE_NAME=immich
REDIS_HOSTNAME=immich_redis

Reproduction steps

Video and storage bug:
1. Turn background backup on(?)
2. Make it somehow upload videos, which are like few hundred megabytes.

Button and progress bug:
1. Scroll down to the end of backup page on mobile.
2. Turn background backup, and have backup ongoing.
3. Swipe down on notifications and observe "Start Upload" button.

Additional information

Android Version: 13
One UI Version: 5.1

Originally created by @Digital39999 on GitHub (Oct 10, 2023). ### Mobile app backup issues and button state I've been experiencing weird stuff while backing up my phone, firstly it got stuck at uploading **videos**, and on server side it started causing exponential file growth in /library/uploads folder, as shown here: ![uwUB9eRYM](https://github.com/immich-app/immich/assets/65065580/5d41c230-a3b5-4ba1-b552-1c15b9d06cd3) ![6AxKZ2SHM](https://github.com/immich-app/immich/assets/65065580/4a507edb-e938-4955-8964-7bdfd5d80da9) (this one is few min before or later, sizes changed already) It successfully backed up all my photos, but kept failing on videos, and also to note, all files in /uploads are videos generated by immich too: ![tnotAk9Iz](https://github.com/immich-app/immich/assets/65065580/a4f4ff19-8969-4b7f-b113-99e966b199b4) It has random cpu spikes, but every time it happened i checked jobs and none was running, and i have few disabled too. Logs don't show any bugs or errors, all seems pretty normal. And another bug is that when having backup page opened, and swiping on notifications, button state and upload progress resets for some reason: https://github.com/immich-app/immich/assets/65065580/69d01a52-5a67-4306-aed7-8e4326813126 Related Discord threads is here: https://discord.com/channels/979116623879368755/1161292114513121381 ### The OS that Immich Server is running on Debian 12, Docker ### Version of Immich Server v1.81.1 ### Version of Immich Mobile App v1.81.0 build.104 ### 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 - /etc/localtime:/etc/localtime:ro 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 - /etc/localtime:/etc/localtime:ro 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: - model-cache:/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: - tsdata:/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: - pgdata:/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=./library IMMICH_VERSION=release TYPESENSE_API_KEY=something_yes_i_changes_this DB_PASSWORD=something_yes_i_changes_this_too DB_HOSTNAME=immich_postgres DB_USERNAME=postgres DB_DATABASE_NAME=immich REDIS_HOSTNAME=immich_redis ``` ### Reproduction steps ```bash Video and storage bug: 1. Turn background backup on(?) 2. Make it somehow upload videos, which are like few hundred megabytes. Button and progress bug: 1. Scroll down to the end of backup page on mobile. 2. Turn background backup, and have backup ongoing. 3. Swipe down on notifications and observe "Start Upload" button. ``` ### Additional information Android Version: 13 One UI Version: 5.1
Author
Owner

@alextran1502 commented on GitHub (Oct 10, 2023):

Hello, do you use DNS or local IP for accessing Immich? Also, when you upload a video from the foreground task, does it work at all?

@alextran1502 commented on GitHub (Oct 10, 2023): Hello, do you use DNS or local IP for accessing Immich? Also, when you upload a video from the foreground task, does it work at all?
Author
Owner

@Digital39999 commented on GitHub (Oct 10, 2023):

I host immich on localhost and use cloudflare argo tunnel to forward it to my subdomain.
For second, I'm honestly not sure, i did see that it does upload, very very slowly tho for small video, and remaining count of videos never actually changes, so I'd say no.

@Digital39999 commented on GitHub (Oct 10, 2023): I host immich on localhost and use cloudflare argo tunnel to forward it to my subdomain. For second, I'm honestly not sure, i did see that it does upload, very very slowly tho for small video, and remaining count of videos never actually changes, so I'd say no.
Author
Owner

@alextran1502 commented on GitHub (Oct 10, 2023):

Cloudflare tunnel has limitation of uploading size (100MB) so I believe it kill off the upload sequence therefore lead to stale/orphaned video files in your upload folder

@alextran1502 commented on GitHub (Oct 10, 2023): Cloudflare tunnel has limitation of uploading size (100MB) so I believe it kill off the upload sequence therefore lead to stale/orphaned video files in your `upload` folder
Author
Owner

@Digital39999 commented on GitHub (Oct 10, 2023):

What about cloudflare proxy? Aka having proxy on server and dns A record on cloudflare?
Or, is there a way to make Immich slice videos and upload in smaller parts?

@Digital39999 commented on GitHub (Oct 10, 2023): What about cloudflare proxy? Aka having proxy on server and dns A record on cloudflare? Or, is there a way to make Immich slice videos and upload in smaller parts?
Author
Owner

@alextran1502 commented on GitHub (Oct 10, 2023):

I am not sure, I don't use CF so I cannot answer the question.

@alextran1502 commented on GitHub (Oct 10, 2023): I am not sure, I don't use CF so I cannot answer the question.
Author
Owner

@Digital39999 commented on GitHub (Oct 10, 2023):

I'm not sure how to resolve this honestly, my server is in my local network and i can't really find a way to expose it to the internet so i can grab it's port. How about that other question, about immich sending video as packets?

And btw, don't forget about that button/progress bug.

@Digital39999 commented on GitHub (Oct 10, 2023): I'm not sure how to resolve this honestly, my server is in my local network and i can't really find a way to expose it to the internet so i can grab it's port. How about that other question, about immich sending video as packets? And btw, don't forget about that button/progress bug.
Author
Owner

@alextran1502 commented on GitHub (Oct 10, 2023):

You can use reverse-proxy or wireguard VPN. I am closing this issue as this is related to CF tunnel setup, for more help with reverse proxy we can continue on Discord

@alextran1502 commented on GitHub (Oct 10, 2023): You can use reverse-proxy or wireguard VPN. I am closing this issue as this is related to CF tunnel setup, for more help with reverse proxy we can continue on Discord
Author
Owner

@Digital39999 commented on GitHub (Oct 10, 2023):

You can join ongoing forum in original message.

@Digital39999 commented on GitHub (Oct 10, 2023): You can join ongoing forum in original message.
Author
Owner

@ddshd commented on GitHub (Oct 10, 2023):

What about cloudflare proxy? Aka having proxy on server and dns A record on cloudflare?

If the traffic hits cloudflare’s network then it will be limited by the upload limit on your account.

I’d suggest using a VPN service like Tailscale

@ddshd commented on GitHub (Oct 10, 2023): > What about cloudflare proxy? Aka having proxy on server and dns A record on cloudflare? If the traffic hits cloudflare’s network then it will be limited by the upload limit on your account. I’d suggest using a VPN service like Tailscale
Author
Owner

@Digital39999 commented on GitHub (Oct 17, 2023):

What about cloudflare proxy? Aka having proxy on server and dns A record on cloudflare?

If the traffic hits cloudflare’s network then it will be limited by the upload limit on your account.

I’d suggest using a VPN service like Tailscale

I just noticed, but doesn't Immich send header that tricks cloudflare with the file limits? If so, why does this still occur?

@Digital39999 commented on GitHub (Oct 17, 2023): > > What about cloudflare proxy? Aka having proxy on server and dns A record on cloudflare? > > If the traffic hits cloudflare’s network then it will be limited by the upload limit on your account. > > I’d suggest using a VPN service like Tailscale I just noticed, but doesn't Immich send header that tricks cloudflare with the file limits? If so, why does this still occur?
Author
Owner

@ddshd commented on GitHub (Oct 17, 2023):

What about cloudflare proxy? Aka having proxy on server and dns A record on cloudflare?

If the traffic hits cloudflare’s network then it will be limited by the upload limit on your account.
I’d suggest using a VPN service like Tailscale

I just noticed, but doesn't Immich send header that tricks cloudflare with the file limits? If so, why does this still occur?

Immich’s file limit headers only apply if you’re directly connected to the Immich reverse proxy. If you’re going through the Cloudflare network then you are connecting to it’s reverse proxy (or similar implementation) which would apply it’s own limits before they get to the Immich reverse proxy

@ddshd commented on GitHub (Oct 17, 2023): > > > What about cloudflare proxy? Aka having proxy on server and dns A record on cloudflare? > > > > > > If the traffic hits cloudflare’s network then it will be limited by the upload limit on your account. > > I’d suggest using a VPN service like Tailscale > > I just noticed, but doesn't Immich send header that tricks cloudflare with the file limits? If so, why does this still occur? Immich’s file limit headers only apply if you’re directly connected to the Immich reverse proxy. If you’re going through the Cloudflare network then you are connecting to it’s reverse proxy (or similar implementation) which would apply it’s own limits before they get to the Immich reverse proxy
Author
Owner

@Digital39999 commented on GitHub (Nov 12, 2023):

You can use reverse-proxy or wireguard VPN. I am closing this issue as this is related to CF tunnel setup, for more help with reverse proxy we can continue on Discord

Hey, I'd just like to point out after this all and after i finally resolved cloudflare issue, that other one persists, where after most successful uploads to server directly, app will kinda bug out, and it wont upload in background anymore so you have to open it in that page settings and watch the bar fill up.. Swiping on notification center or screen going dark will interrupt it even if you have background and foreground backup on, which again causes increased files, which are shown now in administration > repair tab. There should be some way of communicating if some failed so it gets deleted, and app should probably be optimized to fix that breaking with uploads.

@Digital39999 commented on GitHub (Nov 12, 2023): > You can use reverse-proxy or wireguard VPN. I am closing this issue as this is related to CF tunnel setup, for more help with reverse proxy we can continue on Discord Hey, I'd just like to point out after this all and after i finally resolved cloudflare issue, that other one persists, where after most successful uploads to server directly, app will kinda bug out, and it wont upload in background anymore so you have to open it in that page settings and watch the bar fill up.. Swiping on notification center or screen going dark will interrupt it even if you have background and foreground backup on, which again causes increased files, which are shown now in administration > repair tab. There should be some way of communicating if some failed so it gets deleted, and app should probably be optimized to fix that breaking with uploads.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: immich-app/immich#1438