Sonataadminbundle: You have requested a non-existent service "session.manager".

Created on 18 Feb 2020  路  4Comments  路  Source: sonata-project/SonataAdminBundle

Environment

linux, docker

Sonata packages

$ composer show --latest 'sonata-project/*'
sonata-project/admin-bundle              3.60.0 3.60.0 The missing Symfony Admin Generator
sonata-project/block-bundle              3.18.4 4.1.0  Symfony SonataBlockBundle
sonata-project/cache                     1.1.1  2.0.1  Cache library
sonata-project/cache-bundle              2.4.2  3.2.1  This bundle provides caching services
sonata-project/classification-bundle     3.10.1 3.10.1 Symfony SonataClassificationBundle
sonata-project/core-bundle               3.18.0 3.18.0 Symfony SonataCoreBundle (abandoned)
sonata-project/datagrid-bundle           2.5.0  3.1.1  Symfony SonataDatagridBundle
sonata-project/doctrine-extensions       1.5.1  1.5.1  Doctrine2 behavioral extensions
sonata-project/doctrine-orm-admin-bundle 3.14.0 3.14.0 Symfony Sonata / Integrate Doctrine ORM into the SonataAdminBundle
sonata-project/easy-extends-bundle       2.5.0  2.5.0  Symfony SonataEasyExtendsBundle
sonata-project/exporter                  2.1.0  2.1.0  Lightweight Exporter library
sonata-project/formatter-bundle          4.1.3  4.1.3  Symfony SonataFormatterBundle
sonata-project/intl-bundle               2.7.0  2.7.0  Symfony SonataIntlBundle
sonata-project/media-bundle              3.23.1 3.23.1 Symfony SonataMediaBundle
sonata-project/notification-bundle       3.6.2  3.6.2  Symfony SonataNotificationBundle
sonata-project/page-bundle               3.15.0 3.15.0 This bundle provides a Site and Page management through container and block services
sonata-project/seo-bundle                2.10.0 2.10.0 Symfony SonataSeoBundle
sonata-project/timeline-bundle           3.5.0  3.5.0  Integrates SpyTimelineBundle into Sonata
sonata-project/translation-bundle        2.4.2  2.4.2  SonataTranslationBundle
sonata-project/user-bundle               4.5.2  4.5.2  Symfony SonataUserBundle

Symfony packages

$ composer show --latest 'symfony/*'
symfony/asset                      v4.4.4  v5.0.4  Symfony Asset Component
symfony/cache                      v5.0.4  v5.0.4  Symfony Cache component with PSR-6, PSR-16, and tags
symfony/cache-contracts            v2.0.1  v2.0.1  Generic abstractions related to caching
symfony/config                     v4.4.4  v5.0.4  Symfony Config Component
symfony/console                    v4.4.4  v5.0.4  Symfony Console Component
symfony/debug                      v4.4.4  v4.4.4  Symfony Debug Component
symfony/dependency-injection       v4.4.4  v5.0.4  Symfony DependencyInjection Component
symfony/doctrine-bridge            v4.4.4  v5.0.4  Symfony Doctrine Bridge
symfony/dotenv                     v4.4.4  v5.0.4  Registers environment variables from a .env file
symfony/error-handler              v4.4.4  v5.0.4  Symfony ErrorHandler Component
symfony/event-dispatcher           v4.4.4  v5.0.4  Symfony EventDispatcher Component
symfony/event-dispatcher-contracts v1.1.7  v2.0.1  Generic abstractions related to dispatching event
symfony/expression-language        v4.4.4  v5.0.4  Symfony ExpressionLanguage Component
symfony/filesystem                 v4.4.4  v5.0.4  Symfony Filesystem Component
symfony/finder                     v4.4.4  v5.0.4  Symfony Finder Component
symfony/flex                       v1.6.2  v1.6.2  Composer plugin for Symfony
symfony/form                       v4.4.4  v5.0.4  Symfony Form Component
symfony/framework-bundle           v4.4.4  v5.0.4  Symfony FrameworkBundle
symfony/http-foundation            v4.4.4  v5.0.4  Symfony HttpFoundation Component
symfony/http-kernel                v4.4.4  v5.0.4  Symfony HttpKernel Component
symfony/inflector                  v5.0.4  v5.0.4  Symfony Inflector Component
symfony/intl                       v4.4.4  v5.0.4  A PHP replacement layer for the C intl extension that includes additional data from the ICU library.
symfony/maker-bundle               v1.14.3 v1.14.3 Symfony Maker helps you create empty commands, controllers, form classes, tests and more so you can forget about writing boilerplate code.
symfony/mime                       v5.0.4  v5.0.4  A library to manipulate MIME messages
symfony/monolog-bridge             v4.4.4  v5.0.4  Symfony Monolog Bridge
symfony/monolog-bundle             v3.5.0  v3.5.0  Symfony MonologBundle
symfony/options-resolver           v4.4.4  v5.0.4  Symfony OptionsResolver Component
symfony/orm-pack                   v1.0.8  v1.0.8  A pack for the Doctrine ORM
symfony/polyfill-ctype             v1.14.0 v1.14.0 Symfony polyfill for ctype functions
symfony/polyfill-iconv             v1.14.0 v1.14.0 Symfony polyfill for the Iconv extension
symfony/polyfill-intl-icu          v1.14.0 v1.14.0 Symfony polyfill for intl's ICU-related data and classes
symfony/polyfill-intl-idn          v1.14.0 v1.14.0 Symfony polyfill for intl's idn_to_ascii and idn_to_utf8 functions
symfony/polyfill-mbstring          v1.14.0 v1.14.0 Symfony polyfill for the Mbstring extension
symfony/polyfill-php72             v1.14.0 v1.14.0 Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions
symfony/polyfill-php73             v1.14.0 v1.14.0 Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions
symfony/process                    v4.4.4  v5.0.4  Symfony Process Component
symfony/profiler-pack              v1.0.4  v1.0.4  A pack for the Symfony web profiler
symfony/property-access            v4.4.4  v5.0.4  Symfony PropertyAccess Component
symfony/routing                    v4.4.4  v5.0.4  Symfony Routing Component
symfony/security-acl               v3.0.4  v3.0.4  Symfony Security Component - ACL (Access Control List)
symfony/security-bundle            v4.4.4  v5.0.4  Symfony SecurityBundle
symfony/security-core              v4.4.4  v5.0.4  Symfony Security Component - Core Library
symfony/security-csrf              v4.4.4  v5.0.4  Symfony Security Component - CSRF Library
symfony/security-guard             v4.4.4  v5.0.4  Symfony Security Component - Guard
symfony/security-http              v4.4.4  v5.0.4  Symfony Security Component - HTTP Integration
symfony/service-contracts          v2.0.1  v2.0.1  Generic abstractions related to writing services
symfony/stopwatch                  v5.0.4  v5.0.4  Symfony Stopwatch Component
symfony/swiftmailer-bundle         v3.4.0  v3.4.0  Symfony SwiftmailerBundle
symfony/templating                 v4.4.4  v5.0.4  Symfony Templating Component
symfony/translation                v4.4.4  v5.0.4  Symfony Translation Component
symfony/translation-contracts      v2.0.1  v2.0.1  Generic abstractions related to translation
symfony/twig-bridge                v4.4.4  v5.0.4  Symfony Twig Bridge
symfony/twig-bundle                v4.4.4  v5.0.4  Symfony TwigBundle
symfony/validator                  v4.4.4  v5.0.4  Symfony Validator Component
symfony/var-dumper                 v5.0.4  v5.0.4  Symfony mechanism for exploring and dumping PHP variables
symfony/var-exporter               v5.0.4  v5.0.4  A blend of var_export() + serialize() to turn any serializable data structure to plain PHP code
symfony/web-profiler-bundle        v5.0.4  v5.0.4  Symfony WebProfilerBundle
symfony/webpack-encore-bundle      v1.7.3  v1.7.3  Integration with your Symfony app & Webpack Encore!
symfony/yaml                       v4.4.4  v5.0.4  Symfony Yaml Component

PHP version

$ php -v
PHP 7.4.2 (cli) (built: Jan 24 2020 07:18:03) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
    with Zend OPcache v7.4.2, Copyright (c), by Zend Technologies

Subject

after upgrading to sonata admin bundle 3.60 I get message:
You have requested a non-existent service "session.manager" when clearing cache with console command

Steps to reproduce

update to 3.60

Expected results

no error

Actual results

You have requested a non-existent service "session.manager".
downgrading to to 3.59 makes the error go away

bug

Most helpful comment

have similar error when upgrade from 3.59 to 3.6 after post upgrade script :
cache:clear KO
You have requested a non-existent service "session.handler".

solved by reverting to v3.59

All 4 comments

Stack trace on page load

Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException:
You have requested a non-existent service "session.handler".

  at /var/www/symfony/vendor/symfony/dependency-injection/ContainerBuilder.php:1032
  at Symfony\Component\DependencyInjection\ContainerBuilder->getDefinition('session.handler')
     (/var/www/symfony/vendor/symfony/dependency-injection/ContainerBuilder.php:1068)
  at Symfony\Component\DependencyInjection\ContainerBuilder->findDefinition('session.handler')
     (/var/www/symfony/vendor/sonata-project/admin-bundle/src/DependencyInjection/Compiler/ModelManagerCompilerPass.php:39)
  at Sonata\AdminBundle\DependencyInjection\Compiler\ModelManagerCompilerPass->process(object(ContainerBuilder))
     (/var/www/symfony/vendor/symfony/dependency-injection/Compiler/Compiler.php:94)
  at Symfony\Component\DependencyInjection\Compiler\Compiler->compile(object(ContainerBuilder))
     (/var/www/symfony/vendor/symfony/dependency-injection/ContainerBuilder.php:762)
  at Symfony\Component\DependencyInjection\ContainerBuilder->compile()
     (/var/www/symfony/vendor/symfony/http-kernel/Kernel.php:626)
  at Symfony\Component\HttpKernel\Kernel->initializeContainer()
     (/var/www/symfony/vendor/symfony/http-kernel/Kernel.php:136)
  at Symfony\Component\HttpKernel\Kernel->boot()
     (/var/www/symfony/vendor/symfony/http-kernel/Kernel.php:196)
  at Symfony\Component\HttpKernel\Kernel->handle(object(SiteRequest))
     (/var/www/symfony/public/index.php:20)                

have similar error when upgrade from 3.59 to 3.6 after post upgrade script :
cache:clear KO
You have requested a non-existent service "session.handler".

solved by reverting to v3.59

This issue is surely caused by #5894. I'll be checking the problem ASAP.
Thank you so much for reporting.

Thank you!

Was this page helpful?
0 / 5 - 0 ratings