Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iOS App no longer refreshing photos after removing offline files #9412

Closed
1 of 3 tasks
pjft opened this issue May 12, 2024 · 6 comments · Fixed by #9479
Closed
1 of 3 tasks

iOS App no longer refreshing photos after removing offline files #9412

pjft opened this issue May 12, 2024 · 6 comments · Fixed by #9479

Comments

@pjft
Copy link

pjft commented May 12, 2024

The bug

I open the iOS app but it no longer refreshes photos since this afternoon. The only thing that happened today was that I was curating some of my photos, deleting some from my external library and then deleted offline files. Also rotated a few and refreshed thumbnails and metadata.

The error messages are the following, on the iOS front:

PlatformDispatcher - Catch all

type '_Map<String, dynamic>' is not a subtype of type 'String' in type cast

From 
ImmichErrorLogger

Stack trace

#0 _CastListBase.[] (dart:_internal/cast.dart:99) 
#1 ListBase.toList (dart:collection/list.dart:225) 
#2 AuditDeletesResponseDto.fromJson (package:openapi/model/audit_deletes_response_dto.dart:54) 
#3 ApiClient.fromJson (package:openapi/api_client.dart:262) 
#4 ApiClient.deserialize (package:openapi/api_client.dart:158) <asynchronous suspension> 
#5 AuditApi.getAuditDeletes (package:openapi/api/audit_api.dart:74) <asynchronous suspension> 
#6 AssetService._getRemoteAssetChanges (package:immich_mobile/shared/services/asset.service.dart:57) <asynchronous suspension> 
#7 SyncService._syncRemoteAssetChanges (package:immich_mobile/shared/services/sync.service.dart:161) <asynchronous suspension> 
#8 SyncService.syncRemoteAssetsToDb.<anonymous closure> (package:immich_mobile/shared/services/sync.service.dart:53) <asynchronous suspension> 
#9 AssetService.refreshRemoteAssets (package:immich_mobile/shared/services/asset.service.dart:45) <asynchronous suspension> 
#10 AssetNotifier.getAllAsset (package:immich_mobile/shared/providers/asset.provider.dart:52) <asynchronous suspension> 
#11 HomePage.build.refreshAssets (package:immich_mobile/modules/home/views/home_page.dart:87) <asynchronous suspension> 
#12 MultiselectGrid.build.wrapLongRunningFun.<anonymous closure> (package:immich_mobile/shared/ui/asset_grid/multiselect_grid.dart:415) <asynchronous suspension> 
#13 RefreshIndicatorState._show.<anonymous closure>.<anonymous closure> (package:flutter/src/material/refresh_indicator.dart:508) <asynchronous suspension>

The current workaround is to sign out and sign back in again to regenerate the library.

The OS that Immich Server is running on

Raspberry Pi OS

Version of Immich Server

1.103.1

Version of Immich Mobile App

1.103.0 build.155

Platform with the issue

  • Server
  • Web
  • Mobile

Your docker-compose.yml content

#
# 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
      - ${EXTERNAL_PATH}:/usr/src/app/external
    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: # uncomment this section for hardware acceleration - see https://immich.app/docs/features/hardware-transcoding
    #   file: hwaccel.transcoding.yml
    #   service: cpu # set to one of [nvenc, quicksync, rkmpp, vaapi, vaapi-wsl] for accelerated transcoding
    command: ['start.sh', 'microservices']
    volumes:
      - ${UPLOAD_LOCATION}:/usr/src/app/upload
      - /etc/localtime:/etc/localtime:ro
      - ${EXTERNAL_PATH}:/usr/src/app/external
    env_file:
      - .env
    depends_on:
      - redis
      - database
    restart: always

  immich-machine-learning:
    container_name: immich_machine_learning
    # For hardware acceleration, add one of -[armnn, cuda, openvino] 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://immich.app/docs/features/ml-hardware-acceleration
    #   file: hwaccel.ml.yml
    #   service: cpu # set to one of [armnn, cuda, openvino, openvino-wsl] for accelerated inference - use the `-wsl` version for WSL2 where applicable
    volumes:
      - model-cache:/cache
    env_file:
      - .env
    restart: always

  redis:
    container_name: immich_redis
    image: registry.hub.docker.com/library/redis:6.2-alpine@sha256:84882e87b54734154586e5f8abd4dce69fe7311315e2fc6d67c29614c8de2672
    restart: always

  database:
    container_name: immich_postgres
    image: registry.hub.docker.com/tensorchord/pgvecto-rs:pg14-v0.2.0@sha256:90724186f0a3517cf6914295b5ab410db9ce23190a2d9d0b9dd6463e3fa298f0
    environment:
      POSTGRES_PASSWORD: ${DB_PASSWORD}
      POSTGRES_USER: ${DB_USERNAME}
      POSTGRES_DB: ${DB_DATABASE_NAME}
    volumes:
      - ${DB_DATA_LOCATION}:/var/lib/postgresql/data
    restart: always

volumes:
  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=/srv/dev-disk-by-label-HDD/immich/library
# The location where your database files are stored
DB_DATA_LOCATION=/srv/dev-disk-by-label-HDD/immich/postgres

EXTERNAL_PATH=/srv/dev-disk-by-label-HDD/root/photos

# 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=xxxxxxx

# The values below this line do not need to be changed
###################################################################################
DB_USERNAME=xxxxxxx
DB_DATABASE_NAME=xxxxx

Reproduction steps

(I'm assuming the cause is what I describe in step 1).

1. Open a library-initialized iOS app after deleting external files and removing offline files from the server.
2. The library won't refresh.

Relevant log output

PlatformDispatcher - Catch all

type '_Map<String, dynamic>' is not a subtype of type 'String' in type cast

From 
ImmichErrorLogger

Stack trace

#0 _CastListBase.[] (dart:_internal/cast.dart:99) 
#1 ListBase.toList (dart:collection/list.dart:225) 
#2 AuditDeletesResponseDto.fromJson (package:openapi/model/audit_deletes_response_dto.dart:54) 
#3 ApiClient.fromJson (package:openapi/api_client.dart:262) 
#4 ApiClient.deserialize (package:openapi/api_client.dart:158) <asynchronous suspension> 
#5 AuditApi.getAuditDeletes (package:openapi/api/audit_api.dart:74) <asynchronous suspension> 
#6 AssetService._getRemoteAssetChanges (package:immich_mobile/shared/services/asset.service.dart:57) <asynchronous suspension> 
#7 SyncService._syncRemoteAssetChanges (package:immich_mobile/shared/services/sync.service.dart:161) <asynchronous suspension> 
#8 SyncService.syncRemoteAssetsToDb.<anonymous closure> (package:immich_mobile/shared/services/sync.service.dart:53) <asynchronous suspension> 
#9 AssetService.refreshRemoteAssets (package:immich_mobile/shared/services/asset.service.dart:45) <asynchronous suspension> 
#10 AssetNotifier.getAllAsset (package:immich_mobile/shared/providers/asset.provider.dart:52) <asynchronous suspension> 
#11 HomePage.build.refreshAssets (package:immich_mobile/modules/home/views/home_page.dart:87) <asynchronous suspension> 
#12 MultiselectGrid.build.wrapLongRunningFun.<anonymous closure> (package:immich_mobile/shared/ui/asset_grid/multiselect_grid.dart:415) <asynchronous suspension> 
#13 RefreshIndicatorState._show.<anonymous closure>.<anonymous closure> (package:flutter/src/material/refresh_indicator.dart:508) <asynchronous suspension>

Additional information

I open the iOS app but it no longer refreshes photos since this afternoon. The only thing that happened today was that I was curating some of my photos, deleting some from my external library and then deleted offline files. Also rotated a few and refreshed thumbnails and metadata.

The current workaround is to sign out and sign back in again to regenerate the library.

@alextran1502
Copy link
Contributor

Dup #9295

@pjft
Copy link
Author

pjft commented May 13, 2024

Thanks.

@pjft
Copy link
Author

pjft commented May 14, 2024

Hi @alextran1502 . Just to say that, at least on iOS, and with the latest version v1.104.0 on both server and app, the issue still seems to happen. I had to log out and log back in to resume proper behavior.

I just replicated it, and the steps to replicate it are as described:

1 - Start from an iniatialized app library.
2 - Kill the app.
3 - On the server, delete one photo (either from the file system, or delete it from the UI and then empty the trash - this needs to be done)
4 - Open the iOS app.

This will still happen, same error.

Please review this status, or I'm happy to submit a new issue if it helps, but at least on iOS this remains.

The error comes from trying to refresh the remote deletions.

Thanks, I hope this helps. Also, congrats on Immich - it's an awesome project.

@alextran1502 alextran1502 reopened this May 14, 2024
@alextran1502
Copy link
Contributor

@pjft Thank you, I can reproduce the issue now

@pjft
Copy link
Author

pjft commented May 14, 2024

By all means, happy to help. Let me know if there's any further information I can provide or testing. I'm on Testflight, if you'd like me to try out a development version of the app, if it helps. Have a great week!

@alextran1502
Copy link
Contributor

Found the problem, working on a fix :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants