immich-app / immich

High performance self-hosted photo and video management solution.
https://immich.app
GNU Affero General Public License v3.0
44.98k stars 2.18k forks source link

Error when syncing albums in iOS app #12442

Open commandercool opened 1 week ago

commandercool commented 1 week ago

The bug

After switching devices I noticed that not all recent photos are displayed in immich app on iOS. Both the app and the server are on the latest versions.

The error pops up when either Recent or Favorites albums are selected for a sync.

The OS that Immich Server is running on

Ubuntu 22.04

Version of Immich Server

v1.114.0

Version of Immich Mobile App

v1.114.0

Platform with the issue

Your docker-compose.yml content

Not changed

Your .env content

Not relevant

Reproduction steps

  1. Select Recent album to by synced
  2. Pull down for update
  3. No new photos appear in the feed, but error pops in the logs

Relevant log output

StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:648)
MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:334)
AssetEntity._getFile (package:photo_manager/src/types/entity.dart:735)
HashService._hashAssets (package:immich_mobile/services/hash.service.dart:57)
SyncService._addAlbumFromDevice (package:immich_mobile/services/sync.service.dart:687)
diffSortedLists (package:immich_mobile/utils/diff.dart:21)
SyncService._syncLocalAlbumAssetsToDb (package:immich_mobile/services/sync.service.dart:504)
AlbumService.refreshDeviceAlbums (package:immich_mobile/services/album.service.dart:121)
AssetNotifier.getAllAsset (package:immich_mobile/providers/asset.provider.dart:55)
PhotosPage.build.refreshAssets (package:immich_mobile/pages/photos/photos.page.dart:86)
MultiselectGrid.build.wrapLongRunningFun.<anonymous closure> (package:immich_mobile/widgets/asset_grid/multiselect_grid.dart:394)
RefreshIndicatorState._show.<anonymous closure>.<anonymous closure> (package:flutter/src/material/refresh_indicator.dart:503)

Additional information

No response

alextran1502 commented 1 week ago

Can you check if you are still seeing the spinner icon at the bottom when you are on the Photos page? If yes, it means that the app is hashing the assets and will show all of them once completed

commandercool commented 1 week ago

The spinner shows up really briefly and then goes away. I believe it stops hashing in the error.

alextran1502 commented 1 week ago

Can you try only to select the Favorite and see if the assets from that album are showing up?

commandercool commented 1 week ago

No, they do not show up, but error pops up in the logs.

I believe the issue is with Favorite specifically. Because when I select some other album like Videos - I can see the assets and there are no errors in the logs.

alextran1502 commented 1 week ago

I think for your case, the current workaround is to select the Recents album then exclude Favorites until we figure out what is going on in that album

alextran1502 commented 1 week ago

Can you grab the full log when it syncs so I can help troubleshoot?

commandercool commented 1 week ago

I think for your case, the current workaround is to select the Recents album then exclude Favorites until we figure out what is going on in that album

That works, all photos except Favorites are now in the immich feed.

Can you grab the full log when it syncs so I can help troubleshoot?

Basically I see the following logs:

Local album <name1> has not changed
Local album <name2> has not changed
...
Syncing new local album to DB: Favorites
PlatformDispatcher - Catch all (the trace that I've linked)