#30756·immich

iOS backup uploads frequently fail with "PathNotFoundException"

Author: zvandermeerCreated Aug 14, 2026Updated Sep 27, 2026
Labels📱mobile

I have searched the existing issues, both open and closed, to make sure this is not a duplicate report.

  • Yes

The bug

I'm having a strange issue where Immich appears to inconsistently erroring out while trying to upload assets using the Backup feature. Frequently it will fail to upload saying "Upload error for 3 assets" and get stuck. The error I'm seeing is PathNotFoundException, saying "Cannot retrieve length of file". I don't use iCloud sync and I can confirm all my photos and videos are on my device properly. Selecting the photo/video and clicking "Upload" individually uploads without issue, I only encounter errors when attempting to allow it to automatically sync. I'm also able to view photos and playback videos from inside the immich app without issue.

This happens inconsistently but frequently, I often need to keep restarting the app until it uploads successfully. Sometimes even when it shows three errors and nothing in the queue, I see my photos still "uploading" (the crossed out cloud icon in the photos feed changes to a cloud with a checkmark) but eventually stops. In this state the upload spinner is still spinning. I've attached my log files and screenshots to this issue to hopefully help diagnose.

This started happening when I updated to 3.1.0, I didn't notice it at all before then. I've tried uninstalling and reinstalling the app, but the issue persists across installs.

Image Image

The OS that Immich Server is running on

Debian 13

Version of Immich Server

3.1.0

Version of Immich Mobile App

3.1.0

Platform with the issue

  • Server
  • Web
  • Mobile

Device make and model

iPhone 13 Mini, iOS 26.6

Your docker-compose.yml content

yaml
#
# WARNING: To install Immich, follow our guide: https://docs.immich.app/install/docker-compose
#
# 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:
    user: 1100:1100
    container_name: immich_server
    image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}
    # extends:
    #   file: hwaccel.transcoding.yml
    #   service: cpu # set to one of [nvenc, quicksync, rkmpp, vaapi, vaapi-wsl] for accelerated transcoding
    volumes:
      # Do not edit the next line. If you want to change the media storage location on your system, edit the value of UPLOAD_LOCATION in the .env file
      - ${UPLOAD_LOCATION}:/data
      - /etc/localtime:/etc/localtime:ro
    env_file:
      - .env
    ports:
      - '2283:2283'
    depends_on:
      - redis
      - database
    restart: always
    healthcheck:
      disable: false

  immich-machine-learning:
    container_name: immich_machine_learning
    # For hardware acceleration, add one of -[armnn, cuda, rocm, openvino, rknn] to the image tag.
    # Example tag: ${IMMICH_VERSION:-release}-cuda
    image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release}
    # extends: # uncomment this section for hardware acceleration - see https://docs.immich.app/features/ml-hardware-acceleration
    #   file: hwaccel.ml.yml
    #   service: cpu # set to one of [armnn, cuda, rocm, openvino, openvino-wsl, rknn] for accelerated inference - use the `-wsl` version for WSL2 where applicable
    volumes:
      - model-cache:/cache
    env_file:
      - .env
    restart: always
    healthcheck:
      disable: false

  redis:
    container_name: immich_redis
    image: docker.io/valkey/valkey:8@sha256:81db6d39e1bba3b3ff32bd3a1b19a6d69690f94a3954ec131277b9a26b95b3aa
    healthcheck:
      test: redis-cli ping || exit 1
    restart: always

  database:
    container_name: immich_postgres
    image: ghcr.io/immich-app/postgres:14-vectorchord0.4.3-pgvectors0.2.0@sha256:bcf63357191b76a916ae5eb93464d65c07511da41e3bf7a8416db519b40b1c23
    environment:
      POSTGRES_PASSWORD: ${DB_PASSWORD}
      POSTGRES_USER: ${DB_USERNAME}
      POSTGRES_DB: ${DB_DATABASE_NAME}
      POSTGRES_INITDB_ARGS: '--data-checksums'
      # Uncomment the DB_STORAGE_TYPE: 'HDD' var if your database isn't stored on SSDs
      # DB_STORAGE_TYPE: 'HDD'
    volumes:
      # Do not edit the next line. If you want to change the database storage location on your system, edit the value of DB_DATA_LOCATION in the .env file
      - ${DB_DATA_LOCATION}:/var/lib/postgresql/data
    shm_size: 128mb
    restart: always

volumes:
  model-cache:

Your .env content

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

# The location where your uploaded files are stored
UPLOAD_LOCATION=/mnt/nfs/docker/immich/library

# The location where your database files are stored. Network shares are not supported for the database
DB_DATA_LOCATION=./postgres

# To set a timezone, uncomment the next line and change Etc/UTC to a TZ identifier from this list: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List
TZ=America/Toronto

# The Immich version to use. You can pin this to a specific version like "v2.1.0"
IMMICH_VERSION=v3

# Connection secret for postgres. You should change it to a random password
# Please use only the characters `A-Za-z0-9`, without special characters or spaces
DB_PASSWORD=[redacted]

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

Reproduction steps

  1. Attempt to open the Immich app to backup photos / videos
  2. Backup "View Details" screen will show items attempting to upload, but making no progress
  3. Eventually the files fail with PathNotFoundException ...

Relevant log output

bash
2026-08-13 22:02:39.544424 | info     | SyncApiRepository    | Remote Sync completed in 3372ms |
2026-08-13 22:02:35.742739 | info     | SyncStreamService    | Remote sync request for user |
2026-08-13 22:02:35.590182 | info     | SyncStreamService    | Successfully processed 2 assets in batch |
2026-08-13 22:02:35.587817 | info     | SyncStreamService    | Processing batch of 2 AssetUploadReadyV2 events |
2026-08-13 22:02:31.580583 | info     | SyncApiRepository    | Remote Sync completed in 3688ms |
2026-08-13 22:02:27.668362 | info     | SyncStreamService    | Remote sync request for user |
2026-08-13 22:02:27.384689 | info     | SyncStreamService    | Successfully processed 1 assets in batch |
2026-08-13 22:02:27.379593 | info     | SyncStreamService    | Processing batch of 1 AssetUploadReadyV2 events |
2026-08-13 22:02:25.528160 | warning  | StorageRepository    | Error deleting temporary directory | PathNotFoundException: Deletion failed, path = '/private/var/mobile/Containers/Data/Application/A94B94ED-914B-47BB-85CE-B000F380AE76/tmp' (OS Error: No such file or directory, errno = 2) |
#0      _checkForErrorResponse (dart:io/common.dart:58)
#1      _Directory._delete.<anonymous closure> (dart:io/directory_impl.dart:208)
<asynchronous suspension>
#2      StorageRepository.clearCache (package:immich_mobile/infrastructure/repositories/storage.repository.dart:148)
<asynchronous suspension>
#3      ForegroundUploadService._executeWithWorkerPool (package:immich_mobile/services/foreground_upload.service.dart:202)
<asynchronous suspension>
#4      ForegroundUploadService.uploadCandidates (package:immich_mobile/services/foreground_upload.service.dart:97)
<asynchronous suspension>
#5      AppLifeCycleNotifier._safeRun (package:immich_mobile/providers/app_life_cycle.provider.dart:98)
<asynchronous suspension>
#6      AppLifeCycleNotifier._resumeBackup (package:immich_mobile/providers/app_life_cycle.provider.dart:147)
<asynchronous suspension>

2026-08-13 22:02:25.526426 | info     | ForegroundUploadService | Network capabilities: [NetworkCapability.wifi, NetworkCapability.unmetered], hasWifi/isUnmetered: true |
2026-08-13 22:02:25.526406 | info     | ForegroundUploadService | Network capabilities: [NetworkCapability.wifi, NetworkCapability.unmetered], hasWifi/isUnmetered: true |
2026-08-13 22:02:25.514399 | info     | HashService          | Hashing took - 9ms |
2026-08-13 22:02:25.504967 | info     | HashService          | Starting hashing of assets |
2026-08-13 22:02:25.502300 | info     | DeviceSyncService    | Device sync took - 204ms |
2026-08-13 22:02:25.434062 | info     | SyncApiRepository    | Remote Sync completed in 112ms |
2026-08-13 22:02:25.298472 | info     | SyncStreamService    | Remote sync request for user |
2026-08-13 22:02:24.732263 | info     | AppLifeCycleNotifier | Using server URL: https://immich.starlightt.xyz/api |
2026-08-13 21:59:54.364856 | info     | SyncApiRepository    | Remote Sync completed in 95ms |
2026-08-13 21:59:54.254101 | info     | SyncStreamService    | Remote sync request for user |
2026-08-13 21:59:52.703495 | severe   | ForegroundUploadService | ERROR deleting file: PathNotFoundException: Cannot delete file, path = '/private/var/mobile/Containers/Data/Application/A94B94ED-914B-47BB-85CE-B000F380AE76/tmp/.image/DF9CD309-AB4B-4BDC-885C-7908B0598DC1_L0_001_1786638987.829311_o_IMG_9451.PNG' (OS Error: No such file or directory, errno = 2) | #0      _checkForErrorResponse (dart:io/common.dart:58)
#1      _File._delete.<anonymous closure> (dart:io/file_impl.dart:349)
<asynchronous suspension>
#2      ForegroundUploadService.uploadSingleAsset (package:immich_mobile/services/foreground_upload.service.dart:406)
<asynchronous suspension>
#3      ForegroundUploadService._executeWithWorkerPool.worker (package:immich_mobile/services/foreground_upload.service.dart:225)
<asynchronous suspension>
#4      Future.wait.<anonymous closure> (dart:async/future.dart:546)
<asynchronous suspension>
#5      ForegroundUploadService._executeWithWorkerPool (package:immich_mobile/services/foreground_upload.service.dart:234)
<asynchronous suspension>
#6      ForegroundUploadService.uploadCandidates (package:immich_mobile/services/foreground_upload.service.dart:97)
<asynchronous suspension>
 |
2026-08-13 21:59:52.703287 | severe   | ForegroundUploadService | Error(null) uploading DF9CD309-AB4B-4BDC-885C-7908B0598DC1/L0/001 | IMG_9451.PNG | Created on 2026-08-13 16:36:27.000Z | PathNotFoundException: Cannot retrieve length of file, path = '/private/var/mobile/Containers/Data/Application/A94B94ED-914B-47BB-85CE-B000F380AE76/tmp/.image/DF9CD309-AB4B-4BDC-885C-7908B0598DC1_L0_001_1786638987.829311_o_IMG_9451.PNG' (OS Error: No such file or directory, errno = 2) |
2026-08-13 21:59:52.703287 | severe   | DriftBackupNotifier  | Upload failed for DF9CD309-AB4B-4BDC-885C-7908B0598DC1/L0/001: PathNotFoundException: Cannot retrieve length of file, path = '/private/var/mobile/Containers/Data/Application/A94B94ED-914B-47BB-85CE-B000F380AE76/tmp/.image/DF9CD309-AB4B-4BDC-885C-7908B0598DC1_L0_001_1786638987.829311_o_IMG_9451.PNG' (OS Error: No such file or directory, errno = 2) |
2026-08-13 21:59:52.703284 | warning  | UploadRepository     | Error uploading asset[DF9CD309-AB4B-4BDC-885C-7908B0598DC1/L0/001]: PathNotFoundException: Cannot retrieve length of file, path = '/private/var/mobile/Containers/Data/Application/A94B94ED-914B-47BB-85CE-B000F380AE76/tmp/.image/DF9CD309-AB4B-4BDC-885C-7908B0598DC1_L0_001_1786638987.829311_o_IMG_9451.PNG' (OS Error: No such file or directory, errno = 2): #0      _File.throwIfError (dart:io/file_impl.dart:779)
#1      _File.lengthSync (dart:io/file_impl.dart:457)
#2      UploadRepository.uploadFile (package:immich_mobile/repositories/upload.repository.dart:109)
#3      ForegroundUploadService.uploadSingleAsset (package:immich_mobile/services/foreground_upload.service.dart:372)
<asynchronous suspension>
#4      ForegroundUploadService._executeWithWorkerPool.worker (package:immich_mobile/services/foreground_upload.service.dart:225)
<asynchronous suspension>
#5      Future.wait.<anonymous closure> (dart:async/future.dart:546)
<asynchronous suspension>
#6      ForegroundUploadService._executeWithWorkerPool (package:immich_mobile/services/foreground_upload.service.dart:234)
<asynchronous suspension>
#7      ForegroundUploadService.uploadCandidates (package:immich_mobile/services/foreground_upload.service.dart:97)
<asynchronous suspension>
 |
2026-08-13 21:59:52.701205 | severe   | ForegroundUploadService | ERROR deleting file: PathNotFoundException: Cannot delete file, path = '/private/var/mobile/Containers/Data/Application/A94B94ED-914B-47BB-85CE-B000F380AE76/tmp/.image/D0FA0E3B-3697-48CC-B6D5-54A81EC2754B_L0_001_1786577639.543923_o_IMG_9450.HEIC' (OS Error: No such file or directory, errno = 2) | #0      _checkForErrorResponse (dart:io/common.dart:58)
#1      _File._delete.<anonymous closure> (dart:io/file_impl.dart:349)
<asynchronous suspension>
#2      ForegroundUploadService.uploadSingleAsset (package:immich_mobile/services/foreground_upload.service.dart:406)
<asynchronous suspension>
#3      ForegroundUploadService._executeWithWorkerPool.worker (package:immich_mobile/services/foreground_upload.service.dart:225)
<asynchronous suspension>
#4      Future.wait.<anonymous closure> (dart:async/future.dart:546)
<asynchronous suspension>
#5      ForegroundUploadService._executeWithWorkerPool (package:immich_mobile/services/foreground_upload.service.dart:234)
<asynchronous suspension>
#6      ForegroundUploadService.uploadCandidates (package:immich_mobile/services/foreground_upload.service.dart:97)
<asynchronous suspension>
 |
2026-08-13 21:59:52.701099 | severe   | DriftBackupNotifier  | Upload failed for D0FA0E3B-3697-48CC-B6D5-54A81EC2754B/L0/001: PathNotFoundException: Cannot retrieve length of file, path = '/private/var/mobile/Containers/Data/Application/A94B94ED-914B-47BB-85CE-B000F380AE76/tmp/.image/D0FA0E3B-3697-48CC-B6D5-54A81EC2754B_L0_001_1786577639.543923_o_IMG_9450.HEIC' (OS Error: No such file or directory, errno = 2) |
2026-08-13 21:59:52.701098 | severe   | ForegroundUploadService | Error(null) uploading D0FA0E3B-3697-48CC-B6D5-54A81EC2754B/L0/001 | IMG_9450.HEIC | Created on 2026-08-12 23:32:31.000Z | PathNotFoundException: Cannot retrieve length of file, path = '/private/var/mobile/Containers/Data/Application/A94B94ED-914B-47BB-85CE-B000F380AE76/tmp/.image/D0FA0E3B-3697-48CC-B6D5-54A81EC2754B_L0_001_1786577639.543923_o_IMG_9450.HEIC' (OS Error: No such file or directory, errno = 2) |
2026-08-13 21:59:52.701095 | warning  | UploadRepository     | Error uploading asset[D0FA0E3B-3697-48CC-B6D5-54A81EC2754B/L0/001]: PathNotFoundException: Cannot retrieve length of file, path = '/private/var/mobile/Containers/Data/Application/A94B94ED-914B-47BB-85CE-B000F380AE76/tmp/.image/D0FA0E3B-3697-48CC-B6D5-54A81EC2754B_L0_001_1786577639.543923_o_IMG_9450.HEIC' (OS Error: No such file or directory, errno = 2): #0      _File.throwIfError (dart:io/file_impl.dart:779)
#1      _File.lengthSync (dart:io/file_impl.dart:457)
#2      UploadRepository.uploadFile (package:immich_mobile/repositories/upload.repository.dart:109)
#3      ForegroundUploadService.uploadSingleAsset (package:immich_mobile/services/foreground_upload.service.dart:372)
<asynchronous suspension>
#4      ForegroundUploadService._executeWithWorkerPool.worker (package:immich_mobile/services/foreground_upload.service.dart:225)
<asynchronous suspension>
#5      Future.wait.<anonymous closure> (dart:async/future.dart:546)
<asynchronous suspension>
#6      ForegroundUploadService._executeWithWorkerPool (package:immich_mobile/services/foreground_upload.service.dart:234)
<asynchronous suspension>
#7      ForegroundUploadService.uploadCandidates (package:immich_mobile/services/foreground_upload.service.dart:97)
<asynchronous suspension>
 |
2026-08-13 21:59:52.698811 | severe   | ForegroundUploadService | ERROR deleting file: PathNotFoundException: Cannot delete file, path = '/private/var/mobile/Containers/Data/Application/A94B94ED-914B-47BB-85CE-B000F380AE76/tmp/.image/5312F821-AC2F-40DA-A662-4AC7F42411C7_L0_001_1786570262.167953_o_IMG_9449.HEIC' (OS Error: No such file or directory, errno = 2) | #0      _checkForErrorResponse (dart:io/common.dart:58)
#1      _File._delete.<anonymous closure> (dart:io/file_impl.dart:349)
<asynchronous suspension>
#2      ForegroundUploadService.uploadSingleAsset (package:immich_mobile/services/foreground_upload.service.dart:406)
<asynchronous suspension>
#3      ForegroundUploadService._executeWithWorkerPool.worker (package:immich_mobile/services/foreground_upload.service.dart:225)
<asynchronous suspension>
#4      Future.wait.<anonymous closure> (dart:async/future.dart:546)
<asynchronous suspension>
#5      ForegroundUploadService._executeWithWorkerPool (package:immich_mobile/services/foreground_upload.service.dart:234)
<asynchronous suspension>
#6      ForegroundUploadService.uploadCandidates (package:immich_mobile/services/foreground_upload.service.dart:97)
<asynchronous suspension>
 |
2026-08-13 21:59:52.698658 | severe   | DriftBackupNotifier  | Upload failed for 5312F821-AC2F-40DA-A662-4AC7F42411C7/L0/001: PathNotFoundException: Cannot retrieve length of file, path = '/private/var/mobile/Containers/Data/Application/A94B94ED-914B-47BB-85CE-B000F380AE76/tmp/.image/5312F821-AC2F-40DA-A662-4AC7F42411C7_L0_001_1786570262.167953_o_IMG_9449.HEIC' (OS Error: No such file or directory, errno = 2) |
2026-08-13 21:59:52.698657 | severe   | ForegroundUploadService | Error(null) uploading 5312F821-AC2F-40DA-A662-4AC7F42411C7/L0/001 | IMG_9449.HEIC | Created on 2026-08-12 19:38:49.000Z | PathNotFoundException: Cannot retrieve length of file, path = '/private/var/mobile/Containers/Data/Application/A94B94ED-914B-47BB-85CE-B000F380AE76/tmp/.image/5312F821-AC2F-40DA-A662-4AC7F42411C7_L0_001_1786570262.167953_o_IMG_9449.HEIC' (OS Error: No such file or directory, errno = 2) |
2026-08-13 21:59:52.698652 | warning  | UploadRepository     | Error uploading asset[5312F821-AC2F-40DA-A662-4AC7F42411C7/L0/001]: PathNotFoundException: Cannot retrieve length of file, path = '/private/var/mobile/Containers/Data/Application/A94B94ED-914B-47BB-85CE-B000F380AE76/tmp/.image/5312F821-AC2F-40DA-A662-4AC7F42411C7_L0_001_1786570262.167953_o_IMG_9449.HEIC' (OS Error: No such file or directory, errno = 2): #0      _File.throwIfError (dart:io/file_impl.dart:779)
#1      _File.lengthSync (dart:io/file_impl.dart:457)
#2      UploadRepository.uploadFile (package:immich_mobile/repositories/upload.repository.dart:109)
#3      ForegroundUploadService.uploadSingleAsset (package:immich_mobile/services/foreground_upload.service.dart:372)
<asynchronous suspension>
#4      ForegroundUploadService._executeWithWorkerPool.worker (package:immich_mobile/services/foreground_upload.service.dart:225)
<asynchronous suspension>
#5      Future.wait.<anonymous closure> (dart:async/future.dart:546)
<asynchronous suspension>
#6      ForegroundUploadService._executeWithWorkerPool (package:immich_mobile/services/foreground_upload.service.dart:234)
<asynchronous suspension>
#7      ForegroundUploadService.uploadCandidates (package:immich_mobile/services/foreground_upload.service.dart:97)
<asynchronous suspension>
 |
2026-08-13 21:59:52.695387 | warning  | ForegroundUploadService | Backup was cancelled by the user |
2026-08-13 21:59:52.695385 | warning  | UploadRepository     | Upload asset[D0FA0E3B-3697-48CC-B6D5-54A81EC2754B/L0/001] was cancelled |
2026-08-13 21:59:52.691223 | warning  | ForegroundUploadService | Backup was cancelled by the user |
2026-08-13 21:59:52.691217 | warning  | UploadRepository     | Upload asset[DF9CD309-AB4B-4BDC-885C-7908B0598DC1/L0/001] was cancelled |
2026-08-13 21:59:52.689032 | warning  | ForegroundUploadService | Backup was c