All routes redirected me to /login route
Following the upgrade to the latest version of the B2B demo shop in 202311, every route redirects to the login route, subsequently resulting in an ERR_TOO_MANY_REDIRECTS error. Additionally, I am unable to access any pages while in anonymous mode.
Answers
-
Hello. I didn't have that exact error, but something similar where after the upgrade when I would login and after that add something to cart, I would be redirected to the homepage and I would be logged out. For me, the problem was the max-age option that was added to the HTTP request in the config file. After I removed the option, everything started to work again es expected. I'm not sure if this is the problem also on your side, but it's worth to try.
$config[HttpConstants::YVES_HTTP_CACHE_CONTROL_CONFIG] = [ 'public' => true,
'max-age' => 3600,];0 -
I think this is not my case unfortunately
because all routes redirect to log-in automatically and at the end gives me 502 error
0 -
The issue with CustomerPage module when registering customer page security plugins it gives me an exception regarding anonymous auth entry
Spryker\Shared\Security\Exception\AuthenticationEntryNotRegisteredException - Authentication entry `anonymous` is not registered.
0 -
When I register those 2 deprecated plugins
AgentPageSecurityPlugin(),CustomerPageSecurityPlugin(),
it gives me the above error, But If I register the new plugins it will cause too many redirects issue
YvesAgentPageSecurityPlugin,YvesCustomerPageSecurityPlugin
0 -
Hi @M.abdallah ,
I can see I have today the same issue than you.
When I upgrade my app from 202212.0 to 202307.0 (I'd rather upgrade step by step to avoid to stack issues), I had to replace the SecurityPlugins by Yves and Zed SecurityPlugins because of the same
AuthenticationEntryNotRegisteredException
. And since I did that, I'm stuck in a redirect loop, could you share how you have fixed that please?0 -
fsmeier Senior Software Engineer & Developer Enablement Advocate Sprykee Posts: 1,084 βοΈ - Guardians (admin)
Heyhey,
I also came across this some time ago and I dont remember the exact solution anymore. It had sth to do with missing plugins or settings after migrating to the split-version of zed. Is this one here helpful?All the best,
Florian
0 -
Hi Florian,
thank you for that, but we already are with the split version from the beginning of the project, I've checked the linked documentation, and everything is setup as said.
I've had a look to the other replies, and I can't look at AccessControlEventdispatcherPlugin variables values, as xDebug doesn't want to be stop in normal mode (I can profile but not debug "normally").
And RequestAttributesEventDispatcherPlugin is not missing.
Thank you for your answer
0 -
fsmeier Senior Software Engineer & Developer Enablement Advocate Sprykee Posts: 1,084 βοΈ - Guardians (admin)
Hmm.. sad to hear that this is still not solved :(
At this point I dont have any further idea as it will likely be an annoying tiny small detail which causes this. Only way I found out the cause of this in another project some years ago was with deep xdebugging.
Maybe its worth to "fix" your xdebug then?
All the best,Florian
0 -
To be honest I don't remember what the exact issue was because it was a long time ago
But do you have
RequestAttributesEventDispatcherPlugin undergetEventDispatcherPlugins() && getBackofficeEventDispatcherPlugins()
?
0 -
Thank you for answers,
@fsmeier , I'm afraid you are right about "it will likely be an annoying tiny small detail which causes this" that's often the case ^^. About my xdebug, the strange thing is that I can't activate the chrome (nor firefox) extension, it stays gray, but in my app, if I deploy in profiling mode, it works perfectly. I don't know if it's directly a xDebug issue :(
@M.abdallah , thank you, indeed I had this plugin under getEventDispatcherPlugins but not in getBackofficeEventDispatcherPlugins, I've added it, redeploy but there is no change.
Do you think a xdebug cachegring file could help? It's quite hard for me to see in it which method is involved into this redirects.
0 -
Hello here!
Thanks to Spryker help, I could fix these two issues:
- About xDebug not working in debug mode: if you can't activate the chorme extension (can occurs when you have ERR_TOO_MANY_REDIRECTS error), what you can do is to die into public/yves/index.php:
[β¦] $errorHandlerEnvironment->initialize(); die('XXX'); $bootstrap = new YvesBootstrap(); $bootstrap ->boot() ->run();
When your window dies, you can now activate xDebug, remove (or comment) your die, and then, finally debug :)
- About the error itself, it was the '$exceptionOnNoToken' variable which was set to a wrong value because of some symfony packages in version 5 and some others in version 6. These are incompatibles of course.
1
Categories
- All Categories
- 42 Getting Started & Guidelines
- 7 Getting Started in the Community
- 8 Additional Resources
- 7 Community Ideas and Feedback
- 76 Spryker News
- 927 Developer Corner
- 785 Spryker Development
- 88 Spryker Dev Environment
- 362 Spryker Releases
- 3 Oryx frontend framework
- 35 Propel ORM
- 68 Community Projects
- 3 Community Ideation Board
- 30 Hackathon
- 3 PHP Bridge
- 6 Gacela Project
- 26 Job Opportunities
- 3.2K π Slack Archives
- 116 Academy
- 5 Business Users
- 370 Docker
- 551 Slack General
- 2K Help
- 75 Knowledge Sharing
- 6 Random Stuff
- 4 Code Testing
- 32 Product & Business Questions
- 70 Spryker Safari Questions
- 50 Random