Problem/Motivation

Attempting to add 11.4 support.

During Functional Test setup Drupal the Drupal Kernel is attempting to register the streamWrapper, however the 's3fs' service does not yet appear to exist in the container, this throws a service not found exception.

https://www.drupal.org/project/drupal/issues/3453216 appears to be a likely cause as one of its line is directly in the execution path.

bissect on core 11.x shows
8799b9=bad

1) Drupal\Tests\s3fs\Functional\S3fsConfigFormTest::testS3fsConfigurationForm
Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException: You have requested a non-existent service "s3fs".

/var/www/html/web/core/lib/Drupal/Component/DependencyInjection/Container.php:153
/var/www/html/web/core/lib/Drupal.php:203
/var/www/html/web/modules/custom/s3fs/src/StreamWrapper/S3fsStream.php:181
/var/www/html/web/core/lib/Drupal/Component/DependencyInjection/Container.php:262
/var/www/html/web/core/lib/Drupal/Component/DependencyInjection/Container.php:173
/var/www/html/web/core/lib/Drupal/Component/DependencyInjection/Container.php:453
/var/www/html/vendor/symfony/service-contracts/ServiceLocatorTrait.php:61
/var/www/html/vendor/symfony/dependency-injection/ServiceLocator.php:43
/var/www/html/web/core/lib/Drupal/Core/StreamWrapper/StreamWrapperManager.php:110
/var/www/html/web/core/lib/Drupal/Core/StreamWrapper/StreamWrapperManager.php:143
/var/www/html/web/core/lib/Drupal/Core/DrupalKernel.php:1073
/var/www/html/web/core/lib/Drupal/Core/DrupalKernel.php:881
/var/www/html/web/core/lib/Drupal/Core/Extension/ModuleInstaller.php:722
/var/www/html/web/core/lib/Drupal/Core/Extension/ModuleInstaller.php:320
/var/www/html/web/core/lib/Drupal/Core/Extension/ModuleInstaller.php:229
/var/www/html/web/core/lib/Drupal/Core/Test/FunctionalTestSetupTrait.php:516
/var/www/html/web/core/tests/Drupal/Tests/BrowserTestBase.php:548
/var/www/html/web/core/tests/Drupal/Tests/BrowserTestBase.php:335
/var/www/html/web/modules/custom/s3fs/tests/src/Functional/S3fsTestBase.php:106
/var/www/html/web/modules/custom/s3fs/tests/src/Functional/S3fsConfigFormTest.php:37

I did see some oddity at first in a full install lab, though I'm not reproducing it at the moment. Possibility this is just a test fault, however the fact it potentially originates from the Drupal Kernel is concerning that it could happen in production.

Steps to reproduce

Patch module to 11.4 ( see https://www.drupal.org/project/s3fs/issues/3601065 and children) and execute tests.

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Comments

cmlara created an issue. See original summary.

cmlara’s picture

Issue summary: View changes

Looked closer at the bisect and realized the 25 commits unconfirmed were likely #3592887: AttributeRouteDiscovery does not cleanly handle invalid classes

Applied related core patch to the test runs and confirmed core commit 8799b9 is first bad in bisect for s3fs service missing errors.

cmlara’s picture

Confirmed breaking on clean install.

End of day here, will raise a formal core issue in morning/afternoon.

Stack Trace trying to enable the module from the Drupal Extension UI:

The website encountered an unexpected error. Try again later.

Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException: You have requested a non-existent service "s3fs". in Drupal\Component\DependencyInjection\Container->get() (line 153 of core/lib/Drupal/Component/DependencyInjection/Container.php).

Drupal::service() (Line: 181)
Drupal\s3fs\StreamWrapper\S3fsStream->__construct() (Line: 262)
Drupal\Component\DependencyInjection\Container->createService() (Line: 173)
Drupal\Component\DependencyInjection\Container->get() (Line: 453)
Drupal\Component\DependencyInjection\Container->{closure:Drupal\Component\DependencyInjection\Container::resolveServicesAndParameters():452}() (Line: 61)
Symfony\Component\DependencyInjection\ServiceLocator->doGet() (Line: 43)
Symfony\Component\DependencyInjection\ServiceLocator->get() (Line: 110)
Drupal\Core\StreamWrapper\StreamWrapperManager->getClass() (Line: 143)
Drupal\Core\StreamWrapper\StreamWrapperManager->register() (Line: 1073)
Drupal\Core\DrupalKernel->initializeContainer() (Line: 881)
Drupal\Core\DrupalKernel->updateModules() (Line: 722)
Drupal\Core\Extension\ModuleInstaller->updateKernel() (Line: 320)
Drupal\Core\Extension\ModuleInstaller->doInstall() (Line: 229)
Drupal\Core\Extension\ModuleInstaller->install() (Line: 503)
Drupal\system\Form\ModulesListForm->submitForm() (Line: 108)
Drupal\Core\Form\FormSubmitter->executeSubmitHandlers() (Line: 45)
Drupal\Core\Form\FormSubmitter->doSubmitForm() (Line: 620)
Drupal\Core\Form\FormBuilder->processForm() (Line: 343)
Drupal\Core\Form\FormBuilder->buildForm() (Line: 73)
Drupal\Core\Controller\FormController->getContentResult()
call_user_func_array() (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->{closure:Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber::wrapControllerExecutionInRenderContext():121}() (Line: 638)
Drupal\Core\Render\Renderer::{closure:Drupal\Core\Render\Renderer::executeInRenderContext():638}()
Fiber->resume() (Line: 653)
Drupal\Core\Render\Renderer->executeInRenderContext() (Line: 121)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext() (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->{closure:Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber::onController():96}() (Line: 183)
Symfony\Component\HttpKernel\HttpKernel->handleRaw() (Line: 76)
Symfony\Component\HttpKernel\HttpKernel->handle() (Line: 53)
Drupal\Core\StackMiddleware\Session->handle() (Line: 30)
Drupal\Core\StackMiddleware\KernelPreHandle->handle() (Line: 28)
Drupal\Core\StackMiddleware\ContentLength->handle() (Line: 32)
Drupal\big_pipe\StackMiddleware\ContentLength->handle() (Line: 118)
Drupal\page_cache\StackMiddleware\PageCache->pass() (Line: 92)
Drupal\page_cache\StackMiddleware\PageCache->handle() (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle() (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle() (Line: 61)
Drupal\Core\StackMiddleware\AjaxPageState->handle() (Line: 54)
Drupal\Core\StackMiddleware\StackedHttpKernel->handle() (Line: 753)
Drupal\Core\DrupalKernel->handle() (Line: 35)
Symfony\Component\Runtime\Runner\Symfony\HttpKernelRunner->run() (Line: 32)
require('/var/www/html/vendor/autoload_runtime.php') (Line: 22)
require_once('/var/www/html/web/autoload_runtime.php') (Line: 13)
cmlara’s picture

cmlara’s picture

Status: Postponed » Closed (works as designed)

Core has fixed #3603333.

No changes required from up on this issue. should be in next non-security release of Drupal Core.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.