Error while gettings remote assets - cannot fetch assets on mobile app #5256

Closed
opened 2026-02-20 03:16:39 -05:00 by deekerman · 2 comments
Owner

Originally created by @jairgs on GitHub (Mar 30, 2025).

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

  • Yes

The bug

Timeline gets partially build, then errors out.

Message: Error while getting remote assets
Details: Null check operator used on a null value
From: AssetService
Stacktrace:

#0 AssetResponseDto.fromJson (package:openapi/model/asset_response_dto.dart:291)
#1 ApiClient.fromJson (package:openapi/api_client.dart:264)
#2 ApiClient.fromJson. (package:openapi/api_client.dart:683)
#3 MappedIterable.elementAt (dart:_internal/iterable.dart:402)
#4 ListIterator.moveNext (dart:_internal/iterable.dart:371)
#5 new _List._ofEfficientLengthIterable (dart:core-patch/array.dart:166)
#6 new _List.of (dart:core-patch/array.dart:130)
#7 new List.of (dart:core-patch/array_patch.dart:40)
#8 ListIterable.toList (dart:_internal/iterable.dart:224)
#9 ApiClient.fromJson (package:openapi/api_client.dart:684)
#10 ApiClient.deserialize (package:openapi/api_client.dart:158)

#11 SyncApi.getFullSyncForUser (package:openapi/api/sync_api.dart:147)

#12 AssetService._getRemoteAssets (package:immich_mobile/services/asset.service.dart:149)

#13 SyncService._syncRemoteAssetsForUser (package:immich_mobile/services/sync.service.dart:291)

#14 SyncService._syncRemoteAssetsFull (package:immich_mobile/services/sync.service.dart:281)

#15 SyncService.syncRemoteAssetsToDb. (package:immich_mobile/services/sync.service.dart:110)

#16 AssetService.refreshRemoteAssets (package:immich_mobile/services/asset.service.dart:90)

#17 AssetNotifier.getAllAsset (package:immich_mobile/providers/asset.provider.dart:68)

#18 AppLifeCycleNotifier.handleAppResume (package:immich_mobile/providers/app_life_cycle.provider.dart:71)

The OS that Immich Server is running on

Debian 12 bookworm (truenas scale)

Version of Immich Server

1.130.3

Version of Immich Mobile App

1.130.3 build.191

Platform with the issue

  • Server
  • Web
  • Mobile

Your docker-compose.yml content

{
    "configs": {
        "permissions_actions_data": {
            "content": "[{\"mount_path\": \"/mnt/permission/pgvecto_postgres_data\", \"is_temporary\": false, \"identifier\": \"pgvecto_postgres_data\", \"recursive\": false, \"mode\": \"check\", \"uid\": 999, \"gid\": 999, \"chmod\": null}, {\"mount_path\": \"/mnt/permission/redis_redis_data\", \"is_temporary\": true, \"identifier\": \"redis_redis_data\", \"recursive\": true, \"mode\": \"check\", \"uid\": 1001, \"gid\": 0, \"chmod\": null}]"
        },
        "permissions_run_script": {
            "content": "#!/usr/bin/env python3\n\nimport os\nimport json\nimport time\nimport shutil\n\nwith open(\"/script/actions.json\", \"r\") as f:\n    actions_data = json.load(f)\n\nif not actions_data:\n    # If this script is called, there should be actions data\n    raise ValueError(\"No actions data found\")\n\ndef fix_perms(path, chmod, recursive=False):\n    print(f\"Changing permissions{\u0027 recursively \u0027 if recursive else \u0027 \u0027}to {chmod} on: [{path}]\")\n    os.chmod(path, int(chmod, 8))\n    if recursive:\n        for root, dirs, files in os.walk(path):\n            for f in files:\n                os.chmod(os.path.join(root, f), int(chmod, 8))\n    print(\"Permissions after changes:\")\n    print_chmod_stat()\n\ndef fix_owner(path, uid, gid, recursive=False):\n    print(f\"Changing ownership{\u0027 recursively \u0027 if recursive else \u0027 \u0027}to {uid}:{gid} on: [{path}]\")\n    os.chown(path, uid, gid)\n    if recursive:\n        for root, dirs, files in os.walk(path):\n            for f in files:\n                os.chown(os.path.join(root, f), uid, gid)\n    print(\"Ownership after changes:\")\n    print_chown_stat()\n\ndef print_chown_stat():\n    curr_stat = os.stat(action[\"mount_path\"])\n    print(f\"Ownership: [{curr_stat.st_uid}:{curr_stat.st_gid}]\")\n\ndef print_chmod_stat():\n    curr_stat = os.stat(action[\"mount_path\"])\n    print(f\"Permissions: [{oct(curr_stat.st_mode)[3:]}]\")\n\ndef print_chown_diff(curr_stat, uid, gid):\n    print(f\"Ownership: wanted [{uid}:{gid}], got [{curr_stat.st_uid}:{curr_stat.st_gid}].\")\n\ndef print_chmod_diff(curr_stat, mode):\n    print(f\"Permissions: wanted [{mode}], got [{oct(curr_stat.st_mode)[3:]}].\")\n\ndef perform_action(action):\n    start_time = time.time()\n    print(f\"=== Applying configuration on volume with identifier [{action[\u0027identifier\u0027]}] ===\")\n\n    if not os.path.isdir(action[\"mount_path\"]):\n        print(f\"Path [{action[\u0027mount_path\u0027]}] is not a directory, skipping...\")\n        return\n\n    if action[\"is_temporary\"]:\n        print(f\"Path [{action[\u0027mount_path\u0027]}] is a temporary directory, ensuring it is empty...\")\n        for item in os.listdir(action[\"mount_path\"]):\n            item_path = os.path.join(action[\"mount_path\"], item)\n\n            # Exclude the safe directory, where we can use to mount files temporarily\n            if os.path.basename(item_path) == \"ix-safe\":\n                continue\n            if os.path.isdir(item_path):\n                shutil.rmtree(item_path)\n            else:\n                os.remove(item_path)\n\n    if not action[\"is_temporary\"] and os.listdir(action[\"mount_path\"]):\n        print(f\"Path [{action[\u0027mount_path\u0027]}] is not empty, skipping...\")\n        return\n\n    print(f\"Current Ownership and Permissions on [{action[\u0027mount_path\u0027]}]:\")\n    curr_stat = os.stat(action[\"mount_path\"])\n    print_chown_diff(curr_stat, action[\"uid\"], action[\"gid\"])\n    print_chmod_diff(curr_stat, action[\"chmod\"])\n    print(\"---\")\n\n    if action[\"mode\"] == \"always\":\n        fix_owner(action[\"mount_path\"], action[\"uid\"], action[\"gid\"], action[\"recursive\"])\n        if not action[\"chmod\"]:\n            print(\"Skipping permissions check, chmod is falsy\")\n        else:\n            fix_perms(action[\"mount_path\"], action[\"chmod\"], action[\"recursive\"])\n        return\n\n    elif action[\"mode\"] == \"check\":\n        if curr_stat.st_uid != action[\"uid\"] or curr_stat.st_gid != action[\"gid\"]:\n            print(\"Ownership is incorrect. Fixing...\")\n            fix_owner(action[\"mount_path\"], action[\"uid\"], action[\"gid\"], action[\"recursive\"])\n        else:\n            print(\"Ownership is correct. Skipping...\")\n\n        if not action[\"chmod\"]:\n            print(\"Skipping permissions check, chmod is falsy\")\n        else:\n            if oct(curr_stat.st_mode)[3:] != action[\"chmod\"]:\n                print(\"Permissions are incorrect. Fixing...\")\n                fix_perms(action[\"mount_path\"], action[\"chmod\"], action[\"recursive\"])\n            else:\n                print(\"Permissions are correct. Skipping...\")\n\n    print(f\"Time taken: {(time.time() - start_time) * 1000:.2f}ms\")\n    print(f\"=== Finished applying configuration on volume with identifier [{action[\u0027identifier\u0027]}] ==\")\n    print()\n\nif __name__ == \"__main__\":\n    start_time = time.time()\n    for action in actions_data:\n        perform_action(action)\n    print(f\"Total time taken: {(time.time() - start_time) * 1000:.2f}ms\")\n"
        }
    },
    "services": {
        "machine-learning": {
            "cap_drop": [
                "ALL"
            ],
            "depends_on": {
                "permissions": {
                    "condition": "service_completed_successfully"
                }
            },
            "deploy": {
                "resources": {
                    "limits": {
                        "cpus": "4",
                        "memory": "10000M"
                    }
                }
            },
            "environment": {
                "IMMICH_LOG_LEVEL": "log",
                "IMMICH_PORT": "32002",
                "MACHINE_LEARNING_CACHE_FOLDER": "/mlcache",
                "NODE_ENV": "production",
                "NVIDIA_VISIBLE_DEVICES": "void",
                "TRANSFORMERS_CACHE": "/mlcache",
                "TZ": "America/Mexico_City",
                "UMASK": "002",
                "UMASK_SET": "002"
            },
            "group_add": [
                568
            ],
            "healthcheck": {
                "interval": "10s",
                "retries": 30,
                "start_period": "10s",
                "test": "python3 /usr/src/app/healthcheck.py",
                "timeout": "5s"
            },
            "image": "ghcr.io/immich-app/immich-machine-learning:v1.130.3",
            "platform": "linux/amd64",
            "privileged": false,
            "restart": "unless-stopped",
            "security_opt": [
                "no-new-privileges=true"
            ],
            "stdin_open": false,
            "tty": false,
            "volumes": [
                {
                    "read_only": false,
                    "target": "/mlcache",
                    "type": "volume",
                    "volume": {
                        "nocopy": false
                    }
                }
            ]
        },
        "permissions": {
            "cap_add": [
                "CHOWN",
                "DAC_OVERRIDE",
                "FOWNER"
            ],
            "cap_drop": [
                "ALL"
            ],
            "configs": [
                {
                    "mode": 320,
                    "source": "permissions_actions_data",
                    "target": "/script/actions.json"
                },
                {
                    "mode": 448,
                    "source": "permissions_run_script",
                    "target": "/script/run.py"
                }
            ],
            "deploy": {
                "resources": {
                    "limits": {
                        "cpus": "2",
                        "memory": "1024M"
                    }
                }
            },
            "entrypoint": [
                "python3",
                "/script/run.py"
            ],
            "environment": {
                "NVIDIA_VISIBLE_DEVICES": "void",
                "TZ": "America/Mexico_City",
                "UMASK": "002",
                "UMASK_SET": "002"
            },
            "group_add": [
                568
            ],
            "healthcheck": {
                "disable": true
            },
            "image": "python:3.13.0-slim-bookworm",
            "network_mode": "none",
            "platform": "linux/amd64",
            "privileged": false,
            "restart": "on-failure:1",
            "security_opt": [
                "no-new-privileges=true"
            ],
            "stdin_open": false,
            "tty": false,
            "user": "0:0",
            "volumes": [
                {
                    "bind": {
                        "create_host_path": false,
                        "propagation": "rprivate"
                    },
                    "read_only": false,
                    "source": "/mnt/mypool/immich/pgData",
                    "target": "/mnt/permission/pgvecto_postgres_data",
                    "type": "bind"
                },
                {
                    "read_only": false,
                    "source": "redis-data",
                    "target": "/mnt/permission/redis_redis_data",
                    "type": "volume",
                    "volume": {
                        "nocopy": false
                    }
                }
            ]
        },
        "pgvecto": {
            "cap_drop": [
                "ALL"
            ],
            "depends_on": {
                "permissions": {
                    "condition": "service_completed_successfully"
                }
            },
            "deploy": {
                "resources": {
                    "limits": {
                        "cpus": "4",
                        "memory": "10000M"
                    }
                }
            },
            "environment": {
                "NVIDIA_VISIBLE_DEVICES": "void",
                "POSTGRES_DB": "immich",
                "POSTGRES_PASSWORD": "###",
                "POSTGRES_PORT": "5432",
                "POSTGRES_USER": "immich",
                "TZ": "America/Mexico_City",
                "UMASK": "002",
                "UMASK_SET": "002"
            },
            "group_add": [
                568
            ],
            "healthcheck": {
                "interval": "10s",
                "retries": 30,
                "start_period": "10s",
                "test": "pg_isready -h 127.0.0.1 -p 5432 -U $$POSTGRES_USER -d $$POSTGRES_DB",
                "timeout": "5s"
            },
            "image": "tensorchord/pgvecto-rs:pg15-v0.2.0",
            "platform": "linux/amd64",
            "privileged": false,
            "restart": "unless-stopped",
            "security_opt": [
                "no-new-privileges=true"
            ],
            "stdin_open": false,
            "tty": false,
            "user": "999:999",
            "volumes": [
                {
                    "bind": {
                        "create_host_path": false,
                        "propagation": "rprivate"
                    },
                    "read_only": false,
                    "source": "/mnt/mypool/immich/pgData",
                    "target": "/var/lib/postgresql/data",
                    "type": "bind"
                }
            ]
        },
        "redis": {
            "cap_drop": [
                "ALL"
            ],
            "depends_on": {
                "permissions": {
                    "condition": "service_completed_successfully"
                }
            },
            "deploy": {
                "resources": {
                    "limits": {
                        "cpus": "4",
                        "memory": "10000M"
                    }
                }
            },
            "environment": {
                "ALLOW_EMPTY_PASSWORD": "no",
                "NVIDIA_VISIBLE_DEVICES": "void",
                "REDIS_PASSWORD": "###",
                "REDIS_PORT_NUMBER": "6379",
                "TZ": "America/Mexico_City",
                "UMASK": "002",
                "UMASK_SET": "002"
            },
            "group_add": [
                568
            ],
            "healthcheck": {
                "interval": "10s",
                "retries": 30,
                "start_period": "10s",
                "test": "redis-cli -h 127.0.0.1 -p 6379 -a $$REDIS_PASSWORD ping | grep -q PONG",
                "timeout": "5s"
            },
            "image": "bitnami/redis:7.4.2",
            "platform": "linux/amd64",
            "privileged": false,
            "restart": "unless-stopped",
            "security_opt": [
                "no-new-privileges=true"
            ],
            "stdin_open": false,
            "tty": false,
            "user": "1001:0",
            "volumes": [
                {
                    "read_only": false,
                    "source": "redis-data",
                    "target": "/bitnami/redis/data",
                    "type": "volume",
                    "volume": {
                        "nocopy": false
                    }
                }
            ]
        },
        "server": {
            "cap_drop": [
                "ALL"
            ],
            "depends_on": {
                "machine-learning": {
                    "condition": "service_healthy"
                },
                "permissions": {
                    "condition": "service_completed_successfully"
                },
                "pgvecto": {
                    "condition": "service_healthy"
                },
                "redis": {
                    "condition": "service_healthy"
                }
            },
            "deploy": {
                "resources": {
                    "limits": {
                        "cpus": "4",
                        "memory": "10000M"
                    }
                }
            },
            "environment": {
                "DB_DATABASE_NAME": "immich",
                "DB_HOSTNAME": "pgvecto",
                "DB_PASSWORD": "###",
                "DB_PORT": "5432",
                "DB_USERNAME": "immich",
                "IMMICH_LOG_LEVEL": "log",
                "IMMICH_MACHINE_LEARNING_ENABLED": "true",
                "IMMICH_MACHINE_LEARNING_URL": "http://machine-learning:32002",
                "IMMICH_PORT": "30041",
                "NODE_ENV": "production",
                "NVIDIA_VISIBLE_DEVICES": "void",
                "REDIS_DBINDEX": "0",
                "REDIS_HOSTNAME": "redis",
                "REDIS_PASSWORD": "###",
                "REDIS_PORT": "6379",
                "TZ": "America/Mexico_City",
                "UMASK": "002",
                "UMASK_SET": "002"
            },
            "group_add": [
                568
            ],
            "healthcheck": {
                "interval": "10s",
                "retries": 30,
                "start_period": "10s",
                "test": "/usr/src/app/bin/immich-healthcheck",
                "timeout": "5s"
            },
            "image": "ghcr.io/immich-app/immich-server:v1.130.3",
            "platform": "linux/amd64",
            "ports": [
                {
                    "mode": "ingress",
                    "protocol": "tcp",
                    "published": 30041,
                    "target": 30041
                }
            ],
            "privileged": false,
            "restart": "unless-stopped",
            "security_opt": [
                "no-new-privileges=true"
            ],
            "stdin_open": false,
            "tty": false,
            "volumes": [
                {
                    "bind": {
                        "create_host_path": false,
                        "propagation": "rprivate"
                    },
                    "read_only": true,
                    "source": "/mnt/mypool/storage/Photos",
                    "target": "/usr/src/app/external/photos",
                    "type": "bind"
                },
                {
                    "bind": {
                        "create_host_path": false,
                        "propagation": "rprivate"
                    },
                    "read_only": true,
                    "source": "/mnt/mypool/storage/Videos",
                    "target": "/usr/src/app/external/videos",
                    "type": "bind"
                },
                {
                    "bind": {
                        "create_host_path": false,
                        "propagation": "rprivate"
                    },
                    "read_only": false,
                    "source": "/mnt/mypool/immich/backups",
                    "target": "/usr/src/app/upload/backups",
                    "type": "bind"
                },
                {
                    "bind": {
                        "create_host_path": false,
                        "propagation": "rprivate"
                    },
                    "read_only": false,
                    "source": "/mnt/mypool/immich/video",
                    "target": "/usr/src/app/upload/encoded-video",
                    "type": "bind"
                },
                {
                    "bind": {
                        "create_host_path": false,
                        "propagation": "rprivate"
                    },
                    "read_only": false,
                    "source": "/mnt/mypool/immich/library",
                    "target": "/usr/src/app/upload/library",
                    "type": "bind"
                },
                {
                    "bind": {
                        "create_host_path": false,
                        "propagation": "rprivate"
                    },
                    "read_only": false,
                    "source": "/mnt/mypool/immich/profile",
                    "target": "/usr/src/app/upload/profile",
                    "type": "bind"
                },
                {
                    "bind": {
                        "create_host_path": false,
                        "propagation": "rprivate"
                    },
                    "read_only": false,
                    "source": "/mnt/mypool/immich/thumbs",
                    "target": "/usr/src/app/upload/thumbs",
                    "type": "bind"
                },
                {
                    "bind": {
                        "create_host_path": false,
                        "propagation": "rprivate"
                    },
                    "read_only": false,
                    "source": "/mnt/mypool/immich/uploads",
                    "target": "/usr/src/app/upload/upload",
                    "type": "bind"
                }
            ]
        }
    },
    "volumes": {
        "redis-data": {}
    },
    "x-notes": "# Immich\n\n## Bug Reports and Feature Requests\n\nIf you find a bug in this app or have an idea for a new feature, please file an issue at\nhttps://github.com/truenas/apps\n\n",
    "x-portals": [
        {
            "host": "0.0.0.0",
            "name": "Web UI",
            "path": "/",
            "port": 30041,
            "scheme": "http"
        }
    ]
}

Your .env content

..

Reproduction steps

1.Open mobile app
2.Timeline not complete
3.Check logs
...

Relevant log output


Additional information

No response

Originally created by @jairgs on GitHub (Mar 30, 2025). ### I have searched the existing issues, both open and closed, to make sure this is not a duplicate report. - [x] Yes ### The bug Timeline gets partially build, then errors out. Message: Error while getting remote assets Details: Null check operator used on a null value From: AssetService Stacktrace: #0 AssetResponseDto.fromJson (package:openapi/model/asset_response_dto.dart:291) #1 ApiClient.fromJson (package:openapi/api_client.dart:264) #2 ApiClient.fromJson.<anonymous closure> (package:openapi/api_client.dart:683) #3 MappedIterable.elementAt (dart:_internal/iterable.dart:402) #4 ListIterator.moveNext (dart:_internal/iterable.dart:371) #5 new _List._ofEfficientLengthIterable (dart:core-patch/array.dart:166) #6 new _List.of (dart:core-patch/array.dart:130) #7 new List.of (dart:core-patch/array_patch.dart:40) #8 ListIterable.toList (dart:_internal/iterable.dart:224) #9 ApiClient.fromJson (package:openapi/api_client.dart:684) #10 ApiClient.deserialize (package:openapi/api_client.dart:158) <asynchronous suspension> #11 SyncApi.getFullSyncForUser (package:openapi/api/sync_api.dart:147) <asynchronous suspension> #12 AssetService._getRemoteAssets (package:immich_mobile/services/asset.service.dart:149) <asynchronous suspension> #13 SyncService._syncRemoteAssetsForUser (package:immich_mobile/services/sync.service.dart:291) <asynchronous suspension> #14 SyncService._syncRemoteAssetsFull (package:immich_mobile/services/sync.service.dart:281) <asynchronous suspension> #15 SyncService.syncRemoteAssetsToDb.<anonymous closure> (package:immich_mobile/services/sync.service.dart:110) <asynchronous suspension> #16 AssetService.refreshRemoteAssets (package:immich_mobile/services/asset.service.dart:90) <asynchronous suspension> #17 AssetNotifier.getAllAsset (package:immich_mobile/providers/asset.provider.dart:68) <asynchronous suspension> #18 AppLifeCycleNotifier.handleAppResume (package:immich_mobile/providers/app_life_cycle.provider.dart:71) <asynchronous suspension> ### The OS that Immich Server is running on Debian 12 bookworm (truenas scale) ### Version of Immich Server 1.130.3 ### Version of Immich Mobile App 1.130.3 build.191 ### Platform with the issue - [ ] Server - [ ] Web - [x] Mobile ### Your docker-compose.yml content ```YAML { "configs": { "permissions_actions_data": { "content": "[{\"mount_path\": \"/mnt/permission/pgvecto_postgres_data\", \"is_temporary\": false, \"identifier\": \"pgvecto_postgres_data\", \"recursive\": false, \"mode\": \"check\", \"uid\": 999, \"gid\": 999, \"chmod\": null}, {\"mount_path\": \"/mnt/permission/redis_redis_data\", \"is_temporary\": true, \"identifier\": \"redis_redis_data\", \"recursive\": true, \"mode\": \"check\", \"uid\": 1001, \"gid\": 0, \"chmod\": null}]" }, "permissions_run_script": { "content": "#!/usr/bin/env python3\n\nimport os\nimport json\nimport time\nimport shutil\n\nwith open(\"/script/actions.json\", \"r\") as f:\n actions_data = json.load(f)\n\nif not actions_data:\n # If this script is called, there should be actions data\n raise ValueError(\"No actions data found\")\n\ndef fix_perms(path, chmod, recursive=False):\n print(f\"Changing permissions{\u0027 recursively \u0027 if recursive else \u0027 \u0027}to {chmod} on: [{path}]\")\n os.chmod(path, int(chmod, 8))\n if recursive:\n for root, dirs, files in os.walk(path):\n for f in files:\n os.chmod(os.path.join(root, f), int(chmod, 8))\n print(\"Permissions after changes:\")\n print_chmod_stat()\n\ndef fix_owner(path, uid, gid, recursive=False):\n print(f\"Changing ownership{\u0027 recursively \u0027 if recursive else \u0027 \u0027}to {uid}:{gid} on: [{path}]\")\n os.chown(path, uid, gid)\n if recursive:\n for root, dirs, files in os.walk(path):\n for f in files:\n os.chown(os.path.join(root, f), uid, gid)\n print(\"Ownership after changes:\")\n print_chown_stat()\n\ndef print_chown_stat():\n curr_stat = os.stat(action[\"mount_path\"])\n print(f\"Ownership: [{curr_stat.st_uid}:{curr_stat.st_gid}]\")\n\ndef print_chmod_stat():\n curr_stat = os.stat(action[\"mount_path\"])\n print(f\"Permissions: [{oct(curr_stat.st_mode)[3:]}]\")\n\ndef print_chown_diff(curr_stat, uid, gid):\n print(f\"Ownership: wanted [{uid}:{gid}], got [{curr_stat.st_uid}:{curr_stat.st_gid}].\")\n\ndef print_chmod_diff(curr_stat, mode):\n print(f\"Permissions: wanted [{mode}], got [{oct(curr_stat.st_mode)[3:]}].\")\n\ndef perform_action(action):\n start_time = time.time()\n print(f\"=== Applying configuration on volume with identifier [{action[\u0027identifier\u0027]}] ===\")\n\n if not os.path.isdir(action[\"mount_path\"]):\n print(f\"Path [{action[\u0027mount_path\u0027]}] is not a directory, skipping...\")\n return\n\n if action[\"is_temporary\"]:\n print(f\"Path [{action[\u0027mount_path\u0027]}] is a temporary directory, ensuring it is empty...\")\n for item in os.listdir(action[\"mount_path\"]):\n item_path = os.path.join(action[\"mount_path\"], item)\n\n # Exclude the safe directory, where we can use to mount files temporarily\n if os.path.basename(item_path) == \"ix-safe\":\n continue\n if os.path.isdir(item_path):\n shutil.rmtree(item_path)\n else:\n os.remove(item_path)\n\n if not action[\"is_temporary\"] and os.listdir(action[\"mount_path\"]):\n print(f\"Path [{action[\u0027mount_path\u0027]}] is not empty, skipping...\")\n return\n\n print(f\"Current Ownership and Permissions on [{action[\u0027mount_path\u0027]}]:\")\n curr_stat = os.stat(action[\"mount_path\"])\n print_chown_diff(curr_stat, action[\"uid\"], action[\"gid\"])\n print_chmod_diff(curr_stat, action[\"chmod\"])\n print(\"---\")\n\n if action[\"mode\"] == \"always\":\n fix_owner(action[\"mount_path\"], action[\"uid\"], action[\"gid\"], action[\"recursive\"])\n if not action[\"chmod\"]:\n print(\"Skipping permissions check, chmod is falsy\")\n else:\n fix_perms(action[\"mount_path\"], action[\"chmod\"], action[\"recursive\"])\n return\n\n elif action[\"mode\"] == \"check\":\n if curr_stat.st_uid != action[\"uid\"] or curr_stat.st_gid != action[\"gid\"]:\n print(\"Ownership is incorrect. Fixing...\")\n fix_owner(action[\"mount_path\"], action[\"uid\"], action[\"gid\"], action[\"recursive\"])\n else:\n print(\"Ownership is correct. Skipping...\")\n\n if not action[\"chmod\"]:\n print(\"Skipping permissions check, chmod is falsy\")\n else:\n if oct(curr_stat.st_mode)[3:] != action[\"chmod\"]:\n print(\"Permissions are incorrect. Fixing...\")\n fix_perms(action[\"mount_path\"], action[\"chmod\"], action[\"recursive\"])\n else:\n print(\"Permissions are correct. Skipping...\")\n\n print(f\"Time taken: {(time.time() - start_time) * 1000:.2f}ms\")\n print(f\"=== Finished applying configuration on volume with identifier [{action[\u0027identifier\u0027]}] ==\")\n print()\n\nif __name__ == \"__main__\":\n start_time = time.time()\n for action in actions_data:\n perform_action(action)\n print(f\"Total time taken: {(time.time() - start_time) * 1000:.2f}ms\")\n" } }, "services": { "machine-learning": { "cap_drop": [ "ALL" ], "depends_on": { "permissions": { "condition": "service_completed_successfully" } }, "deploy": { "resources": { "limits": { "cpus": "4", "memory": "10000M" } } }, "environment": { "IMMICH_LOG_LEVEL": "log", "IMMICH_PORT": "32002", "MACHINE_LEARNING_CACHE_FOLDER": "/mlcache", "NODE_ENV": "production", "NVIDIA_VISIBLE_DEVICES": "void", "TRANSFORMERS_CACHE": "/mlcache", "TZ": "America/Mexico_City", "UMASK": "002", "UMASK_SET": "002" }, "group_add": [ 568 ], "healthcheck": { "interval": "10s", "retries": 30, "start_period": "10s", "test": "python3 /usr/src/app/healthcheck.py", "timeout": "5s" }, "image": "ghcr.io/immich-app/immich-machine-learning:v1.130.3", "platform": "linux/amd64", "privileged": false, "restart": "unless-stopped", "security_opt": [ "no-new-privileges=true" ], "stdin_open": false, "tty": false, "volumes": [ { "read_only": false, "target": "/mlcache", "type": "volume", "volume": { "nocopy": false } } ] }, "permissions": { "cap_add": [ "CHOWN", "DAC_OVERRIDE", "FOWNER" ], "cap_drop": [ "ALL" ], "configs": [ { "mode": 320, "source": "permissions_actions_data", "target": "/script/actions.json" }, { "mode": 448, "source": "permissions_run_script", "target": "/script/run.py" } ], "deploy": { "resources": { "limits": { "cpus": "2", "memory": "1024M" } } }, "entrypoint": [ "python3", "/script/run.py" ], "environment": { "NVIDIA_VISIBLE_DEVICES": "void", "TZ": "America/Mexico_City", "UMASK": "002", "UMASK_SET": "002" }, "group_add": [ 568 ], "healthcheck": { "disable": true }, "image": "python:3.13.0-slim-bookworm", "network_mode": "none", "platform": "linux/amd64", "privileged": false, "restart": "on-failure:1", "security_opt": [ "no-new-privileges=true" ], "stdin_open": false, "tty": false, "user": "0:0", "volumes": [ { "bind": { "create_host_path": false, "propagation": "rprivate" }, "read_only": false, "source": "/mnt/mypool/immich/pgData", "target": "/mnt/permission/pgvecto_postgres_data", "type": "bind" }, { "read_only": false, "source": "redis-data", "target": "/mnt/permission/redis_redis_data", "type": "volume", "volume": { "nocopy": false } } ] }, "pgvecto": { "cap_drop": [ "ALL" ], "depends_on": { "permissions": { "condition": "service_completed_successfully" } }, "deploy": { "resources": { "limits": { "cpus": "4", "memory": "10000M" } } }, "environment": { "NVIDIA_VISIBLE_DEVICES": "void", "POSTGRES_DB": "immich", "POSTGRES_PASSWORD": "###", "POSTGRES_PORT": "5432", "POSTGRES_USER": "immich", "TZ": "America/Mexico_City", "UMASK": "002", "UMASK_SET": "002" }, "group_add": [ 568 ], "healthcheck": { "interval": "10s", "retries": 30, "start_period": "10s", "test": "pg_isready -h 127.0.0.1 -p 5432 -U $$POSTGRES_USER -d $$POSTGRES_DB", "timeout": "5s" }, "image": "tensorchord/pgvecto-rs:pg15-v0.2.0", "platform": "linux/amd64", "privileged": false, "restart": "unless-stopped", "security_opt": [ "no-new-privileges=true" ], "stdin_open": false, "tty": false, "user": "999:999", "volumes": [ { "bind": { "create_host_path": false, "propagation": "rprivate" }, "read_only": false, "source": "/mnt/mypool/immich/pgData", "target": "/var/lib/postgresql/data", "type": "bind" } ] }, "redis": { "cap_drop": [ "ALL" ], "depends_on": { "permissions": { "condition": "service_completed_successfully" } }, "deploy": { "resources": { "limits": { "cpus": "4", "memory": "10000M" } } }, "environment": { "ALLOW_EMPTY_PASSWORD": "no", "NVIDIA_VISIBLE_DEVICES": "void", "REDIS_PASSWORD": "###", "REDIS_PORT_NUMBER": "6379", "TZ": "America/Mexico_City", "UMASK": "002", "UMASK_SET": "002" }, "group_add": [ 568 ], "healthcheck": { "interval": "10s", "retries": 30, "start_period": "10s", "test": "redis-cli -h 127.0.0.1 -p 6379 -a $$REDIS_PASSWORD ping | grep -q PONG", "timeout": "5s" }, "image": "bitnami/redis:7.4.2", "platform": "linux/amd64", "privileged": false, "restart": "unless-stopped", "security_opt": [ "no-new-privileges=true" ], "stdin_open": false, "tty": false, "user": "1001:0", "volumes": [ { "read_only": false, "source": "redis-data", "target": "/bitnami/redis/data", "type": "volume", "volume": { "nocopy": false } } ] }, "server": { "cap_drop": [ "ALL" ], "depends_on": { "machine-learning": { "condition": "service_healthy" }, "permissions": { "condition": "service_completed_successfully" }, "pgvecto": { "condition": "service_healthy" }, "redis": { "condition": "service_healthy" } }, "deploy": { "resources": { "limits": { "cpus": "4", "memory": "10000M" } } }, "environment": { "DB_DATABASE_NAME": "immich", "DB_HOSTNAME": "pgvecto", "DB_PASSWORD": "###", "DB_PORT": "5432", "DB_USERNAME": "immich", "IMMICH_LOG_LEVEL": "log", "IMMICH_MACHINE_LEARNING_ENABLED": "true", "IMMICH_MACHINE_LEARNING_URL": "http://machine-learning:32002", "IMMICH_PORT": "30041", "NODE_ENV": "production", "NVIDIA_VISIBLE_DEVICES": "void", "REDIS_DBINDEX": "0", "REDIS_HOSTNAME": "redis", "REDIS_PASSWORD": "###", "REDIS_PORT": "6379", "TZ": "America/Mexico_City", "UMASK": "002", "UMASK_SET": "002" }, "group_add": [ 568 ], "healthcheck": { "interval": "10s", "retries": 30, "start_period": "10s", "test": "/usr/src/app/bin/immich-healthcheck", "timeout": "5s" }, "image": "ghcr.io/immich-app/immich-server:v1.130.3", "platform": "linux/amd64", "ports": [ { "mode": "ingress", "protocol": "tcp", "published": 30041, "target": 30041 } ], "privileged": false, "restart": "unless-stopped", "security_opt": [ "no-new-privileges=true" ], "stdin_open": false, "tty": false, "volumes": [ { "bind": { "create_host_path": false, "propagation": "rprivate" }, "read_only": true, "source": "/mnt/mypool/storage/Photos", "target": "/usr/src/app/external/photos", "type": "bind" }, { "bind": { "create_host_path": false, "propagation": "rprivate" }, "read_only": true, "source": "/mnt/mypool/storage/Videos", "target": "/usr/src/app/external/videos", "type": "bind" }, { "bind": { "create_host_path": false, "propagation": "rprivate" }, "read_only": false, "source": "/mnt/mypool/immich/backups", "target": "/usr/src/app/upload/backups", "type": "bind" }, { "bind": { "create_host_path": false, "propagation": "rprivate" }, "read_only": false, "source": "/mnt/mypool/immich/video", "target": "/usr/src/app/upload/encoded-video", "type": "bind" }, { "bind": { "create_host_path": false, "propagation": "rprivate" }, "read_only": false, "source": "/mnt/mypool/immich/library", "target": "/usr/src/app/upload/library", "type": "bind" }, { "bind": { "create_host_path": false, "propagation": "rprivate" }, "read_only": false, "source": "/mnt/mypool/immich/profile", "target": "/usr/src/app/upload/profile", "type": "bind" }, { "bind": { "create_host_path": false, "propagation": "rprivate" }, "read_only": false, "source": "/mnt/mypool/immich/thumbs", "target": "/usr/src/app/upload/thumbs", "type": "bind" }, { "bind": { "create_host_path": false, "propagation": "rprivate" }, "read_only": false, "source": "/mnt/mypool/immich/uploads", "target": "/usr/src/app/upload/upload", "type": "bind" } ] } }, "volumes": { "redis-data": {} }, "x-notes": "# Immich\n\n## Bug Reports and Feature Requests\n\nIf you find a bug in this app or have an idea for a new feature, please file an issue at\nhttps://github.com/truenas/apps\n\n", "x-portals": [ { "host": "0.0.0.0", "name": "Web UI", "path": "/", "port": 30041, "scheme": "http" } ] } ``` ### Your .env content ```Shell .. ``` ### Reproduction steps 1.Open mobile app 2.Timeline not complete 3.Check logs ... ### Relevant log output ```shell ``` ### Additional information _No response_
Author
Owner

@alextran1502 commented on GitHub (Mar 30, 2025):

Hello, can you help follow the steps in this post to fix the issue?

https://github.com/immich-app/immich/issues/16046#issuecomment-2764126232

The reason is that there are corrupted assets in your library, which are likely corrupted videos, and the server has a bug that prevents it from handling those corrupt files well, so the mobile app errors out.

Please let me know if you need additional assistant

@alextran1502 commented on GitHub (Mar 30, 2025): Hello, can you help follow the steps in this post to fix the issue? https://github.com/immich-app/immich/issues/16046#issuecomment-2764126232 The reason is that there are corrupted assets in your library, which are likely corrupted videos, and the server has a bug that prevents it from handling those corrupt files well, so the mobile app errors out. Please let me know if you need additional assistant
Author
Owner

@jairgs commented on GitHub (Mar 31, 2025):

Thanks, that fixed the problem for me.

On Sun, Mar 30, 2025, 20:39 Alex @.***> wrote:

Hello, can you help follow the steps in this post to fix the issue?

#16046 (comment)
https://github.com/immich-app/immich/issues/16046#issuecomment-2764126232

The reason is that there are corrupted assets in your library, which are
likely corrupted videos, and the server has a bug that prevents it from
handling those corrupt files well, so the mobile app errors out.

Please let me know if you need additional assistant


Reply to this email directly, view it on GitHub
https://github.com/immich-app/immich/issues/17249#issuecomment-2764959178,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ACMBXYC44FV547GJU6K5UHT2XCTGNAVCNFSM6AAAAAB2DDNM66VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDONRUHE2TSMJXHA
.
You are receiving this because you authored the thread.Message ID:
@.***>
[image: alextran1502]alextran1502 left a comment
(immich-app/immich#17249)
https://github.com/immich-app/immich/issues/17249#issuecomment-2764959178

Hello, can you help follow the steps in this post to fix the issue?

#16046 (comment)
https://github.com/immich-app/immich/issues/16046#issuecomment-2764126232

The reason is that there are corrupted assets in your library, which are
likely corrupted videos, and the server has a bug that prevents it from
handling those corrupt files well, so the mobile app errors out.

Please let me know if you need additional assistant


Reply to this email directly, view it on GitHub
https://github.com/immich-app/immich/issues/17249#issuecomment-2764959178,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ACMBXYC44FV547GJU6K5UHT2XCTGNAVCNFSM6AAAAAB2DDNM66VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDONRUHE2TSMJXHA
.
You are receiving this because you authored the thread.Message ID:
@.***>

@jairgs commented on GitHub (Mar 31, 2025): Thanks, that fixed the problem for me. On Sun, Mar 30, 2025, 20:39 Alex ***@***.***> wrote: > Hello, can you help follow the steps in this post to fix the issue? > > #16046 (comment) > <https://github.com/immich-app/immich/issues/16046#issuecomment-2764126232> > > The reason is that there are corrupted assets in your library, which are > likely corrupted videos, and the server has a bug that prevents it from > handling those corrupt files well, so the mobile app errors out. > > Please let me know if you need additional assistant > > — > Reply to this email directly, view it on GitHub > <https://github.com/immich-app/immich/issues/17249#issuecomment-2764959178>, > or unsubscribe > <https://github.com/notifications/unsubscribe-auth/ACMBXYC44FV547GJU6K5UHT2XCTGNAVCNFSM6AAAAAB2DDNM66VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDONRUHE2TSMJXHA> > . > You are receiving this because you authored the thread.Message ID: > ***@***.***> > [image: alextran1502]*alextran1502* left a comment > (immich-app/immich#17249) > <https://github.com/immich-app/immich/issues/17249#issuecomment-2764959178> > > Hello, can you help follow the steps in this post to fix the issue? > > #16046 (comment) > <https://github.com/immich-app/immich/issues/16046#issuecomment-2764126232> > > The reason is that there are corrupted assets in your library, which are > likely corrupted videos, and the server has a bug that prevents it from > handling those corrupt files well, so the mobile app errors out. > > Please let me know if you need additional assistant > > — > Reply to this email directly, view it on GitHub > <https://github.com/immich-app/immich/issues/17249#issuecomment-2764959178>, > or unsubscribe > <https://github.com/notifications/unsubscribe-auth/ACMBXYC44FV547GJU6K5UHT2XCTGNAVCNFSM6AAAAAB2DDNM66VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDONRUHE2TSMJXHA> > . > You are receiving this because you authored the thread.Message ID: > ***@***.***> >
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#5256
No description provided.