Photos not shown in "your photos"

I just tried to manually generate Foto previews from console:

occ preview:generate-all --path="mon/files/JulyPaddy/Fotos" -vvv

With this result:

2020-07-09T14:48:57+00:00 In Root.php line 205:
2020-07-09T14:48:57+00:00                                  
2020-07-09T14:48:57+00:00   [OCP\Files\NotFoundException]  
2020-07-09T14:48:57+00:00   /mon/files/JulyPaddy/Fotos     
2020-07-09T14:48:57+00:00                                  
2020-07-09T14:48:57+00:00 
2020-07-09T14:48:57+00:00 Exception trace:
2020-07-09T14:48:57+00:00   at /config/www/nextcloud/lib/private/Files/Node/Root.php:205
2020-07-09T14:48:57+00:00  OC\Files\Node\Root->get() at /config/www/nextcloud/lib/private/Files/Node/Folder.php:138
2020-07-09T14:48:57+00:00  OC\Files\Node\Folder->get() at /config/www/nextcloud/apps/previewgenerator/lib/Command/Generate.php:144
2020-07-09T14:48:57+00:00  OCA\PreviewGenerator\Command\Generate->generatePathPreviews() at /config/www/nextcloud/apps/previewgenerator/lib/Command/Generate.php:115
2020-07-09T14:48:57+00:00  OCA\PreviewGenerator\Command\Generate->execute() at /config/www/nextcloud/3rdparty/symfony/console/Command/Command.php:255
2020-07-09T14:48:57+00:00  Symfony\Component\Console\Command\Command->run() at /config/www/nextcloud/3rdparty/symfony/console/Application.php:1012
2020-07-09T14:48:57+00:00  Symfony\Component\Console\Application->doRunCommand() at /config/www/nextcloud/3rdparty/symfony/console/Application.php:272
2020-07-09T14:48:57+00:00  Symfony\Component\Console\Application->doRun() at /config/www/nextcloud/3rdparty/symfony/console/Application.php:148
2020-07-09T14:48:57+00:00  Symfony\Component\Console\Application->run() at /config/www/nextcloud/lib/private/Console/Application.php:215
2020-07-09T14:48:57+00:00  OC\Console\Application->run() at /config/www/nextcloud/console.php:100
2020-07-09T14:48:57+00:00  require_once() at /config/www/nextcloud/occ:11
2020-07-09T14:48:57+00:00 
2020-07-09T14:48:57+00:00 preview:generate-all [-p|--path [PATH]] [--] [<user_id>]

I had a look at the PHP code in Root.php line 205 and it seems like this error points to an issue with the path. Nextcloud cannot find the path.
This is strange as i can navigate with Nextcloud to the photos via the file browser.
I really dont know what to do with this.

Please test

occ preview:generate-all --vvv

and post all errors.

No errors. It starts to generate previews in one of my folders and then suddenly does not continue. No error at all.
When i start it again it continues a little further down the folder structure. I can do this over and over and it continues just a bit more every time.

Sounds strange i know. But that’s the behaviour i can see.

I restarted the process like 10 times and now got an error:

PHP Fatal error:  Allowed memory size of 536870912 bytes exhausted (tried to allocate 11526280 bytes) in /config/www/nextcloud/lib/private/legacy/OC_Image.php on line 649

Addition:
After checking the log in nextcloud it turns out that this error is thrown everytime that preview-generate-all stops. Just the console does not report this error everytime.

I think normally 512 MB is enough.

Well ok :wink: So what is not normal here then?

I changed it to 1024MB now. Still getting the error:

PHP Fatal error:  Allowed memory size of 1073741824 bytes exhausted (tried to allocate 5529760 bytes) in /config/www/nextcloud/lib/private/legacy/OC_Image.php on line 649

…and even with 2048M:

PHP Fatal error:  Allowed memory size of 2147483648 bytes exhausted (tried to allocate 10641088 bytes) in /config/www/nextcloud/lib/private/legacy/OC_Image.php on line 649

I also checked memory usage of the php7 thread and it goes up to 27% which is about 2 Gig of RAM usage. So in fact it really uses up the memory.
So preview-generate seems to need more memory the bigger the folder structure is. It is not that huge for me. Something around 2 TB of different type of data (photos, movies, apps …).
Is that normal behaviour?

Ok. Perhaps a problem with php and FastCGI / php-fpm

11:37:14 [error] 405#405: *1 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream, client: x, server: _, request: "GET /status.php HTTP/2.0", upstream: "fastcgi://127.0.0.1:9000", host: "x:9191

https://serverfault.com/questions/517190/nginx-1-fastcgi-sent-in-stderr-primary-script-unknown

I cannot really see a solution that works for me there :confused:

Ok I restarted the generate:preview-all command a felt million times and it ran through all folders fine and created the thumbs that are probably visible when navigating to the folders.
But the described behaviour above still persists. So the problem did not go away.
Nothing shown in “my photos” expect for the pictures inside the nextcloud generated “photos” folder

I cannot create a public share in my photo storage location as stated in my last comment. No idea why.

At least i found a solution for this. There are extended settings for external storage a bit hidden with the 3 dots when configuring the external storage. I have activated sharing in there and now i can also do a public share on these.

The original issue persists.

After doing some research i believe the reason for photos not showing up in the “photos” app gallery is that external storage is not supported by this app:

I found no fix. If this it the reason (and i think it is), photos is broken for me. I expect it is for a lot of other users.

I use also “external storage” (type local).

For me the way with “apps/files” and with “apps/photos” works.
In “apps/photos” i can go to “apps/photos/albums” and i find the “local directory” and in the directory the subdirectorys with the photos.

I use Nextcloud 20.0.2

Yes, photos doesn’t support external storage.
See existing issue on GitHub

-------- Message d’origine --------
On 9 nov. 2020 Ă  14:03, devnull via Nextcloud community < noreply@nextcloud.com > a ĂŠcrit :

Sorry. But it works for me.

Unbenannt

Unbenannt2

And there i find my pictures from external storage.

I should have been more clear “Your photos” doesn’t support external storage :slight_smile:

Is it the intention to make this work in the future? Or is this a permanent “non-working” feature?

This is already fixed for NC22: Support external storage by skjnldsv ¡ Pull Request #804 ¡ nextcloud/photos ¡ GitHub

1 Like