Updating from 3.0.0 to 4.0.3 breaks due to non-existant service "key.repository"

Created on 9 September 2022, about 2 years ago
Updated 28 March 2023, over 1 year ago

Problem/Motivation

Upgrading from 3.0.0 to 4.0.3 on local results in the following error message when running `drush cr`

In CheckExceptionOnInvalidReferenceBehaviorPass.php line 86:

  The service "twitter_api_block.twitter" has a dependency on a non-existent
  service "key.repository".

This also causes several admin screens to produce the white screen of death

  • /admin/modules
  • /admin/config
  • /admin/reports/status

also worth noting that I have not used drupal/key on my site before updating this module to the latest version.

🐛 Bug report
Status

Active

Version

4.0

Component

Code

Created by

🇺🇸United States laura.gates

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇮🇹Italy apaderno Brescia, 🇮🇹
  • 🇨🇴Colombia jabonillac@gmail.com

    I solved this just preparing the dependency:

    1. Install Key module.
    2. Deploy key module to prod.
    3. Update the Twitter block.
    4. Deploy Twitter block update to prod.

    If i try to install key module and update twitter block at the same time it works but once you deploy, configuration import fails because the dependency on key module, so you got the dependency there first and that will solve the issue.

Production build 0.71.5 2024