At work recently we had a customer call in with an urgent problem on a Magento website that we support for them.
The problem was that for some users they couldn’t login – we thought this sounded a bit strange. Surely an application or server issue would result in all users being unable to login, right?
So, immediately we jumped on the server to dig through the logs and establish what was going on. This was obviously a priority issue as this was service affecting for our customer.
The weird thing is, when we got on and enabled all of the debug log options in Magento, there was nothing. Absolutely nothing was being logged at all.
Strange, so we hopped in to Chrome and tried to login – we were immediately just booted back to the login screen, with no error. Assuming this was a strange database or other authentication issue, I wanted to confirm this by attempting to login with an incorrect password, though this did present me with an error stating my password was incorrect – just as a normal functioning website would.
Then, one of my colleagues on their machine attempted to login – they were successful. I was unable to login to the website using Google Chrome, however, they were able to using the exact same version of Google Chrome.
I fired up Safari (we use macOS at work – Mojave rather than Catalina as that seems to be nothing but buggy), and was able to login in fine. Checking again on Chrome still just bounced me back to the login page.
Clearing my local browser cache simply did nothing. This website wasn’t behind Cloudflare so it wasn’t a weird caching issue there, either.
So, what was the fix? Well, a bit of a weird one. Many issues in Magento are simply caused by the Magento cache being wrong or stale and are easily fixed by clearing it. I hopped in to the Magento admin panel and cleared the cache, but alas this did not fix it.
My next thought was that maybe the cache didn’t really clear? So I jumped on to the server and checked the /var/cache directory under the Magento installation directory and sure enough, the disk usage dropped as expected.
As a last resort I went in to the /var/cache folder and deleted everything in it. To my surprise, this resolved the issue.
I spent plenty of time going backwards and forwards testing this to verify that this was working – I absolutely under no circumstances wanted this to be a fluke – we had to get this sorted. Thankfully, it did indeed fix the issue
We’re not 100% sure what went wrong on this site, as unfortunately it is one we inherited rather than one we built, but we’re working on that. I’m pleased to say that none of the websites we actively build have had any random weird bugs.
This was just a post I wanted to write as I couldn’t see many people having this when wanting to dig deeper to understand the issue. Please hit me up on the contact me page if you have any more information as we really do want to make sure this doesn’t happen again.
See you in the next post.
