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

error message i am not able to understand #3

Closed
mightyBroccoli opened this issue Dec 10, 2016 · 46 comments
Closed

error message i am not able to understand #3

mightyBroccoli opened this issue Dec 10, 2016 · 46 comments

Comments

@mightyBroccoli
Copy link

mightyBroccoli commented Dec 10, 2016

I downloaded and installed your app from the appstore inside NC 11RC1. Everything worked fine even the preview:pre-generate command worked perfectly. I tried the generate-all feature and that was the error message I got.

occ preview:generate-all

An unhandled exception has been thrown:
Error: Call to a member function getPath() on null in /var/www/magicbroccoli.de/nextcloud/lib/private/Preview/GeneratorHelper.php:72
Stack trace:
#0 /var/www/magicbroccoli.de/nextcloud/lib/private/Preview/GeneratorHelper.php(53): OC\Preview\GeneratorHelper->getViewAndPath(NULL)
#1 /var/www/magicbroccoli.de/nextcloud/lib/private/Preview/Generator.php(155): OC\Preview\GeneratorHelper->getThumbnail(Object(OC\Preview\MP3), Object(OC\Files\Node\File), 1024, 1024)
#2 /var/www/magicbroccoli.de/nextcloud/lib/private/Preview/Generator.php(108): OC\Preview\Generator->getMaxPreview(Object(OC\Files\SimpleFS\SimpleFolder), Object(OC\Files\Node\File), 'audio/mpeg')
#3 /var/www/magicbroccoli.de/nextcloud/lib/private/PreviewManager.php(182): OC\Preview\Generator->getPreview(Object(OC\Files\Node\File), 32, 32, true, 'fill', 'audio/mpeg')
#4 /var/www/magicbroccoli.de/nextcloud/apps/previewgenerator/lib/Command/Generate.php(167): OC\PreviewManager->getPreview(Object(OC\Files\Node\File), 32, 32, true)
#5 /var/www/magicbroccoli.de/nextcloud/apps/previewgenerator/lib/Command/Generate.php(155): OCA\PreviewGenerator\Command\Generate->parseFile(Object(OC\Files\Node\File))
#6 /var/www/magicbroccoli.de/nextcloud/apps/previewgenerator/lib/Command/Generate.php(153): OCA\PreviewGenerator\Command\Generate->parseFolder(Object(OC\Files\Node\Folder))
#7 /var/www/magicbroccoli.de/nextcloud/apps/previewgenerator/lib/Command/Generate.php(142): OCA\PreviewGenerator\Command\Generate->parseFolder(Object(OC\Files\Node\Folder))
#8 /var/www/magicbroccoli.de/nextcloud/apps/previewgenerator/lib/Command/Generate.php(96): OCA\PreviewGenerator\Command\Generate->generateUserPreviews(Object(OC\User\User))
#9 /var/www/magicbroccoli.de/nextcloud/lib/private/User/Manager.php(410): OCA\PreviewGenerator\Command\Generate->OCA\PreviewGenerator\Command\{closure}(Object(OC\User\User))
#10 /var/www/magicbroccoli.de/nextcloud/apps/previewgenerator/lib/Command/Generate.php(97): OC\User\Manager->callForSeenUsers(Object(Closure))
#11 /var/www/magicbroccoli.de/nextcloud/3rdparty/symfony/console/Command/Command.php(256): OCA\PreviewGenerator\Command\Generate->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#12 /var/www/magicbroccoli.de/nextcloud/3rdparty/symfony/console/Application.php(818): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#13 /var/www/magicbroccoli.de/nextcloud/3rdparty/symfony/console/Application.php(186): Symfony\Component\Console\Application->doRunCommand(Object(OCA\PreviewGenerator\Command\Generate), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#14 /var/www/magicbroccoli.de/nextcloud/3rdparty/symfony/console/Application.php(117): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#15 /var/www/magicbroccoli.de/nextcloud/lib/private/Console/Application.php(169): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#16 /var/www/magicbroccoli.de/nextcloud/console.php(90): OC\Console\Application->run()
#17 /var/www/magicbroccoli.de/nextcloud/occ(11): require_once('/var/www/magicb...')
#18 {main}

I am using Nextcloud 11RC1 on a debian mashine with apache2 and php7.0.14 installed.

@Ramalama2
Copy link

same error here, with nginx 1.11 and php7.1-fpm on nextcloud 11 rc2

Do we missing some extension or incompatibility with php7 ?

This tool would be awesome if it work, the most needed feature here :-)

Cheers :-)

@mightyBroccoli
Copy link
Author

I just upgraded to 11RC2 and still I have this error.

An unhandled exception has been thrown:
Error: Call to a member function getPath() on null in /var/www/magicbroccoli.de/nextcloud/lib/private/Preview/GeneratorHelper.php:72
Stack trace:
#0 /var/www/magicbroccoli.de/nextcloud/lib/private/Preview/GeneratorHelper.php(53): OC\Preview\GeneratorHelper->getViewAndPath(NULL)
#1 /var/www/magicbroccoli.de/nextcloud/lib/private/Preview/Generator.php(155): OC\Preview\GeneratorHelper->getThumbnail(Object(OC\Preview\MP3), Object(OC\Files\Node\File), 1024, 1024)
#2 /var/www/magicbroccoli.de/nextcloud/lib/private/Preview/Generator.php(108): OC\Preview\Generator->getMaxPreview(Object(OC\Files\SimpleFS\SimpleFolder), Object(OC\Files\Node\File), 'audio/mpeg')
#3 /var/www/magicbroccoli.de/nextcloud/lib/private/PreviewManager.php(182): OC\Preview\Generator->getPreview(Object(OC\Files\Node\File), 32, 32, true, 'fill', 'audio/mpeg')
#4 /var/www/magicbroccoli.de/nextcloud/apps/previewgenerator/lib/Command/Generate.php(167): OC\PreviewManager->getPreview(Object(OC\Files\Node\File), 32, 32, true)
#5 /var/www/magicbroccoli.de/nextcloud/apps/previewgenerator/lib/Command/Generate.php(155): OCA\PreviewGenerator\Command\Generate->parseFile(Object(OC\Files\Node\File))
#6 /var/www/magicbroccoli.de/nextcloud/apps/previewgenerator/lib/Command/Generate.php(153): OCA\PreviewGenerator\Command\Generate->parseFolder(Object(OC\Files\Node\Folder))
#7 /var/www/magicbroccoli.de/nextcloud/apps/previewgenerator/lib/Command/Generate.php(142): OCA\PreviewGenerator\Command\Generate->parseFolder(Object(OC\Files\Node\Folder))
#8 /var/www/magicbroccoli.de/nextcloud/apps/previewgenerator/lib/Command/Generate.php(96): OCA\PreviewGenerator\Command\Generate->generateUserPreviews(Object(OC\User\User))
#9 /var/www/magicbroccoli.de/nextcloud/lib/private/User/Manager.php(410): OCA\PreviewGenerator\Command\Generate->OCA\PreviewGenerator\Command\{closure}(Object(OC\User\User))
#10 /var/www/magicbroccoli.de/nextcloud/apps/previewgenerator/lib/Command/Generate.php(97): OC\User\Manager->callForSeenUsers(Object(Closure))
#11 /var/www/magicbroccoli.de/nextcloud/3rdparty/symfony/console/Command/Command.php(256): OCA\PreviewGenerator\Command\Generate->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#12 /var/www/magicbroccoli.de/nextcloud/3rdparty/symfony/console/Application.php(818): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#13 /var/www/magicbroccoli.de/nextcloud/3rdparty/symfony/console/Application.php(186): Symfony\Component\Console\Application->doRunCommand(Object(OCA\PreviewGenerator\Command\Generate), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#14 /var/www/magicbroccoli.de/nextcloud/3rdparty/symfony/console/Application.php(117): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#15 /var/www/magicbroccoli.de/nextcloud/lib/private/Console/Application.php(169): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#16 /var/www/magicbroccoli.de/nextcloud/console.php(90): OC\Console\Application->run()
#17 /var/www/magicbroccoli.de/nextcloud/occ(11): require_once('/var/www/magicb...')
#18 {main}

@rullzer
Copy link
Member

rullzer commented Dec 12, 2016

Thanks for reporting. I'll look into it tomorrow.

@rullzer
Copy link
Member

rullzer commented Dec 13, 2016

Mmmm I must say I don't get this when looking at your stack trace. The function at https://github.com/nextcloud/server/blob/master/lib/private/Preview/GeneratorHelper.php#L52 seems to be passed a File. But then when it calls thub.com/nextcloud/server/blob/master/lib/private/Preview/GeneratorHelper.php#L62 the file is suddenly NULL.

@Ramalama2
Copy link

Rullzer, thanks for the answer :-)

Can you tell what you use? Php version, nextcloud version... System...

So probably there are some differences, especially to php version...

Cheers:-)

@Ramalama2
Copy link

Ps my data folder is not inside nextcloud... It's on other hdd

@rullzer
Copy link
Member

rullzer commented Dec 13, 2016

NC: 11
PHP: 7
System: Gentoo Linux

Mine is also not inside nextcloud.

@rullzer
Copy link
Member

rullzer commented Dec 13, 2016

mmm maybe it is a 7.1 issue. I can test that later hopefully

@Ramalama2
Copy link

thank you very much :-)
the other guy above have that error with 7.0 :-)

just forgot, im going to check now, php-cli have its own php.ini file and own www.conf file, need to edit it to same as the normal php :-)
will report back if it helps or not :-)
if not, i need to try with 7.0 then :-)

However, thank you very much :-)

@mightyBroccoli
Copy link
Author

I have a NC 11 instance and my data folder is also not inside the nextcloud folder.
php

PHP 7.0.14-1~dotdeb+8.1 (cli) ( NTS )
Copyright (c) 1997-2016 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies
    with Zend OPcache v7.0.14-1~dotdeb+8.1, Copyright (c) 1999-2016, by Zend Technologies

apache2

Server version: Apache/2.4.10 (Debian)
Server built:   Sep 15 2016 20:44:43
Server's Module Magic Number: 20120211:37
Server loaded:  APR 1.5.1, APR-UTIL 1.5.4
Compiled using: APR 1.5.1, APR-UTIL 1.5.4
Architecture:   64-bit

System Debian

Distributor ID:	Debian
Description:	Debian GNU/Linux 8.6 (jessie)
Release:	8.6
Codename:	jessie

@Ramalama2
Copy link

yep edited the files, same error xD :-)

Just one thing, after clean install of nextcloud 11 (if you upgrade and you copy only config.php, you have an clean directory...)

And you execute the script first time,
Your script is working perfectly fine for the first 5-10 minutes,
my cpu load is high, so the script is working and generates images...

But after that 10minutes, your script abort, with the above error...

And if you execute your script again (secound time, third time, and so on) it throws the error immediately...

Seems like there are 2 bugs:
1st: something runs out of memory or reaches maximum of sth...
2nd: there is a bug if the script abort and you execute it again, maybe there are some file, that generates on first time, and on secound time it collides with that file? or sth else?

I have here extremely much pictures (3000-5000) and every picture is about 12-15mb...

Im going to try now set memory_limit of php to 8GB and and other limiting php settings to something bigger...
But first update to official NC11 :-)

Will report later again :-)

Thank you anyway for your script :-)

@Ramalama2
Copy link

Ramalama2 commented Dec 13, 2016

So it's fixed, things i've did:
Updated to nextcloud 11 (release version/official) (before ive used rc1/rc2/prerelease)
edited php-cli (php.ini) to this:
max_execution_time = 21600
max_input_time = 21600
zlib.output_compression = Off
realpath_cache_size = 512k
memory_limit = 2048M

display_errors = On (for debugging the script)
log_errors = Off
post_max_size = 2G
cgi.fix_pathinfo=1
file_uploads = On
upload_tmp_dir = /var/www-temp
upload_max_filesize = 2G
max_file_uploads = 1000

I cant say exactly what fixed this error, i think its the official version of NC11,
but can be the php.ini edits too (ive made bold the more important ones)

I cant say if the script will throw error or not, but its running now since 25minutes here is the top log for php:

www-data 697140 162124 31432 R 68,8 2,0 23:22.21 php
www-data 600340 65572 31432 S 26,2 0,8 23:23.00 php
www-data 621680 86688 31432 S 46,2 1,1 23:24.39 php
www-data 613368 78504 31432 S 31,9 1,0 23:25.35 php
www-data 697140 162124 31432 S 63,4 2,0 23:27.26 php
www-data 612228 77184 31432 R 31,5 1,0 23:28.21 php
www-data 600340 65572 31432 R 42,1 0,8 23:29.48 php
www-data 697140 162124 31432 R 48,8 2,0 23:30.95 php
www-data 612484 76128 31432 R 50,4 1,0 23:32.47 php
www-data 616856 81936 31432 S 38,2 1,0 23:33.62 php
www-data 610840 75864 31432 R 34,5 1,0 23:34.66 php
www-data 697140 162124 31432 R 69,0 2,0 23:36.74 php
www-data 612476 76128 31432 S 29,9 1,0 23:37.64 php
www-data 612476 76128 31432 R 44,5 1,0 23:38.98 php
www-data 613400 78504 31432 S 29,9 1,0 23:39.88 php
www-data 600340 65572 31432 S 68,3 0,8 23:41.94 php
www-data 612520 77448 31432 S 32,5 1,0 23:42.92 php
www-data 600340 65572 31432 S 41,8 0,8 23:44.18 php
www-data 697140 162124 31432 R 52,8 2,0 23:45.77 php
www-data 600340 65572 31432 S 38,5 0,8 23:46.93 php
www-data 616848 81936 31432 R 35,9 1,0 23:48.01 php
www-data 612480 76128 31432 R 38,2 1,0 23:49.16 php
www-data 697140 162124 31432 R 64,1 2,0 23:51.09 php
www-data 612480 76128 31432 R 33,5 1,0 23:52.10 php
www-data 621712 86688 31432 S 44,1 1,1 23:53.43 php
www-data 613404 78504 31432 S 32,5 1,0 23:54.41 php
www-data 612476 76128 31432 R 65,7 1,0 23:56.39 php
www-data 612476 77448 31432 S 34,2 1,0 23:57.42 php
www-data 600340 65572 31432 S 41,5 0,8 23:58.67 php
www-data 697140 162124 31432 R 53,8 2,0 24:00.29 php
www-data 600340 65572 31432 S 47,1 0,8 24:01.71 php
www-data 621664 86688 31432 S 44,5 1,1 24:03.05 php
www-data 613360 78504 31432 S 34,2 1,0 24:04.08 php
www-data 697140 162124 31432 S 64,4 2,0 24:06.02 php
www-data 612568 76392 31432 R 29,2 1,0 24:06.90 php
www-data 600340 65572 31432 S 44,8 0,8 24:08.25 php
www-data 697140 162124 31432 R 46,8 2,0 24:09.66 php
www-data 612624 76128 31432 R 53,1 1,0 24:11.26 php
www-data 616860 81936 31432 S 38,2 1,0 24:12.41 php
www-data 612624 76656 31432 R 34,5 1,0 24:13.45 php
www-data 697140 162124 31432 R 71,0 2,0 24:15.59 php
www-data 600340 65572 31432 S 23,4 0,8 24:16.29 php
www-data 600340 65572 31432 R 30,9 0,8 24:16.30 php
www-data 610840 75864 31432 R 87,8 1,0 24:16.33 php
www-data 612556 76128 31432 R 94,0 1,0 24:16.36 php
www-data 612556 76128 31432 R 90,3 1,0 24:16.40 php
www-data 612556 76128 31432 R 100,0 1,0 24:16.44 php
www-data 612556 76128 31432 S 18,8 1,0 24:16.45 php
www-data 612556 76128 31432 R 84,4 1,0 24:16.50 php
www-data 612556 76128 31432 R 94,2 1,0 24:16.55 php
www-data 610840 75864 31432 R 43,5 1,0 24:17.86 php
www-data 686424 151368 31432 R 34,6 1,9 24:18.90 php
www-data 600340 65572 31432 S 65,7 0,8 24:20.88 php
www-data 616816 81936 31432 R 35,2 1,0 24:21.94 php
www-data 612580 76128 31432 S 39,2 1,0 24:23.12 php
www-data 697140 162124 31432 R 58,1 2,0 24:24.87 php
www-data 600340 65572 31432 S 37,2 0,8 24:25.99 php

PS: at this point, some more info from your script would be nice :-) just some output at all would be nice, like how much files are already completed or sth like that :-)

Correction: your script is not using much memory, it uses only 60mb of memory or sth like that...

About the problem about re executing your script, i cant say at the moment anything, because its still running and not crashed :-)

Thank you for your awesome work!!!!!
This script is now the best part about my cloud at all, you dont know how great this is, if it will work :-)

PS: is there any possibility that you can implement a command like "generate-new"
(means generate only images that are new and doesnt have thumbnails?)
Then we can make a cron Job, and i will get an orgasm xD

Cheers :-)

@Ramalama2
Copy link

PS to make it easy for evryone cron job example:

sudo crontab -u www-data -e
0 0 * * * php /server/WWW/nextcloud/occ preview:generate-all > /dev/null 2>&1

Means execute every day at 00am :-)

Cheers :-)

@Ramalama2
Copy link

Still running, uff it takes very long xD

8696 www-data 20 0 621692 84992 31224 R 44,1 1,1 209:39.39 php
8696 www-data 20 0 613368 76808 31224 S 32,8 1,0 209:40.38 php
8696 www-data 20 0 697204 160496 31224 S 61,0 2,0 209:42.22 php
8696 www-data 20 0 611924 74432 31224 R 29,5 0,9 209:43.11 php
8696 www-data 20 0 600288 63876 31224 S 40,5 0,8 209:44.33 php
8696 www-data 20 0 600288 63876 31224 S 28,6 0,8 209:45.19 php
8696 www-data 20 0 600288 63876 31224 S 64,1 0,8 209:47.12 php
8696 www-data 20 0 612212 75488 31224 R 28,6 1,0 209:47.98 php
8696 www-data 20 0 610736 74168 31224 R 41,1 0,9 209:49.22 php
8696 www-data 20 0 772836 236264 31224 R 41,8 3,0 209:50.48 php
8696 www-data 20 0 607092 70472 31224 R 88,3 0,9 209:53.14 php
8696 www-data 20 0 611620 74696 31224 R 30,2 0,9 209:54.05 php
8696 www-data 20 0 611620 74168 31224 S 36,5 0,9 209:55.15 php
8696 www-data 20 0 772836 236264 31224 R 52,1 3,0 209:56.72 php
8696 www-data 20 0 600288 63876 31224 S 86,0 0,8 209:59.31 php
8696 www-data 20 0 610696 74168 31224 R 29,9 0,9 210:00.21 php
8696 www-data 20 0 611588 74432 31224 S 39,2 0,9 210:01.39 php
8696 www-data 20 0 772836 236264 31224 R 61,4 3,0 210:03.24 php
8696 www-data 20 0 611592 74168 31224 R 73,3 0,9 210:05.45 php
8696 www-data 20 0 613440 76808 31224 S 32,9 1,0 210:06.44 php
8696 www-data 20 0 606560 69944 31224 R 34,2 0,9 210:07.47 php
8696 www-data 20 0 772836 236264 31224 R 66,0 3,0 210:09.46 php
8696 www-data 20 0 600288 63876 31224 S 70,7 0,8 210:11.59 php
8696 www-data 20 0 613444 76808 31224 S 31,2 1,0 210:12.53 php
8696 www-data 20 0 612124 75488 31224 R 39,2 1,0 210:13.71 php

210 Minutes :-)

Thats strange, maybe my cron job started again or sth like that, because ive started the job at 00am and that is 8hours, not 210minutes...

Would be nice if you can implement a check for already generated :-)

@rullzer
Copy link
Member

rullzer commented Dec 14, 2016

@Ramalama2 try ./occ preview:pre-generate that should only regerenate previews of touched files.

The thing is that this app does nothing to fancy. It requests the preview from the preview generator (in the server). If the preview is already there it just gets a reference to a file.

You are right that additional checks are required and some extra output would also be nice.

@Ramalama2
Copy link

ive tryed pre-generate command, but it runs only a half secound...

You mean, that after the time, ive installed the addon, new uploaded images get generated with pre-generate, not that images ive had before the addon in the cloud? then it makes sense :-)

@rullzer
Copy link
Member

rullzer commented Dec 14, 2016

Yeah as long as the app is enabled it will listen to stuff that gets edited. Add it to a list of files to parse. Then when you run pre-generate it will try to get previews of those.

@mightyBroccoli
Copy link
Author

What is the actual purpose of generate-all then?
I dont have dozents of GB of photos but there are a few and the pre-generation works but what is the purpose then of generate-all ?

@Ramalama2
Copy link

Rullzer explained at the post above:
If you have already a cloud with dozens of photos, and you install previewgenerator, you need to make once generate-all...

If you have already previewgenerator installed and you add new photos you make only pre-generate...

So generate-all you need in theory only once, for photos uploaded before you installed the addon...

Thanks rullzer for your great addon:-)

Ps generate-all is still running here, now its running since 450minutes and still consumes 90% of the cpu:-) but i have extremely much photos:-)

Will report back after its finished :-)

@mightyBroccoli
Copy link
Author

hmm ok I get that now.
The problem is I tested the function on 2 systems. One is completely clean and fresh just for testing this and one is my normal installation and generate-all generates an error is both instances.
I can run pre-generate with out any problems though.

@Loki3000
Copy link

I'm still not understand how to use it.
I launched occ preview:generate-all from console and after long-long time I've got /data/appdata_xxx/ folder with previews. But users previews still creates in /data/User/thumbnails.
What I was did wrong? Should I create symlinks /data/appdata_xxx/preview->/data/User/thumbnails?

@Ramalama2
Copy link

Thx for the info...

So generate-all worked, it runned about 18 hours now,
i have now a folder under data:

DATAFOLDER/appdata_oc89n0vui9tf/preview/... (3,5 GB)
with very much folders inside they named:
78674, 78678, 78682, 78686 till 181011

in this folder are thumbnails:
822 32-18.png
880 32-32-crop.png
977 56-32.png
1,1K 64-36.png
1,3K 64-64-crop.png
1,6K 113-64.png
1,8K 128-73.png
3,2K 226-128.png
3,8K 256-145.png
7,9K 452-256.png
9,5K 512-290.png
22K 904-512.png
28K 1024-580.png
67K 1808-1024.png
82K 2048-1160.png
82K 2048-1160-max.png

ive looked at the pictures they looks good.

Now the problem, if i open the gallery in nextcloud, the picture are still getting generated, nothing changed :-(((

like the guy above said, the folders are actually all in:
DATAFOLDER/appdata_oc89n0vui9tf/preview/
but they should be in:
DATAFOLDER/USER/thumbnails/

so my server worked useless for 18 hours xD

At the guy above (Loki3000):
How you want to symlink that folders? you dont know which folders are related to which user :-)
If you have only one user, it will work :-) But if you have more users, this will be problematic xD

I hope this is a simple fix... in the code xD

Cheers :-)

@Ramalama2
Copy link

PS: please add 400-400.png to your generation too... (thats the gallery overview format)
this is the only one missing :-)

Cheers :-)

@Loki3000
Copy link

@Ramalama2 I can make symlink to every user folder. Access to files controlled by php and every file has unique id. So it's possible as I see.

@Ramalama2
Copy link

@Loki3000 Yep, thinked about twice, you have right its possible, as a workaround... better as nothing :-)
But still missing that 400x400 previews for the gallery "browsing" :-)
that 400x400 pictures are the important ones for me :-)

@Loki3000
Copy link

@Ramalama2 It's strange but you right: there is no gallery sizes at all. I'm shocked!

@rullzer
Copy link
Member

rullzer commented Dec 15, 2016

So it seems I need to adjust the gallery app.
I can also create pregenerate 400x400 images. If that is request. please fill an issue with the additional sizes that are needed.

@Ramalama2
Copy link

Thank you so much:-)
I will check which puctures are needed:-)

@mightyBroccoli
Copy link
Author

Ok I just tested the generate-all function and it seams to work now. I didn't change anything with the app or the php environment. But now it works it is running since 2h and still running without errors. Hope is up.

@Ramalama2
Copy link

rullzer, this ones are missing:
400-400.png
600-400-with-aspect.png

everything else seems there :-)

What about the folders? :-)
appdata_xxx/preview instead of user/thumbnails ?
do we need manually symlink, or will you do some coding? :-)

Cheers :-)

@Loki3000
Copy link

Loki3000 commented Dec 16, 2016

400-400.png

It's strange: in my gallery base preview size is 200-200.png, 300-200-with-aspect.png and 133-200-with-aspect.png
Maybe it's based on some config? Gallery version is 16.0.0

@Akhenaton
Copy link

Akhenaton commented Dec 16, 2016

I have also 267-200-with-aspect.png, 150-200-with-aspect.png and some others.... I rather think it might depends of the original image size, or your screen, or ?..... There must be a logic to adjust the thumbnails size and number for each row on your screen.

@Loki3000
Copy link

Loki3000 commented Dec 16, 2016

Seems I found:
* Album thumbnails need to be 200x200 and some will be resized by the
* browser to 200x100 or 100x100.
* Standard thumbnails are 400x200.
Also gallery uses parameters $square and $scale. $scale depends on client device. If you resize browser to 200% - you get scale factor 2 and gallery will generate 400x400pix prewievs. Scale also could be less than 1.

Gallery requests thumbs from
https://mydomain/index.php/apps/gallery/thumbnails
with parameters
ids=11923;11927;11931;11935;11939;11943
requesttoken=xxxxx
scale=1
square=0

Where 'scale' depends on browser scale.

@Ramalama2
Copy link

@Loki3000
you have right, my laptop (OS X 10.12) uses hide scaled sizes, so normal images should be 200x200, but i need 400x400 too for hidpi clients :-)

I have a good solution, if @rullzer can add possibility to enter arguments, we can use commands like:
generate-all-100-100
generate-all-200-100
generate-all-400-400
generate-all-600-400-with-aspect
pre-generate-100-100
pre-generate-200-100
pre-generate-400-400
pre-generate-600-400-with-aspect

so everyone can add his own sizes needed, and the generator generates only that sizes, should be fast...

and we can make generate-all / pre-generate to generate the default sizes...

Cheers :-)

@Akhenaton
Copy link

Akhenaton commented Dec 16, 2016

Not an "end-user" solution...
Many of my users doesn't even know what scaling images means... and they all have differents machines...

@rullzer
Copy link
Member

rullzer commented Dec 16, 2016

Please open an issue with the requested sizes to keep the discussion separate.

@Loki3000
Copy link

@Akhenaton

Not an "end-user" solution...

Pre generation is by default non end-user solution.

@Ramalama2
Good idea! I don't need most of generated sizes. But I think that sizes must be send as a parameter (maybe several at once)

@rullzer
Copy link
Member

rullzer commented Mar 8, 2017

I still don't know what causes the error here. As I'm unable to fix it. Altough I'm thinking it might be an invalid image file.

Anyway I just merged #31 this kind of mitgates the problem as the next time you run the pre-generate command you will not try the faulty file again. So that at least the script can continue.

@rullzer
Copy link
Member

rullzer commented Mar 15, 2017

I think this is fixed in the server now. (So should be fixed in NC12). But I'm not sure. So lets keep it open for now.

@mightyBroccoli
Copy link
Author

I had some problems until some days ago where i just removed the addon and installed it again. Dont know if that makes any difference but now it works again, at least for now.

@rullzer
Copy link
Member

rullzer commented Mar 15, 2017

@mightyBroccoli I did release a new version so maybe a fix was in there that helped solve things a bit.

@rullzer
Copy link
Member

rullzer commented May 3, 2017

With Nextcloud 12 there are a lot of hardenings in the server that should help here. Please have a look and open a new issue if it persists.

@rullzer rullzer closed this as completed May 3, 2017
@mightyBroccoli
Copy link
Author

@rullzer I updated my testing system to 12 beta1. I will update this post in about 12 hours, because the cronjobs runs every 6 hours.

@mightyBroccoli
Copy link
Author

Until this moment i did not get any error messages anymore.
I will run preview:delete-old and generate-all but I am pretty sure there will be no error.
So all in all sweet it works :) at least if it runs correctly and not just mutes the error messages :D

@rullzer
Copy link
Member

rullzer commented May 5, 2017

Well it is a combination of both. If some image file is invalid it will of course skip it now. But we have no way to generate previews for it then ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants