circles icon indicating copy to clipboard operation
circles copied to clipboard

Upgrade fails with "failed to open stream: No such file or directory at"

Open blizzz opened this issue 4 years ago • 6 comments

On an upgrade from 20.0.1 to 20.0.6 we had a failure and this is what the log noted:

{
  "reqId": "rm8A6fJIv20QHHyt5JWd",
  "level": 3,
  "time": "2021-01-25T21:40:57+00:00",
  "remoteAddr": "123.123.123.123",
  "user": "--",
  "app": "PHP",
  "method": "GET",
  "url": "/subfolder/core/ajax/update.php?requesttoken=LFj0kYvmmNjANizsV4JyTF1ML7OIIhy2q2EQ%2Fz3s2Us%3D%3AfS%2B60MKkqO2XWWSLePtCHhk9eMvRTnnk2wh0yBLbnHs%3D",
  "message": {
    "Exception": "Error",
    "Message": "include(/path/to/nextcloud/apps/circles/composer/composer/../daita/my-small-php-tools/lib/Traits/TStringTools.php): failed to open stream: No such file or directory at /path/to/nextcloud/lib/composer/composer/ClassLoader.php#444",
    "Code": 0,
    "Trace": [
      {
        "file": "/path/to/nextcloud/lib/composer/composer/ClassLoader.php",
        "line": 444,
        "function": "onError",
        "class": "OC\\Log\\ErrorHandler",
        "type": "::"
      },
      {
        "file": "/path/to/nextcloud/lib/composer/composer/ClassLoader.php",
        "line": 444,
        "function": "include"
      },
      {
        "file": "/path/to/nextcloud/lib/composer/composer/ClassLoader.php",
        "line": 322,
        "function": "Composer\\Autoload\\includeFile"
      },
      {
        "function": "loadClass",
        "class": "Composer\\Autoload\\ClassLoader",
        "type": "->"
      },
      {
        "file": "/path/to/nextcloud/apps/circles/lib/Db/MembersRequest.php",
        "line": 40,
        "function": "spl_autoload_call"
      },
      {
        "file": "/path/to/nextcloud/lib/composer/composer/ClassLoader.php",
        "line": 444,
        "args": [
          "/path/to/nextcloud/apps/circles/lib/Db/MembersRequest.php"
        ],
        "function": "include"
      },
      {
        "file": "/path/to/nextcloud/lib/composer/composer/ClassLoader.php",
        "line": 322,
        "function": "Composer\\Autoload\\includeFile"
      },
      {
        "function": "loadClass",
        "class": "Composer\\Autoload\\ClassLoader",
        "type": "->"
      },
      {
        "function": "spl_autoload_call"
      },
      {
        "file": "/path/to/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php",
        "line": 76,
        "function": "getClass",
        "class": "ReflectionParameter",
        "type": "->"
      },
      {
        "function": "OC\\AppFramework\\Utility\\{closure}",
        "class": "OC\\AppFramework\\Utility\\SimpleContainer",
        "type": "->",
        "args": [
          "*** sensitive parameters replaced ***"
        ]
      },
      {
        "file": "/path/to/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php",
        "line": 101,
        "function": "array_map"
      },
      {
        "file": "/path/to/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php",
        "line": 109,
        "function": "buildClass",
        "class": "OC\\AppFramework\\Utility\\SimpleContainer",
        "type": "->"
      },
      {
        "file": "/path/to/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php",
        "line": 126,
        "function": "resolve",
        "class": "OC\\AppFramework\\Utility\\SimpleContainer",
        "type": "->"
      },
      {
        "file": "/path/to/nextcloud/lib/private/AppFramework/DependencyInjection/DIContainer.php",
        "line": 455,
        "function": "query",
        "class": "OC\\AppFramework\\Utility\\SimpleContainer",
        "type": "->"
      },
      {
        "file": "/path/to/nextcloud/lib/private/ServerContainer.php",
        "line": 140,
        "function": "queryNoFallback",
        "class": "OC\\AppFramework\\DependencyInjection\\DIContainer",
        "type": "->"
      },
      {
        "file": "/path/to/nextcloud/lib/private/Repair.php",
        "line": 124,
        "function": "query",
        "class": "OC\\ServerContainer",
        "type": "->"
      },
      {
        "file": "/path/to/nextcloud/lib/private/legacy/OC_App.php",
        "line": 1035,
        "function": "addStep",
        "class": "OC\\Repair",
        "type": "->"
      },
      {
        "file": "/path/to/nextcloud/lib/private/legacy/OC_App.php",
        "line": 979,
        "function": "executeRepairSteps",
        "class": "OC_App",
        "type": "::"
      },
      {
        "file": "/path/to/nextcloud/lib/private/Installer.php",
        "line": 206,
        "function": "updateApp",
        "class": "OC_App",
        "type": "::",
        "args": [
          "*** sensitive parameters replaced ***"
        ]
      },
      {
        "file": "/path/to/nextcloud/lib/private/Updater.php",
        "line": 456,
        "function": "updateAppstoreApp",
        "class": "OC\\Installer",
        "type": "->",
        "args": [
          "*** sensitive parameters replaced ***"
        ]
      },
      {
        "file": "/path/to/nextcloud/lib/private/Updater.php",
        "line": 264,
        "function": "upgradeAppStoreApps",
        "class": "OC\\Updater",
        "type": "->"
      },
      {
        "file": "/path/to/nextcloud/lib/private/Updater.php",
        "line": 130,
        "function": "doUpgrade",
        "class": "OC\\Updater",
        "type": "->"
      },
      {
        "file": "/path/to/nextcloud/core/ajax/update.php",
        "line": 214,
        "function": "upgrade",
        "class": "OC\\Updater",
        "type": "->"
      }
    ],
    "File": "/path/to/nextcloud/lib/private/Log/ErrorHandler.php",
    "Line": 91,
    "CustomMessage": "--"
  },
  "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:84.0) Gecko/20100101 Firefox/84.0",
  "version": "20.0.1.1"
}
{
  "reqId": "rm8A6fJIv20QHHyt5JWd",
  "level": 3,
  "time": "2021-01-25T21:40:57+00:00",
  "remoteAddr": "123.123.123.123",
  "user": "--",
  "app": "PHP",
  "method": "GET",
  "url": "/subfolder/core/ajax/update.php?requesttoken=LFj0kYvmmNjANizsV4JyTF1ML7OIIhy2q2EQ%2Fz3s2Us%3D%3AfS%2B60MKkqO2XWWSLePtCHhk9eMvRTnnk2wh0yBLbnHs%3D",
  "message": {
    "Exception": "Error",
    "Message": "include(): Failed opening '/path/to/nextcloud/apps/circles/composer/composer/../daita/my-small-php-tools/lib/Traits/TStringTools.php' for inclusion (include_path='/path/to/nextcloud/apps/mail/vendor/pear-pear.horde.org/Horde_Crypt_Blowfish:/path/to/nextcloud/apps/mail/vendor/pear-pear.horde.org/Horde_Date:/path/to/nextcloud/apps/mail/vendor/pear-pear.horde.org/Horde_Exception:/path/to/nextcloud/apps/mail/vendor/pear-pear.horde.org/Horde_Idna:/path/to/nextcloud/apps/mail/vendor/pear-pear.horde.org/Horde_Imap_Client:/path/to/nextcloud/apps/mail/vendor/pear-pear.horde.org/Horde_ListHeaders:/path/to/nextcloud/apps/mail/vendor/pear-pear.horde.org/Horde_Mail:/path/to/nextcloud/apps/mail/vendor/pear-pear.horde.org/Horde_Mime:/path/to/nextcloud/apps/mail/vendor/pear-pear.horde.org/Horde_Nls:/path/to/nextcloud/apps/mail/vendor/pear-pear.horde.org/Horde_Secret:/path/to/nextcloud/apps/mail/vendor/pear-pear.horde.org/Horde_Smtp:/path/to/nextcloud/apps/mail/vendor/pear-pear.horde.org/Horde_Socket_Client:/path/to/nextcloud/apps/mail/vendor/pear-pear.horde.org/Horde_Stream:/path/to/nextcloud/apps/mail/vendor/pear-pear.horde.org/Horde_Stream_Filter:/path/to/nextcloud/apps/mail/vendor/pear-pear.horde.org/Horde_Stream_Wrapper:/path/to/nextcloud/apps/mail/vendor/pear-pear.horde.org/Horde_Support:/path/to/nextcloud/apps/mail/vendor/pear-pear.horde.org/Horde_Text_Filter:/path/to/nextcloud/apps/mail/vendor/pear-pear.horde.org/Horde_Text_Flowed:/path/to/nextcloud/apps/mail/vendor/pear-pear.horde.org/Horde_Translation:/path/to/nextcloud/apps/mail/vendor/pear-pear.horde.org/Horde_Util:/path/to/nextcloud/3rdparty/pear/archive_tar:/path/to/nextcloud/3rdparty/pear/console_getopt:/path/to/nextcloud/3rdparty/pear/pear-core-minimal/src:/path/to/nextcloud/3rdparty/pear/pear_exception:/path/to/nextcloud/apps') at /path/to/nextcloud/lib/composer/composer/ClassLoader.php#444",
    "Code": 0,
    "Trace": [
      {
        "file": "/path/to/nextcloud/lib/composer/composer/ClassLoader.php",
        "line": 444,
        "function": "onError",
        "class": "OC\\Log\\ErrorHandler",
        "type": "::"
      },
      {
        "file": "/path/to/nextcloud/lib/composer/composer/ClassLoader.php",
        "line": 444,
        "function": "include"
      },
      {
        "file": "/path/to/nextcloud/lib/composer/composer/ClassLoader.php",
        "line": 322,
        "function": "Composer\\Autoload\\includeFile"
      },
      {
        "function": "loadClass",
        "class": "Composer\\Autoload\\ClassLoader",
        "type": "->"
      },
      {
        "file": "/path/to/nextcloud/apps/circles/lib/Db/MembersRequest.php",
        "line": 40,
        "function": "spl_autoload_call"
      },
      {
        "file": "/path/to/nextcloud/lib/composer/composer/ClassLoader.php",
        "line": 444,
        "args": [
          "/path/to/nextcloud/apps/circles/lib/Db/MembersRequest.php"
        ],
        "function": "include"
      },
      {
        "file": "/path/to/nextcloud/lib/composer/composer/ClassLoader.php",
        "line": 322,
        "function": "Composer\\Autoload\\includeFile"
      },
      {
        "function": "loadClass",
        "class": "Composer\\Autoload\\ClassLoader",
        "type": "->"
      },
      {
        "function": "spl_autoload_call"
      },
      {
        "file": "/path/to/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php",
        "line": 76,
        "function": "getClass",
        "class": "ReflectionParameter",
        "type": "->"
      },
      {
        "function": "OC\\AppFramework\\Utility\\{closure}",
        "class": "OC\\AppFramework\\Utility\\SimpleContainer",
        "type": "->",
        "args": [
          "*** sensitive parameters replaced ***"
        ]
      },
      {
        "file": "/path/to/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php",
        "line": 101,
        "function": "array_map"
      },
      {
        "file": "/path/to/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php",
        "line": 109,
        "function": "buildClass",
        "class": "OC\\AppFramework\\Utility\\SimpleContainer",
        "type": "->"
      },
      {
        "file": "/path/to/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php",
        "line": 126,
        "function": "resolve",
        "class": "OC\\AppFramework\\Utility\\SimpleContainer",
        "type": "->"
      },
      {
        "file": "/path/to/nextcloud/lib/private/AppFramework/DependencyInjection/DIContainer.php",
        "line": 455,
        "function": "query",
        "class": "OC\\AppFramework\\Utility\\SimpleContainer",
        "type": "->"
      },
      {
        "file": "/path/to/nextcloud/lib/private/ServerContainer.php",
        "line": 140,
        "function": "queryNoFallback",
        "class": "OC\\AppFramework\\DependencyInjection\\DIContainer",
        "type": "->"
      },
      {
        "file": "/path/to/nextcloud/lib/private/Repair.php",
        "line": 124,
        "function": "query",
        "class": "OC\\ServerContainer",
        "type": "->"
      },
      {
        "file": "/path/to/nextcloud/lib/private/legacy/OC_App.php",
        "line": 1035,
        "function": "addStep",
        "class": "OC\\Repair",
        "type": "->"
      },
      {
        "file": "/path/to/nextcloud/lib/private/legacy/OC_App.php",
        "line": 979,
        "function": "executeRepairSteps",
        "class": "OC_App",
        "type": "::"
      },
      {
        "file": "/path/to/nextcloud/lib/private/Installer.php",
        "line": 206,
        "function": "updateApp",
        "class": "OC_App",
        "type": "::",
        "args": [
          "*** sensitive parameters replaced ***"
        ]
      },
      {
        "file": "/path/to/nextcloud/lib/private/Updater.php",
        "line": 456,
        "function": "updateAppstoreApp",
        "class": "OC\\Installer",
        "type": "->",
        "args": [
          "*** sensitive parameters replaced ***"
        ]
      },
      {
        "file": "/path/to/nextcloud/lib/private/Updater.php",
        "line": 264,
        "function": "upgradeAppStoreApps",
        "class": "OC\\Updater",
        "type": "->"
      },
      {
        "file": "/path/to/nextcloud/lib/private/Updater.php",
        "line": 130,
        "function": "doUpgrade",
        "class": "OC\\Updater",
        "type": "->"
      },
      {
        "file": "/path/to/nextcloud/core/ajax/update.php",
        "line": 214,
        "function": "upgrade",
        "class": "OC\\Updater",
        "type": "->"
      }
    ],
    "File": "/path/to/nextcloud/lib/private/Log/ErrorHandler.php",
    "Line": 91,
    "CustomMessage": "--"
  },
  "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:84.0) Gecko/20100101 Firefox/84.0",
  "version": "20.0.1.1"
}
{
  "reqId": "rm8A6fJIv20QHHyt5JWd",
  "level": 3,
  "time": "2021-01-25T21:40:57+00:00",
  "remoteAddr": "85.195.247.3",
  "user": "--",
  "app": "PHP",
  "method": "GET",
  "url": "/subfolder/core/ajax/update.php?requesttoken=LFj0kYvmmNjANizsV4JyTF1ML7OIIhy2q2EQ%2Fz3s2Us%3D%3AfS%2B60MKkqO2XWWSLePtCHhk9eMvRTnnk2wh0yBLbnHs%3D",
  "message": "Trait 'daita\\MySmallPhpTools\\Traits\\TStringTools' not found at /path/to/nextcloud/apps/circles/lib/Db/MembersRequest.php#40",
  "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:84.0) Gecko/20100101 Firefox/84.0",
  "version": "20.0.1.1"
}

I see several references to the mail app. Got lost in dependency hell?

@daita @ChristophWurst

blizzz avatar Jan 25 '21 22:01 blizzz

Last version of Circles ? from the appstore ?

ArtificialOwl avatar Jan 25 '21 22:01 ArtificialOwl

yes

blizzz avatar Jan 26 '21 11:01 blizzz

Failed opening '/path/to/nextcloud/apps/circles/composer/composer/../daita/my-small-php-tools/lib/Traits/TStringTools.php' for inclusion

wrong autoloading config in the package?

ChristophWurst avatar Jan 26 '21 12:01 ChristophWurst

Failed opening '/path/to/nextcloud/apps/circles/composer/composer/../daita/my-small-php-tools/lib/Traits/TStringTools.php' for inclusion

wrong autoloading config in the package?

Looks like so, but why ? and why the Mail app ?

ArtificialOwl avatar Jan 26 '21 13:01 ArtificialOwl

I have no idea why the Mail autoloader tries to load this

ChristophWurst avatar Jan 26 '21 14:01 ChristophWurst

Could it be that migration logic still has old, pre-upgrade code files cached that cause the trouble?

Seen once without mail app enabled.

blizzz avatar Dec 02 '21 10:12 blizzz