EC-CUBE / EC-CUBE/ec-cube

[4.2] php-fpm の環境でプラグインの削除に失敗する場合がある

Open
#5,829 0 comments 0 reactions 0 assignees View on GitHub
bug:Low
Dominant language
PHP
Stars
788
Forks
719
Avg merge
4d 4h
Merged PRs (30d)
39

Description

## 概要(Overview)
php-fpm の環境で、他の Symfony Bundle に依存関係のあるプラグインの削除に失敗する(例: WebAPI プラグイン)
具体的には、以下の内容のシステムエラーが発生し、プラグイン削除のプログレスバーが消えない。
なお、ブラウザをリロードすれば削除は完了している。

```
[2022-09-28T10:37:24.288993+09:00] php.WARNING [N/A] [23eeb1c] [N/A] [Symfony\Component\ErrorHandler\ErrorHandler:handleError:538] - Warning: include_once(): Failed opening '/var/www/html/ec-cube/vendor/league/oauth2-server-bundle/src/Persistence/Mapping/Driver.php' for inclusion (include_path='.:/usr/share/pear:/usr/share/php') {"exception":"[object] (ErrorException(code: 0): Warning: include_once(): Failed opening '/var/www/html/ec-cube/vendor/league/oauth2-server-bundle/src/Persistence/Mapping/Driver.php' for inclusion (include_path='.:/usr/share/pear:/usr/share/php') at /var/www/html/ec-cube/var/cache/prod/ContainerKake3M9/Eccube_KernelProdContainer.php:808)"} [POST, /ec-cube/manager/disable_maintenance/auto_maintenance, xxx.xxx.xxx.xxx, http://example.com/ec-cube/manager/store/plugin, Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36 Edg/105.0.1343.50]
[2022-09-28T10:37:24.289366+09:00] php.CRITICAL [N/A] [23eeb1c] [N/A] [Symfony\Component\ErrorHandler\ErrorHandler:handleException:584] - Uncaught Error: Class 'League\Bundle\OAuth2ServerBundle\Persistence\Mapping\Driver' not found {"exception":"[object] (Error(code: 0): Class 'League\\Bundle\\OAuth2ServerBundle\\Persistence\\Mapping\\Driver' not found at /var/www/html/ec-cube/var/cache/prod/ContainerKake3M9/Eccube_KernelProdContainer.php:855)"} [POST, /ec-cube/manager/disable_maintenance/auto_maintenance, xxx.xxx.xxx.xxx, http://example.com/ec-cube/manager/store/plugin, Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36 Edg/105.0.1343.50]
[2022-09-28T10:37:24.657390+09:00] app.ERROR [N/A] [23eeb1c] [N/A] [Eccube\Log\Logger:log:68] - システムエラーが発生しました。 ["Attempted to load class \"Driver\" from namespace \"League\\Bundle\\OAuth2ServerBundle\\Persistence\\Mapping\".\nDid you forget a \"use\" statement for e.g. \"Symfony\\Bridge\\Doctrine\\Middleware\\Debug\\Driver\", \"Doctrine\\DBAL\\Logging\\Driver\", \"Doctrine\\DBAL\\Portability\\Driver\", \"Doctrine\\DBAL\\Driver\\SQLSrv\\Driver\", \"Doctrine\\DBAL\\Driver\\Mysqli\\Driver\", \"Doctrine\\DBAL\\Driver\\IBMDB2\\Driver\", \"Doctrine\\DBAL\\Driver\\PDO\\SQLSrv\\Driver\", \"Doctrine\\DBAL\\Driver\\PDO\\MySQL\\Driver\", \"Doctrine\\DBAL\\Driver\\PDO\\SQLite\\Driver\", \"Doctrine\\DBAL\\Driver\\PDO\\OCI\\Driver\", \"Doctrine\\DBAL\\Driver\\PDO\\PgSQL\\Driver\", \"Doctrine\\DBAL\\Driver\\OCI8\\Driver\" or \"Doctrine\\DBAL\\Driver\"?","/var/www/html/ec-cube/var/cache/prod/ContainerKake3M9/Eccube_KernelProdContainer.php",855,"#0 /var/www/html/ec-cube/var/cache/prod/ContainerKake3M9/Eccube_KernelProdContainer.php(772): ContainerKake3M9\\Eccube_KernelProdContainer->getDoctrine_Orm_DefaultEntityManagerService()\n#1 /var/www/html/ec-cube/var/cache/prod/ContainerKake3M9/EntityManager_9a5be93.php(22): ContainerKake3M9\\Eccube_KernelProdContainer->ContainerKake3M9\\{closure}()\n#2 /var/www/html/ec-cube/var/cache/prod/ContainerKake3M9/EntityManager_9a5be93.php(22): Closure->__invoke()\n#3 /var/www/html/ec-cube/vendor/doctrine/persistence/src/Persistence/AbstractManagerRegistry.php(188): ContainerKake3M9\\EntityManager_9a5be93->getMetadataFactory()\n#4 /var/www/html/ec-cube/vendor/doctrine/doctrine-bundle/Repository/ServiceEntityRepository.php(36): Doctrine\\Persistence\\AbstractManagerRegistry->getManagerForClass()\n#5 /var/www/html/ec-cube/src/Eccube/Repository/ProductRepository.php(58): Doctrine\\Bundle\\DoctrineBundle\\Repository\\ServiceEntityRepository->__construct()\n#6 /var/www/html/ec-cube/var/cache/prod/ContainerKake3M9/Eccube_KernelProdContainer.php(1694): Eccube\\Repository\\ProductRepository->__construct()\n#7 /var/www/html/ec-cube/var/cache/prod/ContainerKake3M9/Eccube_KernelProdContainer.php(1776): ContainerKake3M9\\Eccube_KernelProdContainer->getProductRepositoryService()\n#8 /var/www/html/ec-cube/var/cache/prod/ContainerKake3M9/Eccube_KernelProdContainer.php(645): ContainerKake3M9\\Eccube_KernelProdContainer->getEccubeExtensionService()\n#9 /var/www/html/ec-cube/var/cache/prod/ContainerKake3M9/Eccube_KernelProdContainer.php(1514): ContainerKake3M9\\Eccube_KernelProdContainer->get_Container_Private_TwigService()\n#10 /var/www/html/ec-cube/var/cache/prod/ContainerKake3M9/Eccube_KernelProdContainer.php(1125): ContainerKake3M9\\Eccube_KernelProdContainer->getMobileTemplatePathListenerService()\n#11 /var/www/html/ec-cube/vendor/symfony/event-dispatcher/EventDispatcher.php(267): ContainerKake3M9\\Eccube_KernelProdContainer->ContainerKake3M9\\{closure}()\n#12 /var/www/html/ec-cube/vendor/symfony/event-dispatcher/EventDispatcher.php(230): Symfony\\Component\\EventDispatcher\\EventDispatcher::Symfony\\Component\\EventDispatcher\\{closure}()\n#13 /var/www/html/ec-cube/vendor/symfony/event-dispatcher/EventDispatcher.php(59): Symfony\\Component\\EventDispatcher\\EventDispatcher->callListeners()\n#14 /var/www/html/ec-cube/vendor/symfony/http-kernel/HttpKernel.php(129): Symfony\\Component\\EventDispatcher\\EventDispatcher->dispatch()\n#15 /var/www/html/ec-cube/vendor/symfony/http-kernel/HttpKernel.php(75): Symfony\\Component\\HttpKernel\\HttpKernel->handleRaw()\n#16 /var/www/html/ec-cube/vendor/symfony/http-kernel/Kernel.php(202): Symfony\\Component\\HttpKernel\\HttpKernel->handle()\n#17 /var/www/html/ec-cube/index.php(83): Symfony\\Component\\HttpKernel\\Kernel->handle()\n#18 {main}"] [POST, /ec-cube/manager/disable_maintenance/auto_maintenance, xxx.xxx.xxx.xxx, http://example.com/ec-cube/manager/store/plugin, Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36 Edg/105.0.1343.50]
[2022-09-28T10:37:24.849056+09:00] app.DEBUG [N/A] [23eeb1c] [N/A] [Eccube\EventListener\LogListener:onKernelResponse:124] - LOGIC END [null] [POST, /ec-cube/manager/disable_maintenance/auto_maintenance, xxx.xxx.xxx.xxx, http://example.com/ec-cube/manager/store/plugin, Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36 Edg/105.0.1343.50]
[2022-09-28T10:37:24.849673+09:00] app.DEBUG [N/A] [23eeb1c] [N/A] [Eccube\EventListener\LogListener:onKernelTerminate:133] - PROCESS END [null] [POST, /ec-cube/manager/disable_maintenance/auto_maintenance, xxx.xxx.xxx.xxx, http://example.com/ec-cube/manager/store/plugin, Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36 Edg/105.0.1343.50]
[2022-09-28T10:37:24.849925+09:00] php.WARNING [N/A] [23eeb1c] [N/A] [Symfony\Component\ErrorHandler\ErrorHandler:handleError:538] - Warning: include_once(/var/www/html/ec-cube/vendor/league/oauth2-server-bundle/src/Persistence/Mapping/Driver.php): failed to open stream: No such file or directory {"exception":"[object] (ErrorException(code: 0): Warning: include_once(/var/www/html/ec-cube/vendor/league/oauth2-server-bundle/src/Persistence/Mapping/Driver.php): failed to open stream: No such file or directory at /var/www/html/ec-cube/var/cache/prod/ContainerKake3M9/Eccube_KernelProdContainer.php:808)"} [POST, /ec-cube/manager/disable_maintenance/auto_maintenance, xxx.xxx.xxx.xxx, http://example.com/ec-cube/manager/store/plugin, Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36 Edg/105.0.1343.50]
[2022-09-28T10:37:24.850071+09:00] php.WARNING [N/A] [23eeb1c] [N/A] [Symfony\Component\ErrorHandler\ErrorHandler:handleError:538] - Warning: include_once(): Failed opening '/var/www/html/ec-cube/vendor/league/oauth2-server-bundle/src/Persistence/Mapping/Driver.php' for inclusion (include_path='.:/usr/share/pear:/usr/share/php') {"exception":"[object] (ErrorException(code: 0): Warning: include_once(): Failed opening '/var/www/html/ec-cube/vendor/league/oauth2-server-bundle/src/Persistence/Mapping/Driver.php' for inclusion (include_path='.:/usr/share/pear:/usr/share/php') at /var/www/html/ec-cube/var/cache/prod/ContainerKake3M9/Eccube_KernelProdContainer.php:808)"} [POST, /ec-cube/manager/disable_maintenance/auto_maintenance, xxx.xxx.xxx.xxx, http://example.com/ec-cube/manager/store/plugin, Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36 Edg/105.0.1343.50]
[2022-09-28T10:37:24.850252+09:00] php.CRITICAL [N/A] [23eeb1c] [N/A] [Symfony\Component\ErrorHandler\ErrorHandler:handleException:584] - Uncaught Error: Class 'League\Bundle\OAuth2ServerBundle\Persistence\Mapping\Driver' not found {"exception":"[object] (Error(code: 0): Class 'League\\Bundle\\OAuth2ServerBundle\\Persistence\\Mapping\\Driver' not found at /var/www/html/ec-cube/var/cache/prod/ContainerKake3M9/Eccube_KernelProdContainer.php:855)"} [POST, /ec-cube/manager/disable_maintenance/auto_maintenance, xxx.xxx.xxx.xxx, http://example.com/ec-cube/manager/store/plugin, Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36 Edg/105.0.1343.50]

```

## 期待する内容(Expect) or 要望 (Requirement)

プラグインが正常に削除される

## 再現手順(Procedure)

1. php-fpm を利用して Webサーバーをセットアップ(symfony/cli でも php-fpm を使用すれば再現する)
2. EC-CUBE をインストール
3. プラグイン管理画面より、 WebAPI プラグインをインストールし、アンインストールする

### 環境 (environment)
+ EC-CUBE: 4.2.0
+ PHP: 7.4.19(php-fpm)
+ DB:
- PostgreSQL 10

## 関連情報 (Ref)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.