在我们的生产网站上,我发现了sendry.io错误。
由于几个月以来,我每天大约有50次相同的错误,但是我永远无法自己在本地,预生产甚至生产中重现该错误。
我不知道会发生什么。我从来没有一个客户向我报告此错误。
有人知道这可能是什么吗?
ErrorException: Uncaught Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException: The "kernel" service is synthetic, it needs to be set at boot time before it can be used. in /mnt/www/project/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Container.php:334
Stack trace:
#0 /mnt/www/project/app/cache/prod/Container2xhx4bk/appProdProjectContainer.php(11988): Symfony\Component\DependencyInjection\Container->get('kernel')
#1 /mnt/www/project/app/cache/prod/Container2xhx4bk/appProdProjectContainer.php(12085): Container2xhx4bk\appProdProjectContainer->getTemplating_LocatorService()
#2 /mnt/www/project/app/cache/prod/Container2xhx4bk/appProdProjectContainer.php(9670): Container2xhx4bk\appProdProjectContainer->getTwig_LoaderService()
#3 /mnt/www/project/app/cache/prod/Container2xhx4bk/appProdProjectContainer.php(9660): Container2xhx4bk\appProdProjectContainer->getTwigService()
#4 /mnt/www/project/ap
#1 vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Container.php(334): handleFatalError
答案 0 :(得分:0)
您可能在引导内核之前尝试从容器中获取内核。通常,Symfony应用程序从启动内核开始,然后您可以从容器中获取内核。确保您正在启动它。
内核在引导时将自身设置为容器。来源:https://symfony.com/doc/current/service_container/synthetic_services.html