Fatal exception with simplesamlphp 2.2.2: non-existent service "serializer.normalizer.object"

Created on 10 June 2024, 6 months ago
Updated 27 June 2024, 6 months ago

Hitting an error on saml login with simplesamlphp 2.2.2 (but not with 2.1.3).
Not sure where to start with this issue, has anyone else run into it?

It looks like some weird interaction with symfony, but I can't track down a cause.

Here's the stack trace:

SimpleSAML\Error\Error: UNHANDLEDEXCEPTION
Backtrace:
1 src/SimpleSAML/Error/ExceptionHandler.php:32 (SimpleSAML\Error\ExceptionHandler::customExceptionHandler)
0 [builtin] (N/A)
Caused by: Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException: You have requested a non-existent service "serializer.normalizer.object".
Backtrace:
11 /code/vendor/symfony/dependency-injection/ContainerBuilder.php:992 (Symfony\Component\DependencyInjection\ContainerBuilder::getDefinition)
10 /code/vendor/symfony/framework-bundle/DependencyInjection/FrameworkExtension.php:1999 (Symfony\Bundle\FrameworkBundle\DependencyInjection\FrameworkExtension::registerSerializerConfiguration)
9 /code/vendor/symfony/framework-bundle/DependencyInjection/FrameworkExtension.php:389 (Symfony\Bundle\FrameworkBundle\DependencyInjection\FrameworkExtension::load)
8 /code/vendor/symfony/dependency-injection/Compiler/MergeExtensionConfigurationPass.php:76 (Symfony\Component\DependencyInjection\Compiler\MergeExtensionConfigurationPass::process)
7 /code/vendor/symfony/http-kernel/DependencyInjection/MergeExtensionConfigurationPass.php:42 (Symfony\Component\HttpKernel\DependencyInjection\MergeExtensionConfigurationPass::process)
6 /code/vendor/symfony/dependency-injection/Compiler/Compiler.php:80 (Symfony\Component\DependencyInjection\Compiler\Compiler::compile)
5 /code/vendor/symfony/dependency-injection/ContainerBuilder.php:767 (Symfony\Component\DependencyInjection\ContainerBuilder::compile)
4 /code/vendor/symfony/http-kernel/Kernel.php:506 (Symfony\Component\HttpKernel\Kernel::initializeContainer)
3 /code/vendor/symfony/http-kernel/Kernel.php:763 (Symfony\Component\HttpKernel\Kernel::preBoot)
2 /code/vendor/symfony/http-kernel/Kernel.php:185 (Symfony\Component\HttpKernel\Kernel::handle)
1 src/SimpleSAML/Module.php:234 (SimpleSAML\Module::process)
0 public/module.php:17 (N/A)
πŸ’¬ Support request
Status

Closed: works as designed

Version

2.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States AaronBauman Philadelphia

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @AaronBauman
  • πŸ‡ΊπŸ‡ΈUnited States AaronBauman Philadelphia
  • πŸ‡ΊπŸ‡ΈUnited States AaronBauman Philadelphia

    Looks like this is a bug with symfony/framework-bundle :
    https://github.com/symfony/symfony/pull/57297

    For me, I resolved it by rolling back to symfony/framework-bundle 6.4.3 but other version will probably work also.

  • @AaronBauman

    I'm hitting that same error;
    I wonder how did you roll back to symfony/framework-bundle 6.4.3

    I'm not sure where to check with version I'm at.

    Thanks

  • πŸ‡ΊπŸ‡ΈUnited States AaronBauman Philadelphia

    i just required it directly, rather than relying on simplesamlphp

    composer require symfony/framework-bundle:6.4.3

  • I found a way to downgrade the different Symfony packages and solve the problem - until symfony release a new version that fixes this issue:

    https://www.drupal.org/project/simplesamlphp_auth/issues/3452457 πŸ’¬ Update to Symfony 6.4.8 throws error Active
    by mark_fullmer

    on your local machine: edit composer.json to add the following under the "conflict": { section:"

    conflict": {
        "symfony/yaml":"6.4.8",
        "symfony/validator":"6.4.8",
        "symfony/string":"6.4.8",
        "symfony/serializer":"6.4.8",
        "symfony/psr-http-message-bridge":"6.4.8",
        "symfony/process":"6.4.8",
        "symfony/mime":"6.4.8",
        "symfony/mailer":"6.4.8",
        "symfony/intl":"6.4.8",
        "symfony/http-kernel":"6.4.8",
        "symfony/http-foundation":"6.4.8",
        "symfony/error-handler":"6.4.8",
        "symfony/dependency-injection":"6.4.8",
        "symfony/console":"6.4.8",
        "symfony/config":"6.4.8",
        "symfony/cache":"6.4.8",
        "symfony/var-exporter":"6.4.8",
        "symfony/var-dumper":"6.4.8",
        "symfony/routing":"6.4.8",
        "symfony/framework-bundle":"6.4.8",
        "symfony/finder":"6.4.8",
        "symfony/filesystem":"6.4.8",
        "symfony/event-dispatcher":"6.4.8"
      },

    then run composer update to update the composer.lock file -if not it will generate a conflict with composer.lock file

  • Status changed to Closed: works as designed 6 months ago
  • πŸ‡³πŸ‡ΏNew Zealand RoSk0 Wellington

    Symfony has already released the fix in v7.1.1. For prior versions I would recommend including the the patch with the big fix in your composer.json:

    • add this to your patches file or section
      "symfony/framework-bundle": {
            "Issue #57294: Issue with 'symfony/serializer' component on a clean Symfony installation": "https://github.com/symfony/symfony/commit/0625660d157f7f0fbeaa7486daf548270fc613cc.diff"
          }
      
    • and this "symfony/framework-bundle": "-p5" to the cweagans/composer-patches patchLevel configuration, so you have
      "patchLevel": {
                  "drupal/core": "-p2",
                  "symfony/framework-bundle": "-p5"
              },
      

    Strictly speaking this is not this module problem, or bug, so I'm closing this. Hopefully we will have 6.4.x release soon that would include that.

  • πŸ‡ΊπŸ‡ΈUnited States AaronBauman Philadelphia

    Makes sense, glad it's fixed upstream

Production build 0.71.5 2024