Improper update of Apple Safari interrupts IndexedDB JavaScript API and disrupts web applications • The Register


Apple’s WebKit team successfully broke the popular IndexedDB JavaScript API in the latest version of Safari (14.1.1) on macOS 11.4 and iOS 14.6.

The insect, first reported on June 2, 2021, only occurs when applications first try to use the IndexedDB NoSQL handler to store data. Reloading a web page or an application implementing the API fixes the problem, according to several bug reports.

Still, the situation is far from ideal for web developers and anyone using the desktop or mobile versions of Safari. While there are a variety of storage APIs available for web developers, Indexed comics is one of the two (the other being the Cache Storage API) which is advised; the other options have specific use cases, gaps, or are not widely supported.

Feross Aboukhadijeh, an open source developer who manages Socket, said Monday that the bug prevented his company’s web file transfer application, Wormhole, from working on initial load until a workaround was implemented.

“Opening an IndexedDB database fails 100% of the time on the first try,” he said. noted via Twitter. “If you refresh, it starts to work.”

“It’s really, really hard to build reliable websites on macOS and iOS with amazing bugs like this,” he said. added, imploring Apple’s WebKit team to prioritize a fix. “It should have been detected by basic unit tests.”

Safari’s issues with IndexedDB arise as web developers wait for the release of a fix for a bug affecting local storage, a more limited browser storage API, in Safari 14.1 and later, and word that an IndexedDB crash bug reported in 2019 will attract attention.

Paulus Esterhazy, Director of Engineering at Presentation biz Pitch, recently documented various issues with IndexedDB, many of which have to do with Safari, in a GitHub article.

“The Webkit team continues to send critical bugs related to storage to production over and over again,” he wrote.

Navigator engineering teams for Chromium, Edge, and Firefox, among others, regularly introduce their own bugs – Apple doesn’t have a monopoly on code errors.

But Apple’s technology poses a particular challenge for web developers, as the company requires all iOS browsers to be based on WebKit, the rendering engine used in Safari. Competition with WebKit is simply not allowed on iOS.

Apple’s platform rules are currently under close scrutiny by lawmakers and antitrust officials around the world and, in California, by U.S. District Court Judge Yvonne Gonzalez Rogers, who is expected to deliver a ruling in the near future. in connection with Epic Games’ antitrust lawsuit against Apple.

Google software engineers like Alex Russell have long complained that Apple’s browser development roadmap, limited API adoption, and platform rules ensure that web apps cannot compete with native iOS platform apps.

But others not affiliated with a major competitor of Apple share this feeling of frustration.

“Given Safari’s privileged position on iOS, Apple has been disappointing in how slowly they adopt standards (if at all) and how slow implementations are incomplete, such as for media playback and WebRTC.” , said software developer Matt Mastracci in an email to The register.

“At one point, the developers’ experience on Safari was high end, but they fall into the same trap as Microsoft when they had a monopoly on the desktop browser.”

In a recent Publish to Hacker News, Aboukhadijeh complained that Apple’s actions give the impression that Cupertino is “downright web hostile” and eager to push developers to build native platform apps (that unlike web apps , Apple can control through its App Store rules).

Apple’s neglect and underinvestment in the web platform definitely prevents websites or ‘PWAs’ from having ‘the look, feel and functionality of a native application,’ he said. he writes, “Safari suffers from the double effect of the limitations Apple has intentionally put in place and the intentional understaffing of the Safari team.”

We asked Apple about the IndexedDB bug and if its Safari team is understaffed compared to the competition. We would be stunned if he decided to answer. ®


Comments are closed.