-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Argument 1 passed to Symfony\Component\Routing\RequestContext::fromRequest() must be an instance of Symfony\Component\HttpFoundation\Request, null given #28
Comments
I think you will need to dig a bit deeper. There is no request object present, so is the entire process initiated by an internal redirect / call / command somehow? |
I don't have enough context to dig into. Your error seems to come from https://github.com/AdactiveSAS/saml2-bridge-bundle/blob/master/src/Entity/HostedEntities.php#L141 where the bundle retrieves the master request from Could you provide a complete stack trace? |
I'm new to SAML so I'm probably missing something. Anyway, it seems to works flawlessly during normal operations, while only the command php bin/console debug:event-dispatcher triggers this error. Here's the output in verbose mode, it's all I got:
|
OK so the issue is only when running console command. Which makes sense as it rely on request_stack. You can try to do a PR otherwise I'll have a look this weekend. |
Google brought me here, here is the solution:
|
Got this error, can't figure out why. Running v0.10.0 on Symfony 3.4.14.
10:40:46 ERROR [console] Error thrown while running command "**debug:event-dispatcher**". Message: "Argument 1 passed to Symfony\Component\Routing\RequestContext::fromRequest() must be an instance of Symfony\Component\HttpFoundation\Request, null given, called in /Volumes/Dati/WORK/icgest/vendor/adactive-sas/saml2-bridge-bundle/src/Entity/HostedEntities.php on line 141" ["exception" => TypeError { …},"command" => "debug:event-dispatcher","message" => "**Argument 1 passed to Symfony\Component\Routing\RequestContext::fromRequest() must be an instance of Symfony\Component\HttpFoundation\Request, null given, called in /Volumes/Dati/WORK/icgest/vendor/adactive-sas/saml2-bridge-bundle/src/Entity/HostedEntities.php on line 141**"] []
The text was updated successfully, but these errors were encountered: