ServiceNotFoundException - update to mobile_detect 3.0.6

Created on 14 December 2023, 10 months ago
Updated 18 December 2023, 10 months ago

Problem/Motivation

Run update mobile_detect 3.0.4 => 3.0.6 with: composer update "drupal/mobile_detect:3.0.6"--with-all-dependencies

Then the following error entry:
---
Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException: You have requested a non-existent service "cache_context.mobile_detect_device_type". Did you mean this: "cache_context.mobile_detect_is_mobile"? in Drupal\Component\DependencyInjection\Container->get() (Zeile 157 in /web/core/lib/Drupal/Component/DependencyInjection/Container.php).
---

Drupal 10.1.7
php 8.2.13

🐛 Bug report
Status

Closed: cannot reproduce

Version

3.0

Component

Miscellaneous

Created by

🇩🇪Germany Frank.dev

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

Comments & Activities

  • Issue created by @Frank.dev
  • Assigned to nonom
  • 🇧🇪Belgium nonom Brussels
  • Issue was unassigned.
  • 🇧🇪Belgium nonom Brussels

    Works for me, and the service is defined in mobile_detect.services.yml.

      cache_context.mobile_detect_device_type:
        class: Drupal\mobile_detect\Cache\Context\DeviceTypeCacheContext
        arguments: ["@mobile_detect"]
        tags:
          - { name: cache.context }

    Could you try to refresh the cache and let me know.

  • Status changed to Fixed 10 months ago
  • 🇩🇪Germany Frank.dev

    Sorry for my "beginner's mistake" ;-)
    You're quite right - clear the cache and the page is back online.
    Thank you very much.

  • Status changed to Closed: cannot reproduce 10 months ago
  • 🇧🇪Belgium nonom Brussels
Production build 0.71.5 2024