Class not found error occurs on password reset

Created on 25 October 2020, about 4 years ago
Updated 5 September 2024, 3 months ago

Problem/Motivation

When I attempt to request a password reset, I get the following error message. I am using Drupal 9.0.7 and module version 1.1+2-dev.

The website encountered an unexpected error. Please try again later.
Error: Class 'Drupal\username_enumeration_prevention\UserRouteEventSubscriber' not found in Drupal\Component\DependencyInjection\Container->createService() (line 257 of core/lib/Drupal/Component/DependencyInjection/Container.php).
Drupal\Component\DependencyInjection\Container->createService(Array, 'username_enumeration_prevention.user_route_subscriber') (Line: 171)
Drupal\Component\DependencyInjection\Container->get('username_enumeration_prevention.user_route_subscriber', 1) (Line: 50)
Drupal\webprofiler\DependencyInjection\TraceableContainer->get('username_enumeration_prevention.user_route_subscriber') (Line: 148)
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->getListeners('kernel.exception') (Line: 121)
Symfony\Component\EventDispatcher\LegacyEventDispatcherProxy->getListeners('kernel.exception') (Line: 71)
Symfony\Component\EventDispatcher\LegacyEventDispatcherProxy->dispatch(Object, 'kernel.exception') (Line: 219)
Symfony\Component\HttpKernel\HttpKernel->handleThrowable(Object, Object, 1) (Line: 91)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 57)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 106)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 85)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 50)
Drupal\ban\BanMiddleware->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 52)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 705)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

πŸ’¬ Support request
Status

Closed: outdated

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States JasonLuttrell Washington, DC area

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.

  • πŸ‡ΊπŸ‡ΈUnited States JasonLuttrell Washington, DC area

    @nicksanta - ultimately, I removed the module. For security purposes, Username Enumeration Prevention is a recommended best practice but in terms of project requirements, it's a nice-to-have. FWIW, in the past when I saw a class not found error, it was due to changes in Drupal's internal API. If the module has not been updated, I'd double-check the file paths.

  • Status changed to Closed: outdated 3 months ago
  • πŸ‡ΊπŸ‡ΈUnited States japerry KVUO

    This seems like a cache issue, especially no one else has reported it. Closing for now.

Production build 0.71.5 2024