DEV Community

rukrlf
rukrlf

Posted on

After iPhone 14's 16.5 update, our Magento site was crashing saying 'A problem repeatedly occurred on' mentioning our url

After couple of days digging Nipun (nippa) our js expert identified that it was actually a styling issue.

So, the bottom line is that this issue is related to how Safari 16.5 loads the current .less files. It's possible that the site's .less files are large, and the new Safari version might have a bug that messes with memory or struggles with handling such large styling files. so adding the new change to a new file have fixed it.

Initially we checked by disabling the custom modules, we checked the site on BrowserStack (BS) for iphone 14 - 16.5 update locally. There's a method in BS to check the local site on BS by tunneling. Then we enabled modules that we think aren't affecting a site crash like this. site was working fine. Then enabled a couple of modules I suspected. And it was the Algolia search customization module that seemed to be causing the issue. Then Nipun took over and carried on to identify exactly what causes the issue.

This is his update on that:

"Initially, I spent a lot of time debugging the JavaScript code, but nothing seemed to be the culprit. However, as you remember we discovered that removing the Algolia autocomplete code and disabling autocomplete Algolia, fixed the problem.

To address the issue, we manually moved the new Algolia code (the new update from Algolia themselves), which initially seemed to work. But we ran into some UI element breaks during the process. After fixing them, the issue popped up again. After more digging, we realized that removing the UI changes actually fixed the issue again, so as long as UI was broken site is working again

it was the UI fix, not the JavaScript fix, that resolved the problem. after removing all JS changes Adding the same UI fix to the existing .less file also broke the site, but same fix when added to a new styling file fixes the issue again without any JS changes

We also found some clues suggesting that the Safari crashing issue might be related to an iOS memory problem. Similar bugs with the same error message pointed to a potential memory issue.

So, the bottom line is that this issue is related to how Safari 16.5 loads the current .less files. It's possible that the site's .less files are large, and the new Safari version might have a bug that messes with memory or struggles with handling such large styling files. so adding the new change to a new file have fixed it.

all my js code changes have been removed , only a slight UI fix is now available on staging please test it."

Top comments (0)