Skip to content

Symlink is failing in obscure circumstances #3031

@ildyria

Description

@ildyria

Discussed in #3024

#3024 (reply in thread) shows PoC that this is working as intended.

However, #3024 (reply in thread) shows that it is breaking in their case.

#3024 (reply in thread) Traces the failure.

Preliminary Analysis

If you open one of those image via Lychee (go to your-lychee-url/uploads/01/35/filename.jpg, you will know if they are from previous import and need to be "cleaned". There is the php artisan lychee:ghostbuster command for that (it removes any images from the DB without a file, and similarly any file without an image attached, hence why there is a dry run by default.)

Your error is in this function:
https://github.com/LycheeOrg/Lychee/blob/master/app/Actions/Photo/Pipes/Standalone/PlacePhoto.php#L65
I suspect around here: https://github.com/LycheeOrg/Lychee/blob/master/app/Actions/Photo/Pipes/Standalone/PlacePhoto.php#L83

if we look at:
https://github.com/LycheeOrg/Lychee/blob/master/app/Actions/Photo/Create.php#L170

$pipes = [
			Standalone\FixTimeStamps::class,
			Standalone\InitNamingStrategy::class,
			Shared\HydrateMetadata::class,
			Shared\SetStarred::class,
			Shared\SetParentAndOwnership::class,
			Standalone\SetOriginalChecksum::class,
			Standalone\FetchSourceImage::class,
			Standalone\ExtractGoogleMotionPictures::class,
			Standalone\PlacePhoto::class,
			Standalone\PlaceGoogleMotionVideo::class,
			Standalone\SetChecksum::class,
			Shared\Save::class,
			Standalone\CreateOriginalSizeVariant::class,
			Standalone\CreateSizeVariants::class,
			Standalone\EncodePlaceholder::class,
			Standalone\ReplaceOriginalWithBackup::class,
			Shared\UploadSizeVariantsToS3::class,
		];

		return $this->executePipeOnDTO($pipes, $dto)->getPhoto();

All the operations after PlacePhoto::class as skipped. which means that Shared\Save::class which is in charge of saving the image in your database is not executed, hence the empty albums.

So the question becomes why does the symlink worked in my case and not yours? 🤔

Question.

Why is this symlink failing?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions