The bug, first reported on June 2, 2021, only manifests itself 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 to web developers, IndexedDB is one of two (the other being the Cache Storage API) recommended; the other options have specific use cases, gaps, or are not widely supported.
Feross Aboukhadijeh, an open source developer who runs Socket, said on Monday that the bug prevented his company’s web file transfer application, Wormhole, from working on initial load until a workaround was put in place. implemented.
“Opening an IndexedDB database fails 100% of the time on the first try,” he said. mentionned via Twitter. “If you refresh, it starts to work.”
“It’s really, really hard to build reliable websites on macOS and iOS with 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 come as web developers wait for a fix to be released for a bug affecting localStorage, a more limited browser storage API, in Safari 14.1 and later, and word a crash bug IndexedDB 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.
Browser 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 can’t compete with them. native applications of the iOS platform.
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 with the slowness with which they adopt the standards (if at all) and the incompleteness of the implementations, such as for media playback and WebRTC,” said software developer Matt Mastracci in an email addressed 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 article on Hacker News, Aboukhadijeh complained that Apple’s actions make Cupertino appear “downright web-hostile” and eager to push developers to build native platform apps (which, unlike web apps, Apple can control rules through its App Store).
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. ®