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

Bug: Mail app 4.0.9 - Error Failed opening required '/nextcloud/apps/mail/vendor/composer/autoload_real.php' #10469

Open
ozgurkazancci opened this issue Dec 10, 2024 · 12 comments

Comments

@ozgurkazancci
Copy link

ozgurkazancci commented Dec 10, 2024

Steps to reproduce

Updated mail app to the latest version; 4.0.9

It produces errors below;

Error
Failed opening required '/var/www/nextcloud/apps/mail/vendor/composer/autoload_real.php' (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')
/var/www/nextcloud/apps/mail/composer/autoload.php
Line 5
undefinedundefinedrequire_once()
/var/www/nextcloud/lib/private/legacy/OC_App.php
Line 118
undefinedundefinedrequire_once(
  "/var/www/nextcloud/apps/mail/composer/autoload.php"
)
/var/www/nextcloud/lib/private/AppFramework/Bootstrap/Coordinator.php
Line 76
OC_App::registerAutoloading()
/var/www/nextcloud/lib/private/AppFramework/Bootstrap/Coordinator.php
Line 48
OC\AppFramework\Bootstrap\Coordinator->registerApps()
/var/www/nextcloud/lib/base.php
Line 659
OC\AppFramework\Bootstrap\Coordinator->runInitialRegistration()
/var/www/nextcloud/lib/base.php
Line 1134
OC::init()
/var/www/nextcloud/index.php
Line 22
undefinedundefinedrequire_once(
  "/var/www/nextcloud/lib/base.php"
)

Mail app version

4.0.9

Nextcloud version

30.0.3

PHP engine version

PHP 8.2

@ChristophWurst
Copy link
Member

The app store package does contain the file:

$ tar -tvf Downloads/mail-stable4.0.tar.gz 'mail/vendor/composer'
drwxr-xr-x runner/runner     0 2024-12-09 08:32 mail/vendor/composer/
-rw-r--r-- runner/runner   925 2024-12-09 08:31 mail/vendor/composer/platform_check.php
-rw-r--r-- runner/runner 182370 2024-12-09 08:31 mail/vendor/composer/autoload_classmap.php
-rw-r--r-- runner/runner  16143 2024-12-09 08:31 mail/vendor/composer/InstalledVersions.php
-rw-r--r-- runner/runner   2891 2024-12-09 08:31 mail/vendor/composer/autoload_psr4.php
-rw-r--r-- runner/runner   2422 2024-12-09 08:31 mail/vendor/composer/autoload_files.php
-rw-r--r-- runner/runner   1532 2024-12-09 08:31 mail/vendor/composer/autoload_real.php
-rw-r--r-- runner/runner   1704 2024-12-09 08:31 mail/vendor/composer/autoload_namespaces.php
-rw-r--r-- runner/runner  22475 2024-12-09 08:31 mail/vendor/composer/installed.php
-rw-r--r-- runner/runner   1070 2024-11-17 13:13 mail/vendor/composer/LICENSE
-rw-r--r-- runner/runner 211850 2024-12-09 08:31 mail/vendor/composer/autoload_static.php
-rw-r--r-- runner/runner 135395 2024-12-09 08:31 mail/vendor/composer/installed.json
-rw-r--r-- runner/runner  16378 2024-11-17 13:13 mail/vendor/composer/ClassLoader.php

Could you please check if

  1. The file exists on your disk?
  2. If it does, restarting your webserver helps?

@ozgurkazancci
Copy link
Author

Hello @ChristophWurst

[root@me:/var/www/nextcloud]# ls -al apps/mail/vendor/composer/

drwxr-xr-x   2 www  www     512 Dec  9 16:22 .
drwxr-xr-x  21 www  www     512 Dec  9 16:22 ..
-rw-r--r--   1 www  www   16378 Dec  9 16:22 ClassLoader.php
-rw-r--r--   1 www  www   16143 Dec  9 16:22 InstalledVersions.php
-rw-r--r--   1 www  www    1070 Dec  9 16:22 LICENSE
-rw-r--r--   1 www  www  182370 Dec  9 16:22 autoload_classmap.php
-rw-r--r--   1 www  www    2422 Dec  9 16:22 autoload_files.php
-rw-r--r--   1 www  www    1704 Dec  9 16:22 autoload_namespaces.php
-rw-r--r--   1 www  www    2891 Dec  9 16:22 autoload_psr4.php
-rw-r--r--   1 www  www    1532 Dec  9 16:22 autoload_real.php
-rw-r--r--   1 www  www  211850 Dec  9 16:22 autoload_static.php
-rw-r--r--   1 www  www  135395 Dec  9 16:22 installed.json
-rw-r--r--   1 www  www   22475 Dec  9 16:22 installed.php
-rw-r--r--   1 www  www     925 Dec  9 16:22 platform_check.php

So, it's there, yes.

Truncated the nextcloud.log file to 0, and then restarted the webserver, I'll keep you updated if the message persists.

Regards.

@ChristophWurst
Copy link
Member

Thank you. If the file exists I assume this might have been a problem with the PHP OPCache.

@ozgurkazancci
Copy link
Author

ozgurkazancci commented Dec 10, 2024

I have an opcache control panel like this:

https://i.ibb.co/Gp1zj2x/op1.png

And the status of the file under cached files:

https://ibb.co/gm5xhB7

If this helps to clarify the things.

@ChristophWurst
Copy link
Member

Do I understand correctly that the error is no longer thrown and opcache reports the file as cached?

@kinghat
Copy link

kinghat commented Dec 18, 2024

im also getting this error with:

require_once(/config/www/nextcloud/apps/mail/vendor/autoload.php): Failed to open stream: No such file or directory at /config/www/nextcloud/apps/mail/composer/autoload.php#5

Error Failed opening required '/config/www/nextcloud/apps/mail/composer/../vendor/autoload.php' (include_path='/app/www/public/3rdparty/pear/archive_tar:/app/www/public/3rdparty/pear/console_getopt:/app/www/public/3rdparty/pear/pear-core-minimal/src:/app/www/public/3rdparty/pear/pear_exception:/app/www/public/apps')

Error: Failed opening required '/config/www/nextcloud/apps/mail/composer/../vendor/autoload.php' (include_path='/app/www/public/3rdparty/pear/archive_tar:/app/www/public/3rdparty/pear/console_getopt:/app/www/public/3rdparty/pear/pear-core-minimal/src:/app/www/public/3rdparty/pear/pear_exception:/app/www/public/apps') at /config/www/nextcloud/apps/mail/composer/autoload.php#5

also from the admin panel:

The PHP OPcache module is not properly configured. The OPcache buffer is nearly full. To assure that all scripts can be hold in cache, it is recommended to apply "opcache.memory_consumption" to your PHP configuration with a value higher than "128".. For more details see the documentation ↗.

ive actually never had my mail actually load after many months and attempts at adding my account because of this iirc: #9102

@ChristophWurst
Copy link
Member

Dear @kinghat, thank you for sharing your feedback. Do you mind telling us the version of the app deployment you're running right now, whether the file exists on storage and if you have cleared your opcache? Thank you.

@kinghat
Copy link

kinghat commented Dec 18, 2024

Do you mind telling us the version of the app deployment you're running right now

Version 4.1.0

whether the file exists on storage and if you have cleared your opcache?

the file /config/www/nextcloud/apps/mail/composer/autoload.php exists. im not sure how you clear the opcache. im running the LSIO nextcloud container.

@ChristophWurst
Copy link
Member

Dear @kinghat, please have a look at https://ma.ttias.be/how-to-clear-php-opcache/. There are also some other guides. It depends on your system. You should be able to find out what's appropriate for your deployment. Thank you.

@kinghat
Copy link

kinghat commented Dec 18, 2024

Dear @kinghat, please have a look at https://ma.ttias.be/how-to-clear-php-opcache/. There are also some other guides. It depends on your system. You should be able to find out what's appropriate for your deployment. Thank you.

i just did a pull and restart on my compose and that cache msg seems to have gone. back to these:

ServiceException Sync failed for 2:INBOX: An exception occurred while executing a query: SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column 'in_reply_to' at row 1
Cron mail sync failed for account 2

ServiceException Sync failed for 2:[Gmail]/All Mail: An exception occurred while executing a query: SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column 'in_reply_to' at row 1

but i think those are the other issue. thanks for your time 🙏

@SebastianKrupinski
Copy link
Contributor

ServiceException Sync failed for 2:INBOX: An exception occurred while executing a query: SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column 'in_reply_to' at row 1
Cron mail sync failed for account 2

@kinghat
That field is 1023 characters long, its odd that the thread ID would be that long. Can you post the entire error? So we can see if the uid of the message is shown. We need to pull the raw message that is causing this to see why this field is too short.

Alternatively you can manually adjust the database field to 2024 characters or event 4096 if needed. Then I can give you a query to find the message causing the problem.

@SebastianKrupinski
Copy link
Contributor

SebastianKrupinski commented Dec 18, 2024

@kinghat also we should probably continue the chat on your other issue in a new ticket, so we don't pollute tickets with unrelated conversations.

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

No branches or pull requests

4 participants