YunoHost-Apps / hubzilla_ynh

Hubzilla Hub package for YunoHost
https://zotlabs.org/page/hubzilla/hubzilla-project
GNU General Public License v3.0
15 stars 9 forks source link

no pictures management after restoration #41

Closed petesimonic closed 1 year ago

petesimonic commented 3 years ago

Hello! After instance restoration from backup file Hubzilla users lost ability to insert pictures into their posts. When you add a picture it lands as a file attachment. And Photos app returns "ERROR: there was an error creating the output." Along with some previous photos.

This restoration happened between Ynh releases. So backup was made at Debian 9 and restoration implemented at Debian 10.

What are possible solutions for this problem?

anmol26s commented 3 years ago

Helloo,

First thing first, please keep your Debian 9 backup safe before doing any of the troubleshooting. The backup is there in /home/yunohost.backup/archives/.

Quick guess: You may require a missing module of php. By your inputs given, you would be on php7.2. So running this, may solve your problems:

$ apt-get install php7.2-gd php7.2-imagick

For details look at it you will need to provide logs. Hubzilla on Yunohost provides php logs in /var/www/hubzilla/php.log asuming that Hubzilla was installed one time only. Otherwise it would be /var/www/hubzilla__2/php.log and so on.

You may activate the logs from your Hubzilla admin interface by giving above line in the box provided and paste it here after trying to upload the file again.

or directly see logs:

$ tail -n 50 /var/www/hubzilla/php.log

petesimonic commented 3 years ago

Of course I would be happy to apply quickfix. But it seems like I'm doing something wrong.

admin@sophy:~$ sudo apt update 
Hit:1 http://security.debian.org buster/updates InRelease
Hit:2 http://deb.debian.org/debian buster InRelease                           
Hit:3 http://deb.debian.org/debian buster-updates InRelease                   
Hit:4 http://deb.debian.org/debian buster-backports InRelease                 
Hit:5 http://mirror.hetzner.de/debian/packages buster InRelease                  
Hit:6 http://mirror.hetzner.de/debian/packages buster-updates InRelease          
Hit:7 http://mirror.hetzner.de/debian/packages buster-backports InRelease
Hit:8 http://mirror.hetzner.de/debian/security buster/updates InRelease
Hit:9 http://forge.yunohost.org/debian buster InRelease
Reading package lists... Done
Building dependency tree       
Reading state information... Done
All packages are up to date.
admin@sophy:~$ sudo apt-get install php7.2-gd php7.2-imagick
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package php7.2-gd
E: Couldn't find any package by glob 'php7.2-gd'
E: Couldn't find any package by regex 'php7.2-gd'
E: Unable to locate package php7.2-imagick
E: Couldn't find any package by glob 'php7.2-imagick'
E: Couldn't find any package by regex 'php7.2-imagick'

Thank you and sorry for the lame question!

anmol26s commented 3 years ago

Maybe try $ apt-get install php7.3-gd php7.3-imagick

petesimonic commented 3 years ago
admin@sophy:~$ sudo apt-get install php7.3-gd php7.3-imagick
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Note, selecting 'php-imagick' instead of 'php7.3-imagick'
php-imagick is already the newest version (3.4.3-4.1).
php7.3-gd is already the newest version (7.3.19-1~deb10u1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

Wow, <admin/logs/> returns "ERROR: there was an error creating the output." instead of settings page. Tried tail command, and it gave me only identical records from Sep when migration wasn't even coming for me.

anmol26s commented 3 years ago

You may want to ask about this error on the Hubzilla support channel. I am not able to reproduce it.

anmol26s commented 3 years ago

Can you show the logs? The logs are there under admin->logs. Put the file name as php.log and try to insert pics. It would be nice if you can give the nginx logs too. tail -n 100 /var/logs/nginx/domain-error.log

petesimonic commented 3 years ago

Sure! But it feels broken too. =(( I tried to post another picture but can't see it in logs. image


admin@sophy:~$ sudo tail -n 100 /var/log/nginx/hub.sophy.life-error.log
admin@sophy:~$ ls -lah /var/log/nginx/hub.sophy.life-error.log
-rw-r----- 1 www-data adm 0 Oct 23 00:00 
/var/log/nginx/hub.sophy.life-error.log
admin@sophy:~$ ls -lah /var/log/nginx/hub.sophy.life*
-rw-r----- 1 www-data adm  301K Oct 23 11:22 
/var/log/nginx/hub.sophy.life-access.log
-rw-r----- 1 www-data adm  773K Oct 22 23:58 
/var/log/nginx/hub.sophy.life-access.log.1
-rw-r----- 1 www-data adm   26K Oct 13 23:52 
/var/log/nginx/hub.sophy.life-access.log.10.gz
-rw-r--r-- 1 root     root  54K Oct 13 00:00 
/var/log/nginx/hub.sophy.life-access.log.11.gz
-rw-r----- 1 www-data adm   37K Oct 21 23:51 
/var/log/nginx/hub.sophy.life-access.log.2.gz
-rw-r----- 1 www-data adm   60K Oct 20 23:53 
/var/log/nginx/hub.sophy.life-access.log.3.gz
-rw-r----- 1 www-data adm   20K Oct 19 23:59 
/var/log/nginx/hub.sophy.life-access.log.4.gz
-rw-r----- 1 www-data adm   22K Oct 18 23:58 
/var/log/nginx/hub.sophy.life-access.log.5.gz
-rw-r----- 1 www-data adm   22K Oct 17 23:43 
/var/log/nginx/hub.sophy.life-access.log.6.gz
-rw-r----- 1 www-data adm   30K Oct 16 23:57 
/var/log/nginx/hub.sophy.life-access.log.7.gz
-rw-r----- 1 www-data adm   28K Oct 16 00:00 
/var/log/nginx/hub.sophy.life-access.log.8.gz
-rw-r----- 1 www-data adm   24K Oct 14 23:57 
/var/log/nginx/hub.sophy.life-access.log.9.gz
-rw-r----- 1 www-data adm     0 Oct 23 00:00 
/var/log/nginx/hub.sophy.life-error.log
-rw-r----- 1 www-data adm   781 Oct 22 11:18 
/var/log/nginx/hub.sophy.life-error.log.1
-rw-r----- 1 www-data adm   396 Oct 21 11:40 
/var/log/nginx/hub.sophy.life-error.log.2.gz
-rw-r----- 1 www-data adm   557 Oct 20 16:40 
/var/log/nginx/hub.sophy.life-error.log.3.gz
-rw-r----- 1 www-data adm   533 Oct 17 22:53 
/var/log/nginx/hub.sophy.life-error.log.4.gz
-rw-r----- 1 www-data adm   632 Oct 16 12:30 
/var/log/nginx/hub.sophy.life-error.log.5.gz
-rw-r----- 1 www-data adm   395 Oct 14 15:02 
/var/log/nginx/hub.sophy.life-error.log.6.gz
-rw-r--r-- 1 root     root  558 Oct 12 11:32 
/var/log/nginx/hub.sophy.life-error.log.7.gz
admin@sophy:~$ sudo tail -n 100 /var/log/nginx/hub.sophy.life-error.log.1
2020/10/22 00:26:36 [error] 22801#22801: *242223 FastCGI sent in stderr:
"PHP message: PHP Warning:
fopen(store/gosh_x/aef7e55b-d4ec-45e9-b5f7-6b50ef34a026/4af140a4-7be0-432e-945d-ef93299d6f24):
failed to open stream: Permission denied in
/var/www/hubzilla/Zotlabs/Module/Attach.php on line 45" while reading
response header from upstream, client: 185.191.171.14, server:
hub.sophy.life, request: "GET
/attach/4af140a4-7be0-432e-945d-ef93299d6f24/0 HTTP/1.1", upstream:
"fastcgi://unix:/var/run/php/php7.0-fpm-hubzilla.sock:", host:
"hub.sophy.life"
2020/10/22 11:18:00 [error] 22801#22801: *254729 access forbidden by
rule, client: 2a01:a380:4408:e80:0:cc4:7ac7:64ec, server:
hub.sophy.life, request: "POST /channel/petesim/.well-known/zot-info
HTTP/1.1", host: "hub.sophy.life"

admin@sophy:~$ tail -n 50 /var/www/hubzilla/php.log
[15-Sep-2020 20:50:17 America/Los_Angeles] PHP Warning:  Invalid
argument supplied for foreach() in /var/www/hubzilla/include/plugin.php
on line 208
[15-Sep-2020 20:50:17 America/Los_Angeles] PHP Warning:  Invalid
argument supplied for foreach() in /var/www/hubzilla/include/plugin.php
on line 208
[15-Sep-2020 20:50:17 America/Los_Angeles] PHP Warning:  Invalid
argument supplied for foreach() in /var/www/hubzilla/include/plugin.php
on line 208
[15-Sep-2020 20:50:17 America/Los_Angeles] PHP Warning:  Invalid
argument supplied for foreach() in /var/www/hubzilla/include/plugin.php
on line 208
[15-Sep-2020 20:50:17 America/Los_Angeles] PHP Warning:  Invalid
argument supplied for foreach() in /var/www/hubzilla/include/plugin.php
on line 208
[15-Sep-2020 20:50:17 America/Los_Angeles] PHP Warning:  Invalid
argument supplied for foreach() in /var/www/hubzilla/include/plugin.php
on line 208
[15-Sep-2020 21:00:11 America/Los_Angeles] PHP Warning:  Error while
sending QUERY packet. PID=13193 in
/var/www/hubzilla/include/dba/dba_pdo.php on line 74
[15-Sep-2020 21:00:19 America/Los_Angeles] PHP Warning:  Invalid
argument supplied for foreach() in /var/www/hubzilla/include/plugin.php
on line 208
[15-Sep-2020 21:00:19 America/Los_Angeles] PHP Warning:  Invalid
argument supplied for foreach() in /var/www/hubzilla/include/plugin.php
on line 208
[15-Sep-2020 21:00:19 America/Los_Angeles] PHP Warning:  Invalid
argument supplied for foreach() in /var/www/hubzilla/include/plugin.php
on line 208
[15-Sep-2020 21:00:19 America/Los_Angeles] PHP Warning:  Invalid
argument supplied for foreach() in /var/www/hubzilla/include/plugin.php
on line 208
[15-Sep-2020 21:00:19 America/Los_Angeles] PHP Warning:  Invalid
argument supplied for foreach() in /var/www/hubzilla/include/plugin.php
on line 208
[15-Sep-2020 21:00:19 America/Los_Angeles] PHP Warning:  Invalid
argument supplied for foreach() in /var/www/hubzilla/include/plugin.php
on line 208
[15-Sep-2020 21:00:19 America/Los_Angeles] PHP Warning:  Invalid
argument supplied for foreach() in /var/www/hubzilla/include/plugin.php
on line 208
[15-Sep-2020 21:00:19 America/Los_Angeles] PHP Warning:  Invalid
argument supplied for foreach() in /var/www/hubzilla/include/plugin.php
on line 208
[15-Sep-2020 21:00:19 America/Los_Angeles] PHP Warning:  Invalid
argument supplied for foreach() in /var/www/hubzilla/include/plugin.php
on line 208
[15-Sep-2020 21:00:19 America/Los_Angeles] PHP Warning:  Invalid
argument supplied for foreach() in /var/www/hubzilla/include/plugin.php
on line 208
[15-Sep-2020 21:00:19 America/Los_Angeles] PHP Warning:  Invalid
argument supplied for foreach() in /var/www/hubzilla/include/plugin.php
on line 208
[15-Sep-2020 21:00:19 America/Los_Angeles] PHP Warning:  Invalid
argument supplied for foreach() in /var/www/hubzilla/include/plugin.php
on line 208
[15-Sep-2020 21:00:19 America/Los_Angeles] PHP Warning:  Invalid
argument supplied for foreach() in /var/www/hubzilla/include/plugin.php
on line 208
[15-Sep-2020 21:00:19 America/Los_Angeles] PHP Warning:  Invalid
argument supplied for foreach() in /var/www/hubzilla/include/plugin.php
on line 208
[15-Sep-2020 21:00:19 America/Los_Angeles] PHP Warning:  Invalid
argument supplied for foreach() in /var/www/hubzilla/include/plugin.php
on line 208
[15-Sep-2020 21:00:19 America/Los_Angeles] PHP Warning:  Invalid
argument supplied for foreach() in /var/www/hubzilla/include/plugin.php
on line 208
[15-Sep-2020 21:00:19 America/Los_Angeles] PHP Warning:  Invalid
argument supplied for foreach() in /var/www/hubzilla/include/plugin.php
on line 208
[15-Sep-2020 21:00:19 America/Los_Angeles] PHP Warning:  Invalid
argument supplied for foreach() in /var/www/hubzilla/include/plugin.php
on line 208
[15-Sep-2020 21:00:19 America/Los_Angeles] PHP Warning:  Invalid
argument supplied for foreach() in /var/www/hubzilla/include/plugin.php
on line 208
[15-Sep-2020 21:00:19 America/Los_Angeles] PHP Warning:  Invalid
argument supplied for foreach() in /var/www/hubzilla/include/plugin.php
on line 208
[15-Sep-2020 21:00:19 America/Los_Angeles] PHP Warning:  Invalid
argument supplied for foreach() in /var/www/hubzilla/include/plugin.php
on line 208
[15-Sep-2020 21:10:10 America/Los_Angeles] PHP Warning:  Error while
sending QUERY packet. PID=14894 in
/var/www/hubzilla/include/dba/dba_pdo.php on line 74
[15-Sep-2020 21:10:18 America/Los_Angeles] PHP Warning:  Invalid
argument supplied for foreach() in /var/www/hubzilla/include/plugin.php
on line 208
[15-Sep-2020 21:10:18 America/Los_Angeles] PHP Warning:  Invalid
argument supplied for foreach() in /var/www/hubzilla/include/plugin.php
on line 208
[15-Sep-2020 21:10:18 America/Los_Angeles] PHP Warning:  Invalid
argument supplied for foreach() in /var/www/hubzilla/include/plugin.php
on line 208
[15-Sep-2020 21:10:18 America/Los_Angeles] PHP Warning:  Invalid
argument supplied for foreach() in /var/www/hubzilla/include/plugin.php
on line 208
[15-Sep-2020 21:10:18 America/Los_Angeles] PHP Warning:  Invalid
argument supplied for foreach() in /var/www/hubzilla/include/plugin.php
on line 208
[15-Sep-2020 21:10:18 America/Los_Angeles] PHP Warning:  Invalid
argument supplied for foreach() in /var/www/hubzilla/include/plugin.php
on line 208
[15-Sep-2020 21:10:18 America/Los_Angeles] PHP Warning:  Invalid
argument supplied for foreach() in /var/www/hubzilla/include/plugin.php
on line 208
[15-Sep-2020 21:10:18 America/Los_Angeles] PHP Warning:  Invalid
argument supplied for foreach() in /var/www/hubzilla/include/plugin.php
on line 208
[15-Sep-2020 21:10:18 America/Los_Angeles] PHP Warning:  Invalid
argument supplied for foreach() in /var/www/hubzilla/include/plugin.php
on line 208
[15-Sep-2020 21:10:18 America/Los_Angeles] PHP Warning:  Invalid
argument supplied for foreach() in /var/www/hubzilla/include/plugin.php
on line 208
[15-Sep-2020 21:10:18 America/Los_Angeles] PHP Warning:  Invalid
argument supplied for foreach() in /var/www/hubzilla/include/plugin.php
on line 208
[15-Sep-2020 21:10:18 America/Los_Angeles] PHP Warning:  Invalid
argument supplied for foreach() in /var/www/hubzilla/include/plugin.php
on line 208
[15-Sep-2020 21:10:18 America/Los_Angeles] PHP Warning:  Invalid
argument supplied for foreach() in /var/www/hubzilla/include/plugin.php
on line 208
[15-Sep-2020 21:10:18 America/Los_Angeles] PHP Warning:  Invalid
argument supplied for foreach() in /var/www/hubzilla/include/plugin.php
on line 208
[15-Sep-2020 21:10:18 America/Los_Angeles] PHP Warning:  Invalid
argument supplied for foreach() in /var/www/hubzilla/include/plugin.php
on line 208
[15-Sep-2020 21:10:18 America/Los_Angeles] PHP Warning:  Invalid
argument supplied for foreach() in /var/www/hubzilla/include/plugin.php
on line 208
[15-Sep-2020 21:10:18 America/Los_Angeles] PHP Warning:  Invalid
argument supplied for foreach() in /var/www/hubzilla/include/plugin.php
on line 208
[15-Sep-2020 21:10:18 America/Los_Angeles] PHP Warning:  Invalid
argument supplied for foreach() in /var/www/hubzilla/include/plugin.php
on line 208
[15-Sep-2020 21:10:18 America/Los_Angeles] PHP Warning:  Invalid
argument supplied for foreach() in /var/www/hubzilla/include/plugin.php
on line 208
[15-Sep-2020 21:10:18 America/Los_Angeles] PHP Warning:  Invalid
argument supplied for foreach() in /var/www/hubzilla/include/plugin.php
on line 208
[15-Sep-2020 21:10:18 America/Los_Angeles] PHP Warning:  Invalid
argument supplied for foreach() in /var/www/hubzilla/include/plugin.php
on line 208
anmol26s commented 3 years ago

You can upgrade and see if this fixes it.

petesimonic commented 3 years ago

It worked! Thank you! )

petesimonic commented 3 years ago

I'm sorry, but after [next upgrade][https://github.com/YunoHost-Apps/hubzilla_ynh/issues/57] this reverted to previous condition. The picture user wanted to include into the entry was laid as attachment.

And when tried to workaround via uploading it directly to gallery first it just doesn't appear there. The progress bar after upload button hit runs to 100%, and no new image appear in the gallery, even after page refresh.

rocky-III commented 2 years ago

I have a similar problem by uploading and embedding large images

If i try to insert a new image by the "Attach/ Upload" button is woks just fine with small Images but when i upload an image with the since larger than 2MB the image is NOT uploaded right.

THANKS for HELP

rocky-III commented 2 years ago

I found a solution for my issue:

i edited the file

/etc/php/7.3/fpm/pool.d/hubzilla.conf where i uncommented the lines:

php_admin_value[upload_max_filesize] = 50M
php_admin_value[post_max_size] = 50M

Uploads are working now !!

Maybe this can solve your issue too @petesimonic

petesimonic commented 2 years ago

Thanks! Although I see that users more wandered about Wallabag fresh versions and FreshRSS performance. They tend to see Hz as a fun toy, but not as a primary tool.

rocky-III commented 2 years ago

HZ is working with Yunohost very well... and you have the option to update your HZ installation by this command: $ yunohost app upgrade -u https://github.com/YunoHost-Apps/hubzilla_ynh hubzilla --force

ericgaspar commented 1 year ago

should be fixed by #120