steilerDev / icloud-photos-sync

One-way sync engine for the iCloud Photos Library into the native file system
https://icps.steiler.dev/
GNU General Public License v3.0
340 stars 9 forks source link

[2023-03-24T01:07:37.605Z] WARN Error-Handler: LIBRARY_LINK (WARN): Unable to link assets ([...] to [...]) caused by ENOENT: no such file or directory, stat '/opt/icloud-photos-library/_All-Photos/[...]' #224

Closed lab-alexis closed 11 months ago

lab-alexis commented 1 year ago

Checklist before opening an issue

Describe the bug

Library of ~25 000 assets including ~8 000 in iCloud Shared Library, ~200 videos, 51 albums.

After sync, I get around ~400k warning lines with the error in the subject. Additionally (not sure if related) every single album contains the same 2 assets (1 photo and 1 video):

Upon verification, I think the issue is that the code is looking for photos in _All-Photos whereas the photos in question are located in _Shared-Photos, and for every single album it is trying to add every single shared photo (8 000*51=408 000). I know that there is a documented limitation regarding iCloud Shared Photo Libraries but it seems to me that something is wrong here nonetheless.

Error code

[2023-03-24T01:07:37.605Z] WARN Error-Handler: LIBRARY_LINK (WARN): Unable to link assets (../_All-Photos/AfqoLih0XwAFkZ63QifKwjS3Cphw.jpeg to /opt/icloud-photos-library/.0E301E9F-18FB-4B0C-85B9-CA615C517B4C/IMG_0169.jpeg) caused by ENOENT: no such file or directory, stat '/opt/icloud-photos-library/_All-Photos/AfqoLih0XwAFkZ63QifKwjS3Cphw.jpeg'

Logs

Please paste the log file (preferably with LOG_LEVEL=debug), located in .icloud-photos-sync.log, stored in the DATA_DIR.

.icloud-photos-sync.log

Operating environment

steilerDev commented 1 year ago

Interesstin...I'll try and look into this over the weekend, thanks for reporting.

I also noticed on my dashboard that there is something wrong on the album side.

Quick side note: I currently cant link shared assets into albums, because this information is not exposed through the iCloud WebUI :(

Once available I should (🤞🏻) have most of the stuff in place to add it.

lab-alexis commented 1 year ago

Hello,

Thanks to you for the good work you're putting out there! Yes I also noticed a few dozen album count mismatch errors before the initial sync was completed but I attributed it to bugs on the backend (my library is pretty old by iCloud standards, with a migration from iPhoto to Photos library at some point).

Hope you'll be able to make full sync work with shared library assets soon! I was a bit nervous not having any backup for part of my library but now at least I do have a full backup again, even if it's all in a flat file structure for now.

AC

steilerDev commented 1 year ago

Hey @lab-alexis - I believe the issues were addressed in PR #231 (which is now part of the latest beta release) - could you please confirm?

steilerDev commented 11 months ago

Should be released and fixed with v1.2.0 - closing this for now, please create a new ticket in case this happens again.