You have requested a non-existent service "openid_connect.openid_connect".

Created on 21 July 2025, 3 months ago

Problem/Motivation

When trying to install 3.0.0-alpha6 with composer, all installs, but when I try to rebuild the cache, I get the error " You have requested a non-existent service "openid_connect.openid_connect"."

Steps to reproduce

  1. Install Drupal 10.5.1
  2. Using PHP 8.3.19, Drush 13.6.0
  3. Install openid_connect - composer require 'drupal/openid_connect:^3.0@alpha'
  4. run drush cash refresh - drush cr

This results in the following error,

In ContainerBuilder.php line 993:
                                                                              
  You have requested a non-existent service "openid_connect.openid_connect".  

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Active

Version

3.0

Component

Code

Created by

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

Comments & Activities

  • Issue created by @a.crowe_drupal
  • 🇺🇸United States pfrilling Minster, OH

    Thanks for the report @a.crowe_drupal. Can you apply the patch from MR #144? I believe this is a duplicate of #3462532.

  • Many thanks.

    I have installed that patch, and I how get the following error,

    In CheckExceptionOnInvalidReferenceBehaviorPass.php line 119:
                                                                                                                      
      The service "openid_connect.openid_connect" has a dependency on a non-existent service "externalauth.authmap".  

    Thanks again.

    Andy.

  • Actually. If I install the patch and do a

    drush cr

    Then I get the above.

    But if I do a

    drush updatedb

    first, and then the

    drush cr

    Then I no longer get the error. However, when I go to the site, I get the

    Site under maintenance

    message.

    If I take it out of maintenance mode with drush, then the main page shows, but when I try to log in I get the following error on the screen

    The website encountered an unexpected error. Try again later.,

    And in the drupal logs,

     41576832   28/Jul 09:11   php       Error      TypeError: in_array(): Argument #2 ($haystack) must be of type array, null given in in_array() (line 123 of /var/www/d11dev.opengroup.org/web/modules/contrib/openid_connect/src/OpenIDConne  
      41576831   28/Jul 09:11   php       Warning    Warning: Undefined array key "scopes" in Drupal\openid_connect\Plugin\OpenIDConnectClient\OpenIDConnectGenericClient->getClientScopes() (line 147 of /var/www/d11dev.opengroup.org/web/modul  
      41576830   28/Jul 09:11   php       Error      TypeError: in_array(): Argument #2 ($haystack) must be of type array, null given in in_array() (line 123 of /var/www/d11dev.opengroup.org/web/modules/contrib/openid_connect/src/OpenIDConne  
    
  • 🇫🇷France Jérôme Dehorter Lille

    Hi,

    After update 1.4 to 3.0.0-alpha6 I got the same error :

    Error Output:                                                                                        
      ================                                                                                     
                                                                                                           
      In ContainerBuilder.php line 992:                                                                    
                                                                                                           
        You have requested a non-existent service "openid_connect.openid_connect".
    

    D10.3.14
    Drush 12
    Exteralauth enabled

  • 🇺🇸United States pfrilling Minster, OH

    @jérôme dehorter... Do you get the same error if you upgrade from 1.4 to the 3.x-dev version?

  • 🇫🇷France Jérôme Dehorter Lille

    Hi @pfrilling,
    Yes, I upgrade from 1.4.0 to 3.0.0@alpha6.

    To avoid this problem, you need to perform a two-step update:
    1 - Uninstall the module and update the configuration.
    2 - Deploy to update the database.
    3 - Export the database and use it for the following steps.
    3 - Delete the module in version 1.4.0
    4 - Install version 3.0.0@alpha6
    5 - Enable Externalauth and OpenID.
    6 - Save the configuration changes.
    7 - Deploy a second time.

  • 🇺🇸United States pfrilling Minster, OH

    Are you able to try to upgrade from 1.4 to 3.x-dev and report if the same steps are required when upgrading to 3.0.0@alpha6? The latest development version has the fix for the non-existent service included.

  • 🇫🇷France Jérôme Dehorter Lille

    Hi @pfrilling,
    Yes, I upgrade from 1.4.0 to 3.x-dev.
    I'm going to install the latest patch on version 3.0.0-alpha6 to test if it works.
    A new working version is required for this to be deployed to production.

  • 🇫🇷France Jérôme Dehorter Lille

    Hi,
    I tried reverting to the latest patch, but it didn't work.

    Installation is possible with the development version. On my local machine, I have no issues, but on our AWS environments, I have the following problem:
    The service "openid_connect.openid_connect" has a dependency on a non-existent service "externalauth.authmap".

  • 🇫🇷France Jérôme Dehorter Lille

    Hi,
    I tried to install commit 3.x-dev#6052cff18ea87ee3e801cdc2546739b99e198f31 and it's the same, good on local but not on AWS.

  • 🇫🇷France NicociN

    Running the same problem

    You have requested a non-existent service "openid_connect.openid_connect".

    when upgrading from 1.4 to 3alpha6.
    Dev version does not solve the problem.

  • Status changed to Needs review about 1 month ago
Production build 0.71.5 2024