Skip to content

500 error on "Authorization Code" flow since upgrade from 4.2.0 to 4.2.4 #3

@DRoppelt

Description

@DRoppelt

Hi,

we have updated some dependencies in our orocommerce application and face issues with oauth2 "Authorization Code" flow now. Logins are not possible and hit a 500 error

Summary

We updated "oro/oauth2-server" from 4.2.0 to 4.2.4 (4.2.0...4.2.4) and now get a "500 internal server error" when vising https://orocommerce.local/oauth2-token/login

Steps to reproduce

Actual Result

500 error

Expected Result
Not 500 error, get a login-screen

Details about your environment

  • OroPlatform version: 4.2.5
  • PHP version: 7.4.19
  • Database (MySQL, PostgreSQL) version

Additional information
Logs in var/logs/prod.log

[2021-08-09 19:57:39] security.INFO: Populated the TokenStorage with an anonymous Token. [] []
[2021-08-09 19:57:39] request.INFO: Matched route "oro_oauth2_server_frontend_login_form". {"route":"oro_oauth2_server_frontend_login_form","route_parameters":{"_route":"oro_oauth2_server_frontend_login_form","type":"frontend","_controller":"Oro\\Bundle\\OAuth2ServerBundle\\Controller\\LoginController::loginAction"},"request_uri":"https://dev.vinnoplace.com/oauth2-token/login","method":"GET"} []
[2021-08-09 19:57:39] request.CRITICAL: Uncaught PHP Exception Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException: "Service "oro_oauth2_server.client_manager" not found: even though it exists in the app's container, the container inside "Oro\Bundle\OAuth2ServerBundle\Controller\LoginController" is a smaller service locator that only knows about the "Symfony\Component\Security\Csrf\CsrfTokenManagerInterface", "Symfony\Component\Security\Http\Authentication\AuthenticationUtils", "doc
trine", "form.factory", "http_kernel", "parameter_bag", "request_stack", "router", "security.authorization_checker", "security.csrf.token_manager", "security.token_storage", "serializer", "session", "templating" and "twig" services. Try using dependency injection instead." at /var/www/orocommerce/vendor/symfony/dependency-injection/ServiceLocator.php line 129 {"exception":"[object] (Symfony\\Component\\DependencyInjection\\Exception\\ServiceNotFoundException(code: 0): Service \"oro_oauth2_server.client_
manager\" not found: even though it exists in the app's container, the container inside \"Oro\\Bundle\\OAuth2ServerBundle\\Controller\\LoginController\" is a smaller service locator that only knows about the \"Symfony\\Component\\Security\\Csrf\\CsrfTokenManagerInterface\", \"Symfony\\Component\\Security\\Http\\Authentication\\AuthenticationUtils\", \"doctrine\", \"form.factory\", \"http_kernel\", \"parameter_bag\", \"request_stack\", \"router\", \"security.authorization_checker\", \"security.csrf.token
_manager\", \"security.token_storage\", \"serializer\", \"session\", \"templating\" and \"twig\" services. Try using dependency injection instead. at /var/www/orocommerce/vendor/symfony/dependency-injection/ServiceLocator.php:129)"} []

I believe that this change is the cuplrit:

grafik

(taken from here 4.2.0...4.2.4 )

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions