318 points · by AshleysBrain · 3y ago · 274 comments
While it's fixed in webkit, the webkit team were unable to tell us if the fix would be in the shipping version of 16.4 and, despite discovering and reporting the bug before it even hit a beta, the shipping 16.4 has the bug.
I really feel for the team who are maintaining the code. It's clear they do a great job in difficult circumstances and it's several high-level policy decisions at Apple make things really challenging for them: they're unable to talk about when bugs and their fixes will (or will not) be present in release software; and Safari updates are tied to OS releases.
For example, here's what Chrome does: https://chromiumdash.appspot.com/schedule. All the dates are tentative and sometimes slip, but an engineer can point people to it, say "fix X made the branch cutoff for release NNN", and you can get a pretty good prediction for when X will get to what sort of devices.
But I guess they will stand until there is external pressure to force them to change e.g. in the form of regulation allowing to bundle alternative web browser engines and not giving preferential private APIs.
It took us over a year to realize this was the root cause for 2D barcode scanning issues - we had an information-theoretic failure mode due to the low resolution.
Safari is the last non-evergreen browser. As long as Apple insists on this policy it doesn't matter how good a job the WebKit team are doing; they're still hamstrung by the outdated release policy Apple enforces.
Luckily, soon Apple will be forced to allow alternative browsers. At that point, I hope Apple will spend some of its trillions on actually improving Safari, in order for it to stay relevant and competitive.
Safari seems to be the last bulwark against a Chrome-only web driven by features of the week.
Full Chrome/Chromium on iOS could very well end that, and I'm not thrilled at the prospect.
Personally I appreciate Safari's resistance to constant featurism in general, and conservative approach to features that are likely to compromise power usage or privacy. I have little desire for web apps to reach complete feature parity with native apps, or to have complete access to all hardware and OS features. Many developers may hate it and want to usher us into Google's PWA future, but I'm absolutely fine where things are right now. And I certainly don't want to have to use Chrome/Chromium for everything.
Lastly, as a developer, I don't like building on quicksand. And yet that's often what it feels like using web/JavaScript frameworks and browsers that change from week to week.
Nonetheless, OP's recommendation that Apple note which versions of Safari a certain bug is fixed in seems like a very good idea that should be adopted.
The pace of change in the frameworks world is completely independent of web and browser features. And the web is very backwards compatible — so new web platform features don’t rot the foundations of any existing web apps, assuming they use specified features.
I do agree releasing a broken implementation is bad, not clear what happened there. Aren’t Safari releases held back until a TP is free of critical issues? Was this not marked as critical due to being reported as an app issue instead of a Compression Streams or Service Workers incompatibility / regression?
Given the diligence of the Safari team - especially in the face of the extremely lazy first bug report - it's kinda wild that this person thought it appropriate to post such a negative angle.
The second bug report wasn't even a bug: Chrome & Safari had implemented an unspecified part of the spec. differently to each other (specifically the implementation behind generating client IDs for fetch events in web workers -vs- the main window). The op is relying on an unspecified implementation detail for their app to work. Yet the Safari team actively treat it as a bug in an attempt to be more generally compatible with Chrome.
My takeaway from actually reading through the content of the post is that the Safari devs are responsive and approachable, even even the bug reporter is lazy. Which is more than can be said of many other browsers projects.
"a problem repeatedly occurred" and page crashes all the time.
Only in Safari iOS 16. Worked in iOS 15. Works even in IE.
What kind of bug report can you make out of it?
No. Safari releases ship in lockstep with iOS releases.
This is because they all share code, and more importantly, security vulnerability fixes.
You might be referring to how Safari is updated independently of macOS on the 2 non-latest versions of macOS. But those are still released simultaneously with the OS updates, and Safari on the latest version of macOS is bundled with the OS update.
Apple is not a monopoly unless you’re just looking at mobile profits, which historically is not how a monopoly is defined (they’re not even a monopoly in the luxury smartphone market). Android is actually much closer to being a monopoly and does all sorts of deals to maintain their monopolies on search, browsers, and Android which would warrant investigation. Now maybe a monopoly should be defined as % of total profits in a market? Not sure. It would be breaking new regulatory ground for sure.
Also, from the sounds of it, Apple is going to be forced to allow third party browsers and app stores via EU regulation. It’s less clear exactly how that will work and whether that will be available to customers in other jurisdictions.
Out of all the things that the justice system was throwing at MS, bundling IE was the least of them and absolutely nothing changed about browser bundling in the US. No there was never a browser choice mandate.
Thats only true outside of the US though. iOS is >60% in the USA.
It has a kind of distinctive feel of nonsense, I don't know how to explain it.
let f = document.createDocumentFragment();
f.appendChild(document.createElement("div"));
f.firstChild.outerHTML = (`<a href="https://bugs.chromium.org/"></a>`);
Fails because a fragment "is not an element node", a completely bogus error. No idea if it fails in Safari, too, since I don't have a Mac anymore, but I'd guess so, since this reeks of the type of corner-cutting that WebKit was guilty of while swimming in accolades for being a fast, standards-compliant browser engine (in contrast to e.g. Gecko).How is it bogus? outerHTML is an attribute of Element https://developer.mozilla.org/en-US/docs/Web/API/Element/out... and DocumentFragment is not an Element https://developer.mozilla.org/en-US/docs/Web/API/DocumentFra...
> No idea if it fails in Safari, too
It does.
Have you considered that it's just a Gecko quirk that it happens to work in Firefox? Where do the standards say it ought to work?
Re-read what is written. I'm setting the outerHTML property of an element, not setting it for the fragment (which is the only way that your response would make sense).
> Have you considered that it's just a Gecko quirk that it happens to work in Firefox?
No, because I'm not a moron.
> Where do the standards say it ought to work?
Exactly where you'd expect to find it: in the specification of the outerHTML property (Leithead et al. DOM Parsing and Serialization, Extensions to the Element interface, §7.1 Attributes: outerHTML. 2016.)
The wording has not changed since the 2016 version of the DOM Parsing and Serialization standard [0]:
> On setting, the following steps must be run: 1. Let parent be the context object's parent. [...] 4. If parent is a DocumentFragment, let parent be a new Element with
> - body as its local name,
> - The HTML namespace as its namespace, and
> - The context object's node document as its node document.
But Blink instead throws a DOMException with name "NoModificationAllowedError" and message "Failed to set the 'outerHTML' property on 'Element': This element's parent is of type '#document-fragment', which is not an element node." This was filed as a Chromium bug last December and assigned a week later [1].
[0] https://www.w3.org/TR/2016/WD-DOM-Parsing-20160517/#widl-Ele...
I've yet to run into a single case of some code running well on Safari but breaking on other major browsers, so by ensuring my code is compatible with Safari, I'm basically guaranteeing full compatibility with everything.
"Want global web compatibility? Fuck you buy a Mac"
-Apple
(The Edge VMs don't appear available anymore but since Edge is cross-platform and free it should be easy enough to install it in your own VM or on your workstation.)
Still better than "whatever we throw over the wall is now a standard" that Chrome has, and you can see people clamouring for those on HN.
It's easy enough to not use stuff like web USB, and in my experience chrome and firefox "get along" while a page (doing more advanced things) not built for safari simply will not work in safari.
The problem with safari is that Apple makes it so you have to use it if you want your site to work on it. Chrome, I can safely ignore.
I also literally can't use safari if I don't have a Mac.
I will however, take chrome and user choice every single day over Safari's monopolistic crap.
The mere fact it's largely successful by it's nature of being bundled should scream to you how bad it really is.
This isn't a Chrome vs Safari issue (Safari is better, of course), it's the fact that browser development suffers from Apple's corporate wall of silence. In this case, devs literally suffering.
Ah the sweet nectar of naivety. Godspeed to you.
Can't believe I've been a webdev 15 years. What's old becomes new, except for me that is....
https://www.quirksmode.org/blog/archives/2021/08/breaking_th...
1. IE6, a titanic that that wants to harm the web so they can push their own ecosystem instead.
2. IE11, the incompetent and rarely updated browser that you have to support because a segment of your userbase is stuck with it.
This article tries to argue 1 isn't the case, but I have to disagree. Safari isn't as large as IE6, but it regardless tries to fill the same role. Ensuring apple gets their app store cut.
2 is also the case, but that needs less argument.
I mean you know there was a period of time where Safari existed and Chrome didn't.
Let’s just throw in the towel now and rename the web to the Chrome Platform.
There's an important and cool concept here about using the weakest link sometimes.
Similar example: as an app developer, I intentionally use a phone several, several generations behind so I can see what the actual response time and general UX feeling is on the devices frankly a lot of users are going to have.
If my app runs well on my iPhone 8, it's obviously going to scream on a 12.
I'm basically guaranteeing full compatibility with everything, because everyone has to comply with IE's behaviour. After all, I put a "Best viewed in Internet Explorer", this way if it fails, people blame their browser and not me.
It's clear that they're still trying to undermine the web where possible, without it seeming too obvious or getting them into hot water re: the recent monopolization debate.
- Apple doesn't want others to dictate their development schedule.
- Some Web standards clash with Apple's privacy promises.
While I'd like Apple to do a bit more about those long standing bugs, I think the narrative they are actively undermining the web is short sighted. I prefer Apple's behaviour instead of Google's behaviour to actively monopolise the web...
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/in...
---
As a tangent. If it was Apple of, say, 5-10 years ago, I'd also root for them to get their head out of their ass and lead in https://open-ui.org/ (started, of all people, by devs from Microsoft). Alas, with the way they approach interfaces these days, I'd want them far away from leading :)
Webkit is releasing more often and closer to the standards now than they used to. I'm guessing Apple knows they will be forced to allow other engines on iOS and are finally making Safari a good product.
I am yet to meet competent developers who have ever given two hoots about “super fastest browser #1!!” blog posts over feature completed-ness / spec-compliance.
I hope the C-level exec at Apple sees this and realises why more devs are going to go with Edge (lol) / Firefox support: the sales guys are running Apple now.
It was not just that IE was broken in all sort of very odd ways, or that it was incompatible with the rest (and standard), or that it was essentially a monopoly.
It was all three. So a site built for IE would not work at all in other browsers if it used anything remotely advanced (and advanced back then was users events), you had to support IE to live (on anything but demo site), and doing so was hell on earth because the bugs went from top to bottom (the browser’s memory management had to be worked around, and there were no memory profiler, hell the debuggers only worked half the time).
Not that it’s any fun encountering a buggy browser, even less so when a feature is so broken you’d be better off if it were not supported and just did nothing or used a fallback and you now have to coerce it into that, and it does seem to be a recurring issue of safari.
But it’s no IE, at this point you’d need malice aforethought to get there.
I mean, I don't think it's even close to beign modern day IE. Perfect? Far from it but definitely not as much of a pain as IE
This is the endgame of a monopoly. Other people start demanding others stop fairly competing with you.
I'd like to think I'm a competent dev.
I use Safari as my daily driver because the difference in performance/battery life on Apple silicon is worth whatever small incompatibilities I run into. It just doesn't ever impact me on a day-to-day basis in the way that performance and battery life do.
Good engineering is all about trade-offs and this is one that doesn't even require a second thought for me.
What also is cool in Safari is to zoom into a page so that everything gets bigger which makes it easier to read text or view pictures (not sure if this is the normal zoom a site has, or something on top OS wise). But a lot of sites are breaking that behaviour now, which results in either not being able to zoom or elements overlapping in weird ways, text not staying where it should. I wonder what CSS stuff is used there.
At the same time, I don't really see why they should aim to replicate other browser bugs or be responsible for author's idiosyncratic assumptions regarding feature availability. It's a shame that browsers don't have to undergo strict compliance tests and that JavaScript is generally pretty much awful. Under these circumstances the most popular browser (Chrome) is taken as a gold standard and that can't be good for the open web.
There are compliance tests, and it's a thankless job to create and maintain them that some people do. But browsers are bigger than some OSes now. It's almost impossible to create comprehensive compliance tests that cover everything.
Standards compliance really is the name of the game, and I wish people like GP had more pull to force Apple to make these reasonable changes.
His second one in particular is his app relying on unspecified implementation quirks - the Safari devs are responsive due to a desire to be more compatible with Chrome's quirks, not because they've failed to conform to spec.
His first bug report is just lazy and devoid of any detail - completely relies on the Safari team to do the work of debugging his app for him.
I've filed dozens of issues with Apple and many of them go in to great detail. However when you're pushed for time and dealing with multiple potential emergencies, you can't always manage much more than a "heads up, this looks wrong" type issue. In the case of the first bug, it was indeed a real problem with Safari and it was Apple's responsibility to fix it. Given that Apple are a trillion-dollar company with thousands of employees, and we have a handful of people in an office in south-west London, I think it's reasonable that Apple does more of the heavy lifting investigating Safari issues anyway. Ultimately it's up to Apple to make Safari a high-quality browser, not us, although we still do our bit with bug reports where we can.
I understand the stress, but why do they think their product deserves more of Apple's attention than Safari's own product team who undoubtably are working to hard deadlines?
This felt like a really, really long whine because they didn't account for certain issues, and I found the 'Apple employee' references to be a little crass
It might seem like I’m stating the obvious, but I really do think it could be worth spending time with the preview releases.
I assume the reason this isn’t done is as pointed to in the article - a lack of correlation between what goes into a preview release and what ends up in a real release, but is it really the case that none of the three issues raised could have been avoided if they had been spotted slightly earlier?
The first looks like it was a case of over reliance on what was communicated by Apple. “Trust but have a backup plan” would seem like a useful approach here, if it is reasonable to consider the option of enlisting or creating a compatible replacement for using the Javascript zip library.
The second issue - reliance on a bug - just seems like something that is easy to fall foul of, but in retrospect would it have been possible to have noticed that there was an assumption being made, or that there might be a test missing to catch a future change in behaviour?
The third sounds like an assumption in the application code (that a value would not be null) which may have been a perfectly fine thing to do, if it was going to be obvious what the issue was as soon as it broke, but…
… the description of the pain of having to put out an ‘emergency’ release gives the impression that there is scope for making this process easier. I understand, of course, that automated testing of anything that runs in a browser is still hard, so it may be that it’s this part of the release process that causes friction and the returns from improving this have already diminished as it’s been refined.
It’s such a great product and I hope there can be less friction in keeping up with Safari as it’s fantastic to see cross platform web applications continuing to thrive.
Ahh, that's your problem right there, man. Apple don't change for you, for me, or for anyone who isn't called Tim Cook. They'll be out there doing their monopolistic, zero-sum, winner-takes-all, my-way-or-the-highway, straight-outta-the-'90s thing, forever and ever.
Apple doesn't care about developers really, as far as the company is concerned they're all little sharecroppers on Steve's garden. Any help you get you should be thankful for, because you have no rights there and never will have. Enjoy your Stockholm syndrome while it lasts.
"Most powerful" phone runs out of memory, but 10 year old Android can handle same site fine. It was working fine in iOS 15 also. And works even in old IE11.
Every iOS release is horror, what will be broken again...
Yes, I am angry and tired of Apple's lack of QA. Trillion dollar company should invest more in quality.
I sympathize with those who still do and I'm looking forward to EU regulations to allow other rendering engines.
Hopefully once the EU forces Apple to open up their app store I can just tell all of my users that Safari is unsupported and that they should switch to Firefox.
For me, Safari is het only browser I truly trust, because Apple makes money from selling me stuff, instead from selling me.
[1] https://www.theverge.com/2017/12/16/16784628/mozilla-mr-robo... [2] https://www.theverge.com/2021/10/7/22715179/firefox-suggest-... [3] https://blog.mozilla.org/advancingcontent/2015/05/21/providi...
To be quite honest, I don't care. I'm just a single guy working in his spare time; I don't have the resources to keep up with a trillion dollar corporation.
I'm so done with the endless Safari-only hacks. I'm so done with having to push emergency updates because Apple decided to suddenly break half of my website in the newest version of Safari. And I'm so done with having to explain to my users that, yes, audio autoplay doesn't work on Safari, and no, it's not a bug, it's because Apple actively blocks it and won't let you decide for yourself if you want to enable it for my site, and all of that because they want to force me to build a native app (where I can autoplay to my heart's content) so that they can extort 30% of my income.
> where they obviously prioritise making money over the interests of their users.
...and Apple doesn't do that?
> because Apple makes money from selling me stuff, instead from selling me.
Are you sure? https://proton.me/blog/apple-ad-company
A trustworthy browser holds itself accountable by making it's code transparent and it's intentions clear. Mozilla is terrible at marketing Firefox, but I'd argue they've built a much more amicable framework for the web than Apple has.
> I can just tell all of my users that Safari is unsupported and that they should switch to Firefox.
What do you need from a browser that Safari doesn't support? In my experience, everything except obvious bugs has an easy work-around that is supported by the other platforms.
For me: a download for Linux or Windows so I can test with the browser. A macOS VM, like Microsoft used to provide for IE development, would also be acceptable.
All my personal projects and even professional projects haven't supported Safari for this very reason.
It's also worth noting that Apple has the bad habit of discontinuing Safari Technology Preview support on older macOS versions faster than they discontinue Safari support on older macOS versions, which results in testing gaps for Safari on those versions.
Safari supports the last 3 macOS versions, while Safari Technology Preview only supports the last 2. Take a wild guess which macOS version gets the most new regressions from new Safari versions.
It's more like Xcode, where every point release breaks something. You need to design your software and your development pipeline to handle that.
Even Google isn't great in this but their continuous release schedule makes it less likely to break things in the wild because they get constant pushback.
I'm still investigating whether this is something that's actually changed with the not-exactly-spec for this WebKit-specific CSS property, but given the behavior I've already observed when trying to debug it, it certainly seems like a regression.
PS; I am not very well off, so buying devices merely for testing on a browser seem pretty overkill.
Re: The release timing/schedule problem, I agree that more transparency on the release date would be nice, but since it is tied to an entire OS release, they probably can't do that. The way to go is to keep an eye out for the beta release cycle of iOS. They will typically release 5 or more betas, and then one or more RCs, and then a GM, and then will start rolling out the update to users. There are several websites like Mac Rumors, Apple Insider, 9to5Mac where you can get a good temperature of where in the cycle Apple currently is.
IMO absolutely any time you have to sniff a browser user agent there's a failure somewhere. If there's a spec the implementation should adhere to the spec.
> After 16.4 came out you could check if it worked, and remove the patch at your own pace.
Great for regularly updated web sites but if you're making a tool you don't want to maintain it'll forever be stuck in a state where Safari performs worse because it isn't using the correct API. And that sucks for users.
In this case I would probably add an "if Safari >=16.4 then skip compression streams" check, but that check would probably still be there in a couple of years. Resolving the immediate issue of "the product doesn't work on Safari" gets priority but "let's see if Safari got their shit together" would be a low priority task for me.
There bad (or seemingly incomplete) spec implementations are how you end up with "your browser is not supported" plastered all over web apps. When Blink will inevitably hit iOS, Apple will have to do a better job placating web dev concerns if it doesn't want to lose market share.
* https://chromium.googlesource.com/chromium/src/+/main/docs/i...
> ...uses OffscreenCanvas when available
I think it's a mistake to write your code to automatically use new platform capabilities when they become available if you won't have an adequate chance to validate them first.
It's just too optimistic to believe a new implementation of a low-level mechanism is going to work exactly the way you need. (1) new things have new bugs; (2) changes are you'll end up depending on implementation details that will vary between different implementations.
In most cases I have found that feature detection + a blacklist of problematic browsers is often a good compromise. But there is no perfect solution.
It's your choice: (1) don't use it; (2) validate it before using it; (3) roll the dice on behalf of your users -- that is, use it without validating it.
Don't let religious beliefs around UA-sniffing cause you to screw over your users.
I use Safari as my main content browser but typically switch to Edge for development work.
Also when you read W3C specs it can get confusing pretty quickly, vage wordings, etc. Or have MDN documentation that doesn't describe particular behaviour that is defined in the W3C specs etc.
Isn't that like illegal or something? Like Microsoft got sued for it?
Spanning Tree Protocol? :D
Perhaps because WebTransport is still not even anywhere close to be to a web standard? Perhaps because its status is literally, quote:
--- start quote ---
works in progress inside a W3C Group and are not required to have the consensus of the Group participants. These drafts have not received formal review and are not endorsed W3C.
These drafts MUST NOT be cited as W3C standards and may or may not become W3C standards.
--- end quote ---
Just because it's shipped in Chrome does not make it a standard that every other browser has to implement immediately.
Apple - beautiful hardware, crappy software...
Hopefully apple gets sued someday so we can stop using their horrible browser
The "evergreen" madness must stop for platforms that are app delivery targets.
Or do it like Java does it...
1. A genuine (?) Safari bug with the CompressionStream API. (we never learn what the actual bug was, and their bugreport to WebKit was literally just that "hey, our website at URL ... doesn't work" - no minimal reproducible example whatsoever. Lol)
2. An issue due to them relying on a Chromium bug.
3. An issue due to them assuming that OffscreenCanvas will always support both 2D and 3D (WebGL) contexts.
The post makes it sound like both Mozilla and Google are better at handling releases, but Chrome has the service worker bug, so I don't know if that's actually true.
I get that Safari is sluggish, at least compared to Chrome and is currently lacking features, but doesn't it seem like they've picked up the pace in the last year or so?
only mdn docs do list the context types as separate subfeatures in the support table, as does caniuse
[0] https://html.spec.whatwg.org/multipage/canvas.html#the-offsc...
This is not a good summary of the article. They're aren't mad at the bugs, they're mad at how Apple handles Safari releases (as seen in the very title of the article).
If you read the "how to fix it" section, the fixes are "transparency", "update Safari independently of the OS", "more pre-release testing options", "communication".
You can't put that aside, because it's the entire point!
"The bug is fixed in the git repository, but we refuse to tell you if or when the fix will appear in Safari" is communication, but it's not the kind of communication needed for web developers.
> The diligence from the Safari team in responding to those bug reports is not something I've seen from other browsers vendors.
I have to disagree there.
If possible you should have automatic tests that you can run automatically in several browsers.
Some browser need to be the first one to implement new functionality, before there is a specification! Then the specification comes and often it's different then the already implemented API.
You should not complain about new features, and you should not complain when browsers follow specifications. Instead you should have tests, and encourage users to report problems.
Most browsers have a beta/review release, you can run your test on that, once per day, automatically. Use a program that automate mouse movements and clicks, for example Puppeteer for automating Chrome. (tip: also do performance test while you are at it, so you will know which changes affect performance)
A large part of the post's complaint is that not only does Safari not have a nightly build, but they don't even give advance notice of when their "technology preview" (beta) or stable releases are coming.
Chrome, by contrast, not only has a public schedule, but a public dashboard where you can follow along.
262503@main
April 3, 2023 at 01:23 PM GMT+2
262502@main
April 3, 2023 at 10:51 AM GMT+2
262501@main
April 3, 2023 at 10:17 AM GMT+2
https://webkit.org/build-archives/#mac-ventura-x86_64%20arm6...HAHAHA.
Are you not aware that every browser in iOS is basically wrapper for Safari?
New bugs in Safari will break other browsers also.
Unfortunately iOS users don't have this option.
I haven't found that to be entirely true. Users will definitely have multiple browsers installed but that's usually because someone in their IT department had them install a second browser for testing. Most users will use one browser the entire time and need someone to tell them to try it in another browser if it's not working.
If every website works in Chrome and most websites work in IE, users will switch to Chrome. Same with Safari. If the thing you're building is interesting enough for users to return to it, the unsupported browser may just stop getting used all together, especially if multiple sites break at the same time (i.e. when Safari broke WebAssembly support).
I don't. If your web site doesn't support Safari then I will take my business elsewhere.
Okay, how do I run headless Safari in a CI exactly? And how do I run Safari mobile in a CI since it has different bugs than the other one sometimes?
I'm sure some people hacked some stuff together with ducktape but you are far far outside the supported development cycle of this software.
Is there any statistic to back that up that safari users first blame their browser and switch to a different one before they give up on a site? And why are they still using safari in the first place if it happens so frequently that they made a habit out of switching browsers? I'm not convinced.
Please go and meet some of your users in person and watch them use a computer/phone. Your eyes will be opened to a world you never knew existed.
Apple literally goes out of their way to deny you the right to use another browser engine on their mobile phones.