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

fix(mobile): fix uncaught error in getting file cause hashing procses to be aborted entirely #12826

Merged
merged 2 commits into from
Sep 21, 2024

Conversation

alextran1502
Copy link
Contributor

@alextran1502 alextran1502 commented Sep 21, 2024

On iOS, some local files might be from the Shared Albums of iOS, which is known to be visible from the phone but actually they could be moved or removed, thus an error is throw when we are trying to read the file content.

Relevant log

2024-09-15 13:35:55.672267 | SEVERE   | ImmichErrorLogger    | PlatformDispatcher - Catch all | PlatformException(Error Domain=PHPhotosErrorDomain Code=-1 "(null)", null, null, null) |
#0      StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:648)
#1      MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:334)
<asynchronous suspension>
#2      AssetEntity._getFile (package:photo_manager/src/types/entity.dart:735)
<asynchronous suspension>
#3      HashService._hashAssets (package:immich_mobile/services/hash.service.dart:57)
<asynchronous suspension>
#4      SyncService._addAlbumFromDevice (package:immich_mobile/services/sync.service.dart:687)
<asynchronous suspension>
#5      diffSortedLists (package:immich_mobile/utils/diff.dart:30)
<asynchronous suspension>
#6      SyncService._syncLocalAlbumAssetsToDb (package:immich_mobile/services/sync.service.dart:504)
<asynchronous suspension>
#7      AlbumService.refreshDeviceAlbums (package:immich_mobile/services/album.service.dart:121)
<asynchronous suspension>
#8      Future.wait.<anonymous closure> (dart:async/future.dart:534)
<asynchronous suspension>

mobile/lib/services/hash.service.dart Outdated Show resolved Hide resolved
@alextran1502 alextran1502 enabled auto-merge (squash) September 21, 2024 00:18
@alextran1502 alextran1502 merged commit 14169d3 into main Sep 21, 2024
35 of 36 checks passed
@alextran1502 alextran1502 deleted the hash-abort branch September 21, 2024 00:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants