Fatal error: Uncaught Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException: You have requested a non-existent service "module_handler". in /Users/markus.kalkbrenner/workspace/git/drupal/vendor/symfony/dependency-injection/ContainerBuilder.php:979
Stack trace:
#0 /Users/markus.kalkbrenner/workspace/git/drupal/vendor/symfony/dependency-injection/ContainerBuilder.php(572): Symfony\Component\DependencyInjection\ContainerBuilder->getDefinition('module_handler')
#1 /Users/markus.kalkbrenner/workspace/git/drupal/core/lib/Drupal/Core/DependencyInjection/DependencySerializationTrait.php(53): Symfony\Component\DependencyInjection\ContainerBuilder->get('module_handler')
#2 /Users/markus.kalkbrenner/workspace/git/drupal/modules/search_api/src/Query/Query.php(709): Drupal\search_api\Query\Query->traitWakeup()
#3 [internal function]: Drupal\search_api\Query\Query->__wakeup()
#4 /Users/markus.kalkbrenner/workspace/git/drupal/vendor/phpunit/phpunit/src/Util/PHP.php(114): unserialize('a:4:{s:10:"test...')
#5 /Users/mar in /Users/markus.kalkbrenner/workspace/git/drupal/vendor/symfony/dependency-injection/ContainerBuilder.php on line 979

That reminds me of #2902810: Fatal error: You have requested a non-existent service "entity_type.manager"

Comments

mkalkbrenner created an issue. See original summary.

drunken monkey’s picture

Priority: Major » Normal
Status: Active » Needs review
StatusFileSize
new820 bytes

This seems like it might be best resolved in Core: #2909164: Fatal error with stub container in DependencySerializationTrait::__wakeup().
Would be great if you could comment there and maybe also explain under which circumstances the container is actually there but incomplete after a test fail (in case you know).

In the meantime, we may want to work around this issue in our code, too, though.

mkalkbrenner’s picture

Sorry, I forgot the explanation you already gave earlier.
As soon as you fix all errors on 8.3.x you can run the tests on 8.4.x.
It's horrible that these resulting fatal errors hide the real cause :-(

borisson_’s picture

Status: Needs review » Needs work

Should we add an @todo to the comment that relates to the drupal core issue?

drunken monkey’s picture

Status: Needs work » Needs review
StatusFileSize
new698 bytes
new922 bytes

Yeah, makes sense, thanks!

borisson_’s picture

Status: Needs review » Reviewed & tested by the community

Looks good.

  • drunken monkey committed 1ac3975 on 8.x-1.x
    Issue #2909153 by drunken monkey, borisson_: Fixed fatal error for test...
drunken monkey’s picture

Status: Reviewed & tested by the community » Fixed

OK, great.
Committed.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.