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

New photos suddenly not detected #15382

Closed
1 of 3 tasks
tof245 opened this issue Jan 16, 2025 · 21 comments · Fixed by #15461
Closed
1 of 3 tasks

New photos suddenly not detected #15382

tof245 opened this issue Jan 16, 2025 · 21 comments · Fixed by #15461

Comments

@tof245
Copy link

tof245 commented Jan 16, 2025

The bug

note: changed phone and used data transferred mechanism

As of a few days ago, immich stopped detecting new photos on my phone and updating the DB. I hadn't updated anything. I tried connecting directly to the IP but there's no change. The new photos show up in the thumbnail previews of the backed up folders that I have selected but not in the actual timeline. The error that shows up in the logs are as follows
Message

PlatformDispatcher - Catch all`
Details
`Bad state: Unable to fetch properties for path -1033394188.`
Stack Trace 
`#0      AssetPathEntity.obtainPathFromProperties (package:photo_manager/src/types/entity.dart:162)
<asynchronous suspension>
#1      AssetPathEntity.fromId (package:photo_manager/src/types/entity.dart:59)
<asynchronous suspension>
#2      AlbumMediaRepository.getAssets (package:immich_mobile/repositories/album_media.repository.dart:44)
<asynchronous suspension>
#3      HashService.getHashedAssets (package:immich_mobile/services/hash.service.dart:38)
<asynchronous suspension>
#4      SyncService._syncDeviceAlbumFast (package:immich_mobile/services/sync.service.dart:656)
<asynchronous suspension>
#5      SyncService._syncAlbumInDbAndOnDevice (package:immich_mobile/services/sync.service.dart:563)
<asynchronous suspension>
#6      diffSortedLists (package:immich_mobile/utils/diff.dart:23)
<asynchronous suspension>
#7      SyncService._syncLocalAlbumAssetsToDb (package:immich_mobile/services/sync.service.dart:510)
<asynchronous suspension>
#8      AlbumService.refreshDeviceAlbums (package:immich_mobile/services/album.service.dart:132)
<asynchronous suspension>
#9      AssetNotifier.getAllAsset (package:immich_mobile/providers/asset.provider.dart:56)
<asynchronous suspension>
#10     AppLifeCycleNotifier.handleAppResume (package:immich_mobile/providers/app_life_cycle.provider.dart:67)
<asynchronous suspension>

I updated my server to the latest with no change.
Any idea what could have suddenly caused this?

The OS that Immich Server is running on

Ubuntu 22.04.4 LTS

Version of Immich Server

1.124.2

Version of Immich Mobile App

1.124.2

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}
    volumes:
      - ${UPLOAD_LOCATION}:/usr/src/app/upload
      - ${THUMB_LOCATION}:/usr/src/app/upload/thumbs
      - /etc/localtime:/etc/localtime:ro
      - /home/rtx970/Desktop/testfold:/home/rtx970/Desktop/testfold
      - /home/rtx970/immich-server/library/library:/home/rtx970/immich-server/library/library
    env_file:
      - .env
    ports:
      - 2283:2283
    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
    ports:
      - 5432:5432
    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=./library
THUMB_LOCATION=./library/thumbs

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

# The values below this line do not need to be changed
###################################################################################
DB_HOSTNAME=immich_postgres
DB_USERNAME=postgres
DB_DATABASE_NAME=immich
DB_DATA_LOCATION=./postgres

REDIS_HOSTNAME=immich_redis

Reproduction steps

  1. Use Immich as normal
  2. Notice new local photos aren't being uploaded
  3. Update server, empty cache, connect directly to local IP - nothing helps
    ...

Relevant log output

No response

Additional information

No response

@xan-cudo
Copy link

xan-cudo commented Jan 17, 2025

I'm experiencing the same. I resolved a few days ago by uninstalling the Immich Android client, and then reinstalling, then logging back in. Now it's not working again. Been doing this since 1.123 for me.

But the Backup feature in the client seems to see the photos. I just cannot see them in the Photos Preview Tab

@alextran1502
Copy link
Contributor

Do you mind restarting the phone to see if it helps?

@tof245
Copy link
Author

tof245 commented Jan 17, 2025 via email

@luke1123
Copy link

luke1123 commented Jan 18, 2025

I'm experiencing something similar. The app detects new pictures, uploads them and they are visible in the timeline on all clients, but the (sync/backup) status symbol always shows a cloud.

The app seems to "think" the new pictures are only present on the server and not locally on the device as well, but they are. They are also missing from the "on this device" albums. Looking at the logs, they are pretty much identical to the one above. If I refresh the timeline or restart the app the error appears again.

Restarting the phone/server doesn't change anything, nor does wiping the app cache. The app has full access permissions to photos and videos on the device.

PlatformDispatcher - Catch all

Bad state: Unable to fetch properties for path -1432612566.

#0      AssetPathEntity.obtainPathFromProperties (package:photo_manager/src/types/entity.dart:162)
<asynchronous suspension>
#1      AssetPathEntity.fromId (package:photo_manager/src/types/entity.dart:59)
<asynchronous suspension>
#2      AlbumMediaRepository.getAssets (package:immich_mobile/repositories/album_media.repository.dart:44)
<asynchronous suspension>
#3      HashService.getHashedAssets (package:immich_mobile/services/hash.service.dart:38)
<asynchronous suspension>
#4      SyncService.\_syncDeviceAlbumFast (package:immich_mobile/services/sync.service.dart:656)
<asynchronous suspension>
#5      SyncService.\_syncAlbumInDbAndOnDevice (package:immich_mobile/services/sync.service.dart:563)
<asynchronous suspension>
#6      diffSortedLists (package:immich_mobile/utils/diff.dart:23)
<asynchronous suspension>
#7      SyncService.\_syncLocalAlbumAssetsToDb (package:immich_mobile/services/sync.service.dart:510)
<asynchronous suspension>
#8      AlbumService.refreshDeviceAlbums (package:immich_mobile/services/album.service.dart:132)
<asynchronous suspension>
#9      AssetNotifier.getAllAsset (package:immich_mobile/providers/asset.provider.dart:56)
<asynchronous suspension>
Server: v1.124.2

App: v1.124.0 build.173 (Android 15)

@ItsArnob
Copy link

After some quick experimentation, I've narrowed this issue down to this piece of code:

updateTimeCond: modifiedFrom == null && modifiedUntil == null
? null
: DateTimeCond(
min: modifiedFrom ?? DateTime.utc(-271820),
max: modifiedUntil ?? DateTime.utc(275760),
),

From my limited understanding, following the stack trace, this snippet seems to filter files modified after the local database's known state. What I've realized is that removing it resolves the issue—again, I do not fully know the implications of removing this. What I do know is how exactly this error pops up in my case.

Here's how it goes:

  1. User refreshes the library twice, causing a full refresh (a.k.a. rebuilding the timeline).
  2. Refresh again once (so not a full refresh), and due to the highlighted code (and for some unknown reason), one of the selected backup folders will not be found and will throw the error "Unable to fetch properties for path...".
  3. Let's call this error-causing folder x.

Pictures still upload to the Immich instance; however, the app thinks it's only available remotely (thus showing the empty cloud icon).

Now pictures saved in any other folder, such as y or z, will still throw an error for the folder x and show the empty cloud icon. The only way I've found to solve this issue is to find the folder x and save a picture there. (It will be hard when you have lots of backed-up folders, as the error only shows the localId of the folder, not the name.) This somehow causes the app to be able to find the folder x and fix all the other pictures as well.

I will see if I can find a proper fix tomorrow.

@narkeeso
Copy link

narkeeso commented Jan 19, 2025

Also experiencing this, logging out and logging back in was enough to fix it. Hopefully sticks for awhile until it's fixed. Backing up and uploading seems to work in the broken state.

Edit: It doesn't stick, you have to relogin to build the timeline.

1.124.0 Client
1.124.2 Server

@JordyEGNL
Copy link
Contributor

I'm also encountering this issue on Android 15

Immich server is v1.124.2
Immich app is v1.124.2

Bad state: Unable to fetch properties for path -1572118126.

PlatformDispatcher - Catch all

#0      AssetPathEntity.obtainPathFromProperties (package:photo_manager/src/types/entity.dart:162)
<asynchronous suspension>
#1      AssetPathEntity.fromId (package:photo_manager/src/types/entity.dart:59)
<asynchronous suspension>
#2      AlbumMediaRepository.getAssets (package:immich_mobile/repositories/album_media.repository.dart:44)
<asynchronous suspension>
#3      HashService.getHashedAssets (package:immich_mobile/services/hash.service.dart:38)
<asynchronous suspension>
#4      SyncService._syncDeviceAlbumFast (package:immich_mobile/services/sync.service.dart:656)
<asynchronous suspension>
#5      SyncService._syncAlbumInDbAndOnDevice (package:immich_mobile/services/sync.service.dart:563)
<asynchronous suspension>
#6      diffSortedLists (package:immich_mobile/utils/diff.dart:23)
<asynchronous suspension>
#7      SyncService._syncLocalAlbumAssetsToDb (package:immich_mobile/services/sync.service.dart:510)
<asynchronous suspension>
#8      AlbumService.refreshDeviceAlbums (package:immich_mobile/services/album.service.dart:132)
<asynchronous suspension>
#9      AssetNotifier.getAllAsset (package:immich_mobile/providers/asset.provider.dart:56)
<asynchronous suspension>
#10     AppLifeCycleNotifier.handleAppResume (package:immich_mobile/providers/app_life_cycle.provider.dart:67)
<asynchronous suspension>

@tof245
Copy link
Author

tof245 commented Jan 19, 2025 via email

@alextran1502
Copy link
Contributor

I might have found the reason. Can you guys try the APK here?

https://drive.google.com/file/d/1W-YtUGclK_b7jprM8tTZqwG1D_x3ZXY6/view?usp=sharing

@ItsArnob
Copy link

I might have found the reason. Can you guys try the APK here?

https://drive.google.com/file/d/1W-YtUGclK_b7jprM8tTZqwG1D_x3ZXY6/view?usp=sharing

I'm still getting the same error. Pictures upload just fine but they sometimes don't show up in the timeline, and when they do show up, it just shows the remote-only icon.

@xan-cudo
Copy link

So on my issue, I tried to reboot the phone, and it did not resolve.

I then found that when I selct the Recents album, the backup sees it, but the files did not show in the Preview.

I then found that if I manually selcted a particular Album that contained the photos in Recent, I could then see them in Preview before and after backup.

I'm going to download and try the linked APK and see if it does something differently.

@xan-cudo
Copy link

I might have found the reason. Can you guys try the APK here?

https://drive.google.com/file/d/1W-YtUGclK_b7jprM8tTZqwG1D_x3ZXY6/view?usp=sharing

Just from my initial install and login, that seems it may have kinda fixed it for me. I installed this linked APK, was able to select just the Recents, and see Photos.

I then snapped a few new ones, and they would not show (but did indicate in the Backup).

I then deselected Recents in Backup, then reselected Recents in Backup, and the new pictures showed up.

So it's better and I can at least toggle the Recents to get new photos to show up.

@alextran1502
Copy link
Contributor

Please also that you don't have the spinner icon at the bottom of the page (indicate hashing progress)

Also the log from the apk should be good as well

@FauFra
Copy link

FauFra commented Jan 20, 2025

Hi,

I was hitting the same error so I've installed the APK mentioned by @alextran1502.

Some info

Phone: pixel 9
Os: android 15
Immich app: 1.124.2 build.175
Immich server: 1.124.2 running on docker

I'm struggling with night sight pictures taken automatically by the phone. They don't appear at all in the timeline and the error thrown is the following

Immich app: Immich app: 1.124.2 build.175

Message: PlatformDispatcher - Catch all
Details: Bad state: Unable to fetch properties for path -760671608.

Stack trace

#0      AssetPathEntity.obtainPathFromProperties (package:photo_manager/src/types/entity.dart:162)
<asynchronous suspension>
#1      AssetPathEntity.fromId (package:photo_manager/src/types/entity.dart:59)
<asynchronous suspension>
#2      AlbumMediaRepository.getAssets (package:immich_mobile/repositories/album_media.repository.dart:44)
<asynchronous suspension>
#3      HashService.getHashedAssets (package:immich_mobile/services/hash.service.dart:38)
<asynchronous suspension>
#4      SyncService._syncDeviceAlbumFast (package:immich_mobile/services/sync.service.dart:656)
<asynchronous suspension>
#5      SyncService._syncAlbumInDbAndOnDevice (package:immich_mobile/services/sync.service.dart:563)
<asynchronous suspension>
#6      diffSortedLists (package:immich_mobile/utils/diff.dart:23)
<asynchronous suspension>
#7      SyncService._syncLocalAlbumAssetsToDb (package:immich_mobile/services/sync.service.dart:510)
<asynchronous suspension>
#8      AlbumService.refreshDeviceAlbums (package:immich_mobile/services/album.service.dart:132)
<asynchronous suspension>
#9      AssetNotifier.getAllAsset (package:immich_mobile/providers/asset.provider.dart:56)
<asynchronous suspension>
#10     PhotosPage.build.refreshAssets (package:immich_mobile/pages/photos/photos.page.dart:86)
<asynchronous suspension>
#11     MultiselectGrid.build.wrapLongRunningFun.<anonymous closure> (package:immich_mobile/widgets/asset_grid/multiselect_grid.dart:399)
<asynchronous suspension>
#12     RefreshIndicatorState._show.<anonymous closure>.<anonymous closure> (package:flutter/src/material/refresh_indicator.dart:503)
<asynchronous suspension>

I tried with normal pictures and everything is fine, they are uploaded to the server and shown in the timeline.

I tried to install the latest available immich app 1.124.2 build.2175 but I have the same issue and the stack trace is the following

#0      AssetPathEntity.obtainPathFromProperties (package:photo_manager/src/types/entity.dart:162)
<asynchronous suspension>
#1      AssetPathEntity.fromId (package:photo_manager/src/types/entity.dart:59)
<asynchronous suspension>
#2      AlbumMediaRepository.getAssets (package:immich_mobile/repositories/album_media.repository.dart:44)
<asynchronous suspension>
#3      HashService.getHashedAssets (package:immich_mobile/services/hash.service.dart:38)
<asynchronous suspension>
#4      SyncService._syncDeviceAlbumFast (package:immich_mobile/services/sync.service.dart:656)
<asynchronous suspension>
#5      SyncService._syncAlbumInDbAndOnDevice (package:immich_mobile/services/sync.service.dart:563)
<asynchronous suspension>
#6      diffSortedLists (package:immich_mobile/utils/diff.dart:23)
<asynchronous suspension>
#7      SyncService._syncLocalAlbumAssetsToDb (package:immich_mobile/services/sync.service.dart:510)
<asynchronous suspension>
#8      AlbumService.refreshDeviceAlbums (package:immich_mobile/services/album.service.dart:132)
<asynchronous suspension>
#9      AssetNotifier.getAllAsset (package:immich_mobile/providers/asset.provider.dart:56)
<asynchronous suspension>
#10     AppLifeCycleNotifier.handleAppResume (package:immich_mobile/providers/app_life_cycle.provider.dart:67)
<asynchronous suspension>

@xan-cudo
Copy link

xan-cudo commented Jan 20, 2025 via email

@alextran1502
Copy link
Contributor

alextran1502 commented Jan 20, 2025

This issue will be fixed in #15461. Sorry for the inconvenience guys

@FauFra
Copy link

FauFra commented Jan 20, 2025

No problem! Thank you for your help!

@tof245
Copy link
Author

tof245 commented Jan 21, 2025

This seems to have worked for me as well. Many thanks!

I might have found the reason. Can you guys try the APK here?
https://drive.google.com/file/d/1W-YtUGclK_b7jprM8tTZqwG1D_x3ZXY6/view?usp=sharing

Just from my initial install and login, that seems it may have kinda fixed it for me. I installed this linked APK, was able to select just the Recents, and see Photos.

I then snapped a few new ones, and they would not show (but did indicate in the Backup).

I then deselected Recents in Backup, then reselected Recents in Backup, and the new pictures showed up.

So it's better and I can at least toggle the Recents to get new photos to show up.

@tof245
Copy link
Author

tof245 commented Jan 22, 2025

It seems that the error's come back for me in the logs, although it doesn't seem to be causing any noticeable effects for now (i.e. the photos are still being recognized). It seems to be the same as before: Bad state: Unable to fetch properties for path -1033394188.

@JordyEGNL
Copy link
Contributor

Can confirm that the issue is fixed in v1.125.1 for me

@alextran1502
Copy link
Contributor

Can confirm that the issue is fixed in v1.125.1 for me

Great! thank you!

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.

8 participants