NextCloud : Crash : Undefined class constant ‘MAJOR_VERSION’ in guzzlehttp

96 x served & 8 x viewed

Suite à l’update de NextCloud j’ai eu un crash :

Type : Error
Code : 0
Message : Undefined class constant 'MAJOR_VERSION'
Fichier : /usr/share/nginx/nextcloud/3rdparty/guzzlehttp/guzzle/src/Utils.php
Ligne : 118

Trace

#0 /usr/share/nginx/nextcloud/3rdparty/guzzlehttp/guzzle/src/functions.php(71): GuzzleHttp\Utils::defaultUserAgent()
#1 /usr/share/nginx/nextcloud/apps/files_external_gdrive/vendor/guzzlehttp/guzzle/src/Client.php(194): GuzzleHttp\default_user_agent()
#2 /usr/share/nginx/nextcloud/apps/files_external_gdrive/vendor/guzzlehttp/guzzle/src/Client.php(75): GuzzleHttp\Client->configureDefaults(Array)
#3 /usr/share/nginx/nextcloud/lib/private/Http/Client/ClientService.php(62): GuzzleHttp\Client->__construct()
#4 /usr/share/nginx/nextcloud/lib/private/OCS/DiscoveryService.php(55): OC\Http\Client\ClientService->newClient()
#5 /usr/share/nginx/nextcloud/lib/private/Server.php(1264): OC\OCS\DiscoveryService->__construct(Object(OC\Memcache\Factory), Object(OC\Http\Client\ClientService))
#6 /usr/share/nginx/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(155): OC\Server->OC\{closure}(Object(OC\Server))
#7 /usr/share/nginx/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(118): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}(Object(Pimple\Container))
#8 /usr/share/nginx/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(122): Pimple\Container->offsetGet('OCP\\OCS\\IDiscov...')
#9 /usr/share/nginx/nextcloud/lib/private/ServerContainer.php(137): OC\AppFramework\Utility\SimpleContainer->query('OCP\\OCS\\IDiscov...', false)
#10 /usr/share/nginx/nextcloud/lib/private/AppFramework/DependencyInjection/DIContainer.php(434): OC\ServerContainer->query('OCP\\OCS\\IDiscov...', true)
#11 /usr/share/nginx/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(87): OC\AppFramework\DependencyInjection\DIContainer->query('OCP\\OCS\\IDiscov...', true)
#12 [internal function]: OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}(Object(ReflectionParameter))
#13 /usr/share/nginx/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(101): array_map(Object(Closure), Array)
#14 /usr/share/nginx/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(109): OC\AppFramework\Utility\SimpleContainer->buildClass(Object(ReflectionClass))
#15 /usr/share/nginx/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(126): OC\AppFramework\Utility\SimpleContainer->resolve('OCA\\FederatedFi...')
#16 /usr/share/nginx/nextcloud/lib/private/AppFramework/DependencyInjection/DIContainer.php(459): OC\AppFramework\Utility\SimpleContainer->query('OCA\\FederatedFi...')
#17 /usr/share/nginx/nextcloud/lib/private/AppFramework/DependencyInjection/DIContainer.php(431): OC\AppFramework\DependencyInjection\DIContainer->queryNoFallback('OCA\\FederatedFi...')
#18 /usr/share/nginx/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(87): OC\AppFramework\DependencyInjection\DIContainer->query('OCA\\FederatedFi...', true)
#19 [internal function]: OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}(Object(ReflectionParameter))
#20 /usr/share/nginx/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(101): array_map(Object(Closure), Array)
#21 /usr/share/nginx/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(109): OC\AppFramework\Utility\SimpleContainer->buildClass(Object(ReflectionClass))
#22 /usr/share/nginx/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(126): OC\AppFramework\Utility\SimpleContainer->resolve('OCA\\FederatedFi...')
#23 /usr/share/nginx/nextcloud/lib/private/AppFramework/DependencyInjection/DIContainer.php(459): OC\AppFramework\Utility\SimpleContainer->query('OCA\\FederatedFi...')
#24 /usr/share/nginx/nextcloud/lib/private/ServerContainer.php(146): OC\AppFramework\DependencyInjection\DIContainer->queryNoFallback('OCA\\FederatedFi...')
#25 /usr/share/nginx/nextcloud/apps/provisioning_api/lib/Capabilities.php(50): OC\ServerContainer->query('OCA\\FederatedFi...')
#26 /usr/share/nginx/nextcloud/lib/private/CapabilitiesManager.php(72): OCA\Provisioning_API\Capabilities->getCapabilities()
#27 /usr/share/nginx/nextcloud/lib/private/Template/JSConfigHelper.php(183): OC\CapabilitiesManager->getCapabilities()
#28 /usr/share/nginx/nextcloud/lib/private/TemplateLayout.php(211): OC\Template\JSConfigHelper->getConfig()
#29 /usr/share/nginx/nextcloud/lib/private/legacy/OC_Template.php(183): OC\TemplateLayout->__construct('user', 'dashboard')
#30 /usr/share/nginx/nextcloud/lib/public/AppFramework/Http/TemplateResponse.php(210): OC_Template->fetchPage(Array)
#31 /usr/share/nginx/nextcloud/lib/private/AppFramework/Http/Dispatcher.php(172): OCP\AppFramework\Http\TemplateResponse->render()
#32 /usr/share/nginx/nextcloud/lib/private/AppFramework/App.php(157): OC\AppFramework\Http\Dispatcher->dispatch(Object(OCA\Dashboard\Controller\DashboardController), 'index')
#33 /usr/share/nginx/nextcloud/lib/private/Route/Router.php(302): OC\AppFramework\App::main('OCA\\Dashboard\\C...', 'index', Object(OC\AppFramework\DependencyInjection\DIContainer), Array)
#34 /usr/share/nginx/nextcloud/lib/base.php(993): OC\Route\Router->match('/apps/dashboard...')
#35 /usr/share/nginx/nextcloud/index.php(37): OC::handleRequest()
#36 {main}

Pour fixer le problème j’ai supprimé le plugins : files_external_gdrive
Le plugins utilisait une ancienne version : /usr/share/nginx/nextcloud/apps/files_external_gdrive/vendor/guzzlehttp/guzzle/src/ClientInterface.php alors qu’il fallait utiliser la nouvelle version : /usr/share/nginx/nextcloud/3rdparty/guzzlehttp/guzzle/src/ClientInterface.php

rm -rf /usr/share/nginx/nextcloud/apps/files_external_gdrive/

Le problème est donc fixé.

A suivre.

Laisser un commentaire

Votre adresse e-mail ne sera pas publiée. Les champs obligatoires sont indiqués avec *

Time limit is exhausted. Please reload CAPTCHA.