major-mayer / imageconverter

A simple Nextcloud app to convert HEIC/ HEIF images to JPEG
GNU Affero General Public License v3.0
21 stars 2 forks source link

Cant find autoload.php #5

Closed Ergerbolt closed 2 years ago

Ergerbolt commented 2 years ago
Operating system: Linux 5.10.63-v7l+ #1459 SMP Wed Oct 6 16:41:57 BST 2021 armv7l

Webserver: Apache (fpm-fcgi)

Database: mysql 10.3.31

PHP version: 7.3.31-1~deb10u1

Modules loaded: Core, date, libxml, openssl, pcre, zlib, filter, hash, Reflection, SPL, sodium, session, standard, cgi-fcgi, mysqlnd, PDO, xml, bcmath, bz2, calendar, ctype, curl, dom, mbstring, fileinfo, ftp, gd, gettext, gmp, iconv, igbinary, imagick, intl, json, ldap, exif, mysqli, pdo_mysql, Phar, posix, readline, redis, shmop, SimpleXML, smbclient, sockets, sysvmsg, sysvsem, sysvshm, tokenizer, wddx, xmlreader, xmlwriter, xsl, zip, libsmbclient, Zend OPcache

Nextcloud version: 21.0.4 - 21.0.4.1

Hi,

i have massive log spaming because the system cant find the autoload.php:

Error | PHP | Error: include_once(): Failed opening '/var/www/nextcloud/apps/imageconverter/lib/AppInfo/../../vendor/autoload.php' for inclusion (include_path='/var/www/nextcloud/3rdparty/pear/archive_tar:/var/www/nextcloud/3rdparty/pear/console_getopt:/var/www/nextcloud/3rdparty/pear/pear-core-minimal/src:/var/www/nextcloud/3rdparty/pear/pear_exception:/var/www/nextcloud/apps') at /var/www/nextcloud/apps/imageconverter/lib/AppInfo/Application.php#37/var/www/nextcloud/apps/imageconverter/lib/AppInfo/Application.php - line 37:OC\Log\ErrorHandler::onError(2, "include_onc ... )", "/var/www/ne ... p", 37, { context: c ... }})/var/www/nextcloud/apps/imageconverter/lib/AppInfo/Application.php - line 37:include_once()/var/www/nextcloud/lib/private/AppFramework/Bootstrap/Coordinator.php - line 125:OCA\ImageConverter\AppInfo\Application->register(class@anonym ... {})/var/www/nextcloud/lib/private/AppFramework/Bootstrap/Coordinator.php - line 82:OC\AppFramework\Bootstrap\Coordinator->registerApps([ "files","a ... "])/var/www/nextcloud/lib/base.php - line 634:OC\AppFramework\Bootstrap\Coordinator->runInitialRegistration()/var/www/nextcloud/lib/base.php - line 1076:OC::init()/var/www/nextcloud/ocs/v1.php - line 32:require_once("/var/www/ne ... p")/var/www/nextcloud/ocs/v2.php - line 24:require_once("/var/www/nextcloud/ocs/v1.php")
-- | -- | --

Is there a way to fix? My HEIC files are even not previewed. I installed imagick as it is necessary.

stelioskat commented 2 years ago

I see countless, neverending error logs about this problem. However, the plugin works seems to work. I am able to convert images. The logs:

Error: include_once(): Failed opening '/var/www/html/custom_apps/imageconverter/lib/AppInfo/../../vendor/autoload.php' for inclusion (include_path='/var/www/html/3rdparty/pear/archive_tar:/var/www/html/3rdparty/pear/console_getopt:/var/www/html/3rdparty/pear/pear-core-minimal/src:/var/www/html/3rdparty/pear/pear_exception:/var/www/html/apps:/var/www/html/custom_apps') at /var/www/html/custom_apps/imageconverter/lib/AppInfo/Application.php#37
0. /var/www/html/custom_apps/imageconverter/lib/AppInfo/Application.php - line 37:
OC\Log\ErrorHandler::onError(2, "include_onc ... )", "/var/www/ht ... p", 37, { context: c ... }})
1. /var/www/html/custom_apps/imageconverter/lib/AppInfo/Application.php - line 37:
include_once()
2. /var/www/html/lib/private/AppFramework/Bootstrap/Coordinator.php - line 125:
OCA\ImageConverter\AppInfo\Application->register(class@anonym ... {})
3. /var/www/html/lib/private/AppFramework/Bootstrap/Coordinator.php - line 82:
OC\AppFramework\Bootstrap\Coordinator->registerApps([ "files","a ... "])
4. /var/www/html/lib/base.php - line 634:
OC\AppFramework\Bootstrap\Coordinator->runInitialRegistration()
5. /var/www/html/lib/base.php - line 1076:
OC::init()
6. /var/www/html/index.php - line 35:
require_once("/var/www/html/lib/base.php")
major-mayer commented 2 years ago

Hmm unfortunately I can't reproduce this on my end. I don't have any log spam. The section that the stack trace marks, doesn't do anything special where the error could happen.

public function boot(IBootContext $context): void
    {
        // ... boot logic goes here ...

        /** @var IEventDispatcher $dispatcher */
        $dispatcher = $context->getAppContainer()->get(IEventDispatcher::class);
        // TODO this creates some deprecation warnings!
        $dispatcher->addListener('OCA\Files::loadAdditionalScripts', function () {
            Util::addScript('imageconverter', 'imageConverterScript');
        });
    }

This is just the part, where the Javascript gets loaded. The actual error seems to happen in some error handler OC\Log\ErrorHandler::onError.

So I don't know what's going on here and can't fix this. Sorry... Maybe you could try upgrading to Nextcloud 22 and see if the error persists. If anyone else has an idea, please write me.

major-mayer commented 2 years ago

And for the missing HEIC previews you have to adjust your Nextcloud server settings: https://github.com/nextcloud/previewgenerator/issues/230

stelioskat commented 2 years ago

Updating to the latest NextCloud version solved the issue for me.

major-mayer commented 2 years ago

Wonderful, glad that it works now :)

major-mayer commented 2 years ago

Did it also solve the issue for you @Ergerbolt ?

Ergerbolt commented 2 years ago

How can i update to version 22? It is not offered by nextcloupi. It says, there is nothing to update on my pi4.

major-mayer commented 2 years ago

According to their Readme, Nextcloudpi already supports NC 22 : https://github.com/nextcloud/nextcloudpi But maybe something is wrong with their automated build. You should ask the maintainers there.

stelioskat commented 2 years ago

If you have hosted it with Docker, the autoupdater is disabled on purpose. You need to stop your container, delete the old container, pull the latest image (docker.io/library/nextcloud:22) and start nextcloud with this image. However, I don't use it on a RPi, so I am not sure if there are any specialties for it.