Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

InactiveScopeException when running cache:warmup #14

Closed
snc opened this issue Jan 13, 2012 · 5 comments
Closed

InactiveScopeException when running cache:warmup #14

snc opened this issue Jan 13, 2012 · 5 comments

Comments

@snc
Copy link

snc commented Jan 13, 2012

When running php app/console cache:warmup --env=prod -v the following exception is thrown:

[Symfony\Component\DependencyInjection\Exception\InactiveScopeException]
You cannot create a service ("request") of an inactive scope ("request").
Exception trace:
 () at /var/www/dev/webs/project/app/cache/prod/appProdDebugProjectContainer.php:1412
 appProdDebugProjectContainer->getRequestService() at /var/www/dev/webs/project/app/bootstrap.php.cache:194
 Symfony\Component\DependencyInjection\Container->get() at /var/www/dev/webs/project/app/cache/prod/appProdDebugProjectContainer.php:2590
 appProdDebugProjectContainer->getSonata_Intl_LocaleDetector_RequestService() at /var/www/dev/webs/project/app/bootstrap.php.cache:194
 Symfony\Component\DependencyInjection\Container->get() at /var/www/dev/webs/project/app/cache/prod/appProdDebugProjectContainer.php:2616
 appProdDebugProjectContainer->getSonata_Intl_Templating_Helper_LocaleService() at /var/www/dev/webs/project/app/bootstrap.php.cache:194
 Symfony\Component\DependencyInjection\Container->get() at /var/www/dev/webs/project/app/cache/prod/appProdDebugProjectContainer.php:3360
 appProdDebugProjectContainer->getTwigService() at /var/www/dev/webs/project/app/bootstrap.php.cache:194
 Symfony\Component\DependencyInjection\Container->get() at /var/www/dev/webs/project/app/cache/prod/appProdDebugProjectContainer.php:61
 appProdDebugProjectContainer->getAssetic_AssetManagerService() at /var/www/dev/webs/project/app/bootstrap.php.cache:194
 Symfony\Component\DependencyInjection\Container->get() at /var/www/dev/webs/project/vendor/bundles/Symfony/Bundle/AsseticBundle/CacheWarmer/AssetManagerCacheWarmer.php:33
 Symfony\Bundle\AsseticBundle\CacheWarmer\AssetManagerCacheWarmer->warmUp() at /var/www/dev/webs/project/vendor/symfony/src/Symfony/Component/HttpKernel/CacheWarmer/CacheWarmerAggregate.php:47
 Symfony\Component\HttpKernel\CacheWarmer\CacheWarmerAggregate->warmUp() at /var/www/dev/webs/project/vendor/symfony/src/Symfony/Bundle/FrameworkBundle/Command/CacheWarmupCommand.php:50
 Symfony\Bundle\FrameworkBundle\Command\CacheWarmupCommand->execute() at /var/www/dev/webs/project/vendor/symfony/src/Symfony/Component/Console/Command/Command.php:237
 Symfony\Component\Console\Command\Command->run() at /var/www/dev/webs/project/vendor/symfony/src/Symfony/Component/Console/Application.php:193
 Symfony\Component\Console\Application->doRun() at /var/www/dev/webs/project/vendor/symfony/src/Symfony/Bundle/FrameworkBundle/Console/Application.php:75
 Symfony\Bundle\FrameworkBundle\Console\Application->doRun() at /var/www/dev/webs/project/vendor/symfony/src/Symfony/Component/Console/Application.php:106
 Symfony\Component\Console\Application->run() at /var/www/dev/webs/project/app/console:22
@lsmith77
Copy link

this probably needs a solution like this:
symfony-cmf/symfony-cmf@441e345

@ribeiropaulor
Copy link

It also happens when trying to dump the assetic files.

@tristanbes
Copy link

🆙 still hapening even when clearing cache on 2-1.DEV

@rande rande closed this as completed in 6f44cd9 Mar 28, 2012
@gregholland
Copy link

What was the resolution to this issue? I am also getting the issue using Symfony 2.0.16

@mmenozzi
Copy link

Same here with Symfony 2.1.7. See here: https://groups.google.com/forum/?fromgroups=#!topic/sonata-users/AsNPm7Iqz5U

$request = $this->container->get('request', ContainerInterface::NULL_ON_INVALID_REFERENCE)

This doesn't return null when the scope request is inactive but throws InactiveScopeException.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants