Unexpected error too few arguments after update to 8.x-2.8

Created on 14 September 2023, 10 months ago
Updated 4 October 2023, 9 months ago

After installing the security update (version 2.8) my logs are filled with the error below and the admin pages and login page show "The website encountered an unexpected error. Please try again later."

'PHP message: ArgumentCountError: Too few arguments to function Drupal\\mail_login\\AuthDecorator::__construct(), 3 passed in /core/lib/Drupal/Component/DependencyInjection/Container.php on line 259 and exactly 5 expected in /modules/contrib/mail_login/src/AuthDecorator.php on line 69

I ran drush updb and cleared caches after I installed the update (through composer). I am on Drupal 9.5.10 and PHP 8.1.16

πŸ› Bug report
Status

Fixed

Version

2.8

Component

Code

Created by

πŸ‡³πŸ‡±Netherlands Dries Arnolds πŸ‡³πŸ‡± Amsterdam

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

Comments & Activities

  • Issue created by @Dries Arnolds
  • πŸ‡³πŸ‡±Netherlands Dries Arnolds πŸ‡³πŸ‡± Amsterdam
  • πŸ‡³πŸ‡±Netherlands Nicasso

    Same here.

  • πŸ‡ΊπŸ‡ΈUnited States Redlow

    I can report the same error; I'm also on Drupal 9.5.

    [13-Sep-2023 22:53:59 UTC] ArgumentCountError: Too few arguments to function Drupal\mail_login\AuthDecorator::__construct(), 3 passed in /var/www/html/docroot/core/lib/Drupal/Component/DependencyInjection/Container.php on line 259 and exactly 5 expected in /var/www/html/docroot/modules/contrib/mail_login/src/AuthDecorator.php on line 69 #0 /var/www/html/docroot/core/lib/Drupal/Component/DependencyInjection/Container.php(259): Drupal\mail_login\AuthDecorator->__construct()
    #1 /var/www/html/docroot/core/lib/Drupal/Component/DependencyInjection/Container.php(177): Drupal\Component\DependencyInjection\Container->createService()
    #2 /var/www/html/docroot/core/modules/user/src/Form/UserLoginForm.php(95): Drupal\Component\DependencyInjection\Container->get()
    #3 /var/www/html/docroot/core/lib/Drupal/Core/DependencyInjection/ClassResolver.php(28): Drupal\user\Form\UserLoginForm::create()
    #4 /var/www/html/docroot/core/lib/Drupal/Core/Form/FormBuilder.php(195): Drupal\Core\DependencyInjection\ClassResolver->getInstanceFromDefinition()
    #5 /var/www/html/docroot/core/lib/Drupal/Core/Form/FormBuilder.php(232): Drupal\Core\Form\FormBuilder->getFormId()
    #6 /var/www/html/docroot/core/lib/Drupal/Core/Form/FormBuilder.php(224): Drupal\Core\Form\FormBuilder->buildForm()
    #7 /var/www/html/docroot/themes/my_theme/my_theme.theme(71): Drupal\Core\Form\FormBuilder->getForm()
    #8 [internal function]: my_theme_preprocess_node()
    #9 /var/www/html/docroot/core/lib/Drupal/Core/Theme/ThemeManager.php(287): call_user_func_array()
    #10 /var/www/html/docroot/core/lib/Drupal/Core/Render/Renderer.php(433): Drupal\Core\Theme\ThemeManager->render()
    #11 /var/www/html/docroot/core/lib/Drupal/Core/Render/Renderer.php(204): Drupal\Core\Render\Renderer->doRender()
    #12 /var/www/html/docroot/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php(242): Drupal\Core\Render\Renderer->render()
    #13 /var/www/html/docroot/core/lib/Drupal/Core/Render/Renderer.php(580): Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}()
    #14 /var/www/html/docroot/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php(243): Drupal\Core\Render\Renderer->executeInRenderContext()
    #15 /var/www/html/docroot/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php(132): Drupal\Core\Render\MainContent\HtmlRenderer->prepare()
    #16 /var/www/html/docroot/core/lib/Drupal/Core/EventSubscriber/MainContentViewSubscriber.php(90): Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse()
    #17 [internal function]: Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray()
    #18 /var/www/html/docroot/core/lib/Drupal/Component/EventDispatcher/ContainerAwareEventDispatcher.php(142): call_user_func()
    #19 /var/www/html/docroot/vendor/symfony/http-kernel/HttpKernel.php(174): Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch()
    #20 /var/www/html/docroot/vendor/symfony/http-kernel/HttpKernel.php(81): Symfony\Component\HttpKernel\HttpKernel->handleRaw()
    #21 /var/www/html/docroot/core/lib/Drupal/Core/StackMiddleware/Session.php(58): Symfony\Component\HttpKernel\HttpKernel->handle()
    #22 /var/www/html/docroot/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(48): Drupal\Core\StackMiddleware\Session->handle()
    #23 /var/www/html/docroot/core/modules/page_cache/src/StackMiddleware/PageCache.php(191): Drupal\Core\StackMiddleware\KernelPreHandle->handle()
    #24 /var/www/html/docroot/core/modules/page_cache/src/StackMiddleware/PageCache.php(128): Drupal\page_cache\StackMiddleware\PageCache->fetch()
    #25 /var/www/html/docroot/core/modules/page_cache/src/StackMiddleware/PageCache.php(82): Drupal\page_cache\StackMiddleware\PageCache->lookup()
    #26 /var/www/html/docroot/core/modules/ban/src/BanMiddleware.php(50): Drupal\page_cache\StackMiddleware\PageCache->handle()
    #27 /var/www/html/docroot/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(48): Drupal\ban\BanMiddleware->handle()
    #28 /var/www/html/docroot/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(51): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle()
    #29 /var/www/html/docroot/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle()
    #30 /var/www/html/docroot/core/lib/Drupal/Core/DrupalKernel.php(718): Stack\StackedHttpKernel->handle()
    #31 /var/www/html/docroot/index.php(19): Drupal\Core\DrupalKernel->handle()
    #32 {main} request_id="v-6cfcba98-5288-11ee-9e20-8302e64bd82a"

  • Assigned to mqanneh
  • πŸ‡―πŸ‡΄Jordan mqanneh Amman

    I'm working on a fix for the reported issue, will be available soon in the latest dev branch.

  • πŸ‡©πŸ‡ͺGermany ro-no-lo

    After a vendor/bin/drush cr the error goes away. At least for me.

  • πŸ‡³πŸ‡±Netherlands Jan-E

    Looks like this was caused by the fix for issue 3342236 πŸ“Œ Fix the issues reported by phpcs Fixed , which increased the number of arguments from 3 to 5.
    See https://git.drupalcode.org/project/mail_login/-/commit/929c4fa94a9cc2c11...

  • πŸ‡³πŸ‡±Netherlands Jan-E

    @mqanneh Is there something we can do to help you with a fix? My sites are nagging me about a security update that I cannot install.

  • πŸ‡ΊπŸ‡ΈUnited States trobey

    This affects a security release.

  • πŸ‡ΊπŸ‡ΈUnited States trobey

    This is a patch for 8.x-2.7 that contains only the code for the flood control.

  • I see there is a new declaration for routing "user.login" in mail_login.routing.yml, but there is no controller or somthing handler for this routing to overwrite the core routing. So can someone explain to me what adding routing and new form MailLoginUserLoginForm is for?

  • Status changed to Fixed 9 months ago
  • Status changed to Fixed 9 months ago
  • πŸ‡―πŸ‡΄Jordan mqanneh Amman
Production build 0.69.0 2024