Puzzled Why Instagram Fails on Safari

puzzle with a piece missing

I wanted to look at Instagram to see if every art hashtag was still overwhelmed with terrible AI art, but today on Safari, all I get for every page is:

It works on every other browser I have. But why?

In the console are two errors, found and placed there by Instagram's error handler, the first complaining that an Ajax call is returning HTML instead of JSON, in fact, an entire HTML page. That made me curious enough to look at the source as to why.

I wish I hadn't; what a massive pile of bizarre javascript. It must have been run through some kind of obfuscator (for no reason, I can imagine, since it must be hard to understand even unobfuscated). It must have included a lot of auto-generated code, and I assume it's React. The main JS file is around 150,000 lines, mostly building huge dictionaries of functions and other dictionaries and things I have no idea what they might do.

If this is supposed to be high-quality modern web code, I am glad I spent the last ten years building iOS apps. Perhaps the code makes more sense in the original source code; I can't fathom any other way someone could possibly have a clue what this app does otherwise. It epitomizes the meme "The Goggles They Do Nothing."

Clearly, Instagram/Meta would prefer everyone only look at their content on a mobile phone, they had no iPad app the last time I looked, and this attempt at a website looks amateurish at best. Yet somehow, they have a 150,000-line Javascript file. I wonder why they pay such exorbitant salaries to wind up with such an ugly, massive codebase that looks this terrible.

Looking at it on another browser (Brave, in this case, which looks like Chrome to the server), I still found most of the art hashtags poisoned by repetitive AI art (oh look, more fantasy women with significant assets). The website is also very slow to respond, which seems embarrassing for a company as large as Meta. The list of images is just a stack of square images with no filters or sorting options, and you can tap on one of them to see the image and its comments as a modal. Strangely enough, tapping on a hashtag in a comment mostly does nothing (oddly enough, it works occasionally). It appears to have been built with no Product team or QA that I would have tolerated. I can only imagine it was never taken seriously as a project.

How is this acceptable to anyone? I wonder how many engineers it takes to build something so bad yet so complex.

You might wonder why I don't use their app on my iPhone. I like seeing images larger than 4 inches across. All of my art is bigger than even my huge display can show, but at least I can fill the screen. Phone screens are fine with crappy AI art (since they degrade on larger screens), but I would rather see all the details of something I find interesting.

I wonder what people who spend their whole day building modern web apps think of this codebase. Facebook is also made along the same lines, though it works properly and involves actual UI and product design. I also imagine the team behind it is enormous. Since all I can see is the end result and wonder how it all works together, I assume the people that work on this understand it better from the source code side.

In the past, I have heard that Facebook prefers fully automated QA, but I never cared for that type of solution; I always built apps (desktop, web, and mobile over my career) used by people, and I always made sure that people were involved in testing everything (assisted by automation, when it was possible, but never exclusively.)  People are far better at seeing strange things and finding inconsistencies; automation is better at highly repetitive testing. However, in the early days, I had QA who could test highly repetitive areas daily, which would have driven me insane.

Ultimately, I have no idea why Safari isn't working for such a strange reason. Safari can be odd sometimes (the Citibank website refused to let me log in on Safari for months, returning an error of "your browser is too old," but I was told it was a bug). It makes me glad I don't work on the Instagram website, but I am curious why it's so poorly designed and written.