nextcloud / mail

💌 Mail app for Nextcloud
https://apps.nextcloud.com/apps/mail
GNU Affero General Public License v3.0
846 stars 259 forks source link

1.13.0 is missing vendor/composer/include_paths.php #6657

Closed bdrewery closed 2 months ago

bdrewery commented 2 years ago

Steps to reproduce

  1. occ app:update mail
  2. Load any page

Expected behavior

No errors.

Actual behavior

[mail] Fatal: Error during app service registration: Failed opening required '/usr/home/nextcloud/public_html/apps-local/mail/vendor/composer/include_paths.php' (include_path='/usr/home/nextcloud/public_html/nextcloud/3rdparty/pear/archive_tar:/usr/home/nextcloud/public_html/nextcloud/3rdparty/pear/console_getopt:/usr/home/nextcloud/public_html/nextcloud/3rdparty/pear/pear-core-minimal/src:/usr/home/nextcloud/public_html/nextcloud/3rdparty/pear/pear_exception:/home/nextcloud/public_html/apps-local:/home/nextcloud/public_html/nextcloud/apps')

GET /apps/logreader/poll?lastReqId=37cv8C8nJBgY8Nyprvlt
from 10.10.11.26 at 2022-06-03T08:36:15-07:00
% ls /usr/home/nextcloud/public_html/apps-local/mail/vendor/composer
./                       ClassLoader.php          LICENSE                  autoload_files.php       autoload_psr4.php        autoload_static.php      installed.php
../                      InstalledVersions.php    autoload_classmap.php    autoload_namespaces.php  autoload_real.php        installed.json           platform_check.php
{
  "reqId": "0wiE73asPjQ2YhNct5tY",
  "level": 4,
  "time": "2022-06-03T08:36:15-07:00",
  "remoteAddr": "10.10.11.26",
  "user": "--",
  "app": "mail",
  "method": "GET",
  "url": "/apps/logreader/poll?lastReqId=37cv8C8nJBgY8Nyprvlt",
  "message": "Error during app service registration: Failed opening required '/usr/home/nextcloud/public_html/apps-local/mail/vendor/composer/include_paths.php' (include_path='/usr/home/nextcloud/public_html/nextcloud/3rdparty/pear/archive_tar:/usr/home/nextcloud/public_html/nextcloud/3rdparty/pear/console_getopt:/usr/home/nextcloud/public_html/nextcloud/3rdparty/pear/pear-core-minimal/src:/usr/home/nextcloud/public_html/nextcloud/3rdparty/pear/pear_exception:/home/nextcloud/public_html/apps-local:/home/nextcloud/public_html/nextcloud/apps')",
  "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.54 Safari/537.36 Edg/101.0.1210.39",
  "version": "23.0.5.1",
  "exception": {
    "Exception": "Error",
    "Message": "Failed opening required '/usr/home/nextcloud/public_html/apps-local/mail/vendor/composer/include_paths.php' (include_path='/usr/home/nextcloud/public_html/nextcloud/3rdparty/pear/archive_tar:/usr/home/nextcloud/public_html/nextcloud/3rdparty/pear/console_getopt:/usr/home/nextcloud/public_html/nextcloud/3rdparty/pear/pear-core-minimal/src:/usr/home/nextcloud/public_html/nextcloud/3rdparty/pear/pear_exception:/home/nextcloud/public_html/apps-local:/home/nextcloud/public_html/nextcloud/apps')",
    "Code": 0,
    "Trace": [
      {
        "file": "/usr/home/nextcloud/public_html/apps-local/mail/vendor/autoload.php",
        "line": 7,
        "function": "getLoader",
        "class": "ComposerAutoloaderInit5d823937e541e193b9ecd136ff958eb4",
        "type": "::"
      },
      {
        "file": "/usr/home/nextcloud/public_html/apps-local/mail/lib/AppInfo/Application.php",
        "line": 79,
        "args": [
          "/usr/home/nextcloud/public_html/apps-local/mail/vendor/autoload.php"
        ],
        "function": "include_once"
      },
      {
        "file": "/usr/home/nextcloud/public_html/nextcloud/lib/composer/composer/ClassLoader.php",
        "line": 571,
        "args": [
          "/usr/home/nextcloud/public_html/apps-local/mail/lib/AppInfo/Application.php"
        ],
        "function": "include"
      },
      {
        "file": "/usr/home/nextcloud/public_html/nextcloud/lib/composer/composer/ClassLoader.php",
        "line": 428,
        "function": "Composer\\Autoload\\includeFile"
      },
      {
        "function": "loadClass",
        "class": "Composer\\Autoload\\ClassLoader",
        "type": "->"
      },
      {
        "file": "/usr/home/nextcloud/public_html/nextcloud/lib/private/AppFramework/Bootstrap/Coordinator.php",
        "line": 120,
        "function": "class_exists"
      },
      {
        "file": "/usr/home/nextcloud/public_html/nextcloud/lib/private/AppFramework/Bootstrap/Coordinator.php",
        "line": 85,
        "function": "registerApps",
        "class": "OC\\AppFramework\\Bootstrap\\Coordinator",
        "type": "->"
      },
      {
        "file": "/usr/home/nextcloud/public_html/nextcloud/lib/base.php",
        "line": 640,
        "function": "runInitialRegistration",
        "class": "OC\\AppFramework\\Bootstrap\\Coordinator",
        "type": "->"
      },
      {
        "file": "/usr/home/nextcloud/public_html/nextcloud/lib/base.php",
        "line": 1089,
        "function": "init",
        "class": "OC",
        "type": "::"
      },
      {
        "file": "/usr/home/nextcloud/public_html/nextcloud/index.php",
        "line": 34,
        "args": [
          "/usr/home/nextcloud/public_html/nextcloud/lib/base.php"
        ],
        "function": "require_once"
      }
    ],
    "File": "/usr/home/nextcloud/public_html/apps-local/mail/vendor/composer/autoload_real.php",
    "Line": 29,
    "CustomMessage": "Error during app service registration: Failed opening required '/usr/home/nextcloud/public_html/apps-local/mail/vendor/composer/include_paths.php' (include_path='/usr/home/nextcloud/public_html/nextcloud/3rdparty/pear/archive_tar:/usr/home/nextcloud/public_html/nextcloud/3rdparty/pear/console_getopt:/usr/home/nextcloud/public_html/nextcloud/3rdparty/pear/pear-core-minimal/src:/usr/home/nextcloud/public_html/nextcloud/3rdparty/pear/pear_exception:/home/nextcloud/public_html/apps-local:/home/nextcloud/public_html/nextcloud/apps')"
  },
  "id": "629a2a6f2b133"
}

Mail app version

1.13.0

Mailserver or service

n/a

Operating system

FreeBSD

PHP engine version

PHP 8.0

Web server

Nginx

Database

MariaDB

Additional info

No response

ChristophWurst commented 2 years ago

When do you get this? Just during the upgrade or also afterwards?

bdrewery commented 2 years ago

Literally any page load.

ChristophWurst commented 2 years ago

The app includes /vendor/autoload.php. Until that point the trace makes sense. The inclusion of include_paths.php is strange.

I'm having a look at https://github.com/nextcloud-releases/mail/releases/download/v1.13.0/mail-v1.13.0.tar.gz.

bdrewery commented 2 years ago

I'm not familiar with composer or what's going on here but I do know the file was present in 1.12.1 at least as I keep my files tracked in git.

ChristophWurst commented 2 years ago

Could this be caused by some aggressive opcache? Please try restarting your webserver.

There is no code in v1.13.0 to load that file.

bdrewery commented 2 years ago

I do use opcache. I wiped the tmp dir and restarted php-fpm a few times and was still seeing this. I should have mentioned this initially. Here's all the files looking for include_paths.php (I removed mail).

% git grep include_paths.php
apps-local/news/appinfo/signature.json:        "vendor\/composer\/include_paths.php": "9347dc3854fbec9ccddd7bc3243d5073f8f5633f98dddd02b7967aed5f6616844b7a42f49f1870633f0ea34334598a6096c21e287ae4220546079084a082e227",
apps-local/news/vendor/composer/autoload_real.php:        $includePaths = require __DIR__ . '/include_paths.php';
apps-local/news/vendor/composer/include_paths.php:// include_paths.php @generated by Composer
nextcloud/3rdparty/composer/autoload_real.php:        $includePaths = require __DIR__ . '/include_paths.php';
nextcloud/3rdparty/composer/include_paths.php:// include_paths.php @generated by Composer
nextcloud/core/signature.json:        "3rdparty\/composer\/include_paths.php": "190d947399906fab0a629abdc4eb321cba0a89fca8341092e96bbe7921e22f425aa4fe17dce85b99d11c9853aaf696beebf4e678ae3652e3eb2c32e9a14ecf7c",

The trace was showing _3rdparty/composer/autoloadreal.php trying to load too.

bdrewery commented 2 years ago

Didn't see a question for it or I missed it but I'm using Nextcloud 23.0.5.1.

bdrewery commented 2 years ago
# grep opcache /usr/local/etc/php.ini | grep -v ^';'
[opcache]
opcache.enable_cli=0
opcache.interned_strings_buffer=20
opcache.max_accelerated_files=15000
opcache.validate_timestamps=0
opcache.revalidate_freq=60
opcache.save_comments=1
opcache.record_warnings=1
opcache.blacklist_filename=/home/nextcloud/opcache.blacklist
opcache.error_log=/var/log/php-fpm/opcache.log
opcache.file_cache= /tmp/opcache
opcache.huge_code_pages=1
opcache.jit=tracing
opcache.jit_buffer_size=32M
# cat /home/nextcloud/opcache.blacklist
/usr/home/nextcloud/public_html/nextcloud/config/config.php
ChristophWurst commented 2 months ago

I'm assuming this to be fixed in newer versions. If not, let me know