-
Notifications
You must be signed in to change notification settings - Fork 10k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unexpected Syntax Error in blazor.web.js on iOS Versions Below 17 in .NET 9 Preview 7 #57326
Comments
@MackinnonBuck Could you please clarify why this issue is closes? |
@ysmoradi do you have specific repro steps for the problem you had? I created a new .NET 9 Preview 7 app using |
@ysmoradi, could you also clarify whether you were able to reproduce the problem with a Blazor Web App (blazor.web.js, as the issue title suggests)? Or does this only happen in |
The repro comment suggested it was all of them:
But I'd like to confirm this with screenshots or if we can repro it ourselves. |
The issue exists for iOS 14, 15 and 16.3, but it worked for me on iOS 16.4, 17 and 18 (beta) |
Ah thank you, I'll try to replicate on those versions as well. |
Alright confirmed repro on iOS 16.2 Simulator with a Blazor Web app. And just to make sure it's not a general issue with iOS 16.2, I tried a Blazor .NET 8.0 web app and that worked fine. @MackinnonBuck - if someone can provide me with an unminified blazor.web.js I can try to use that instead of the default |
@Eilon are we talking about Note that in any case older versions are not officially supported as per https://learn.microsoft.com/en-us/aspnet/core/blazor/supported-platforms?view=aspnetcore-8.0 Given the type of error we are seeing, it's probably that the bundle depends on a newer JS syntax not supported in those Safari versions. One option in that situation would be to transpile the bundle to a lower JS subset, but that's not something we will do. |
first of all, thank you for bringing up this issue and discussing it in detail. the main question here is, are you going to stop supporting those older versions of iOS in the future versions of .NET and Blazor? (so we can also drop the support in our products) https://gs.statcounter.com/ios-version-market-share/ thanks in advance. |
Note that this issue happens in blazor.web, blazor.webview.js and blazor.webassembly.js |
another note: |
😒 |
For what is worth, apple provides their own numbers on marketshare https://developer.apple.com/support/app-store/ |
Thanks for your input. It seems there's been a misunderstanding, my main point was to show that most of the users are using the latest versions of iOS, but still around 10-20% are using those old versions that have the problem discussed in this issue. So based on these data, is Blazor not going to support those older versions of iOS anymore? |
It is important that 32% of iPads have system older than 17.x. Now ask yourself a simple question: do you want to reduce your income by 32% ? I think you're not ready for this unless your uncle is Elon Musk. I understand that support for WebAssembly in individual browsers is evolving rapidly and we cannot expect the latest version of dotnet to work properly in a browser from a few years ago. On the other hand, Blazor Server and Hybrid do not require support for WebAssembly. It is possible that a bug like this one can be corrected very quickly. In my opinion your support policy for Blazor Server and Hybrid should be changed, at least for Apple devices. On Windows or Android you can always have the newest and greatest browser. Unfortunately this is not the case on Apple devices where Safari is part of the operating system. Here is a perfect solution for Blazor web application configured for Auto mode:
|
@Andrzej-W I don't want to start a discussion on this issue, however, I will provide some comments to not leave you without answers. There are other factors to take into account when making these decisions like testing etc. that influence the cost. It's always a trade-off between cost/benefit.
As the discussion above points out this is not the case. For that to be the case:
Even in that case, the LTS works for 16 and 17, which accounts for 97% devices released in the last four years. .NET 9.0 works from 16.4 and above, which also sum up to 95% (I'm giving 2% to users below 16.4), which is a very different number than the one you threw out.
Browsers have significantly changed this model over the past years. Chrome doesn't offer support for older versions and updates automatically. Edge follows a similar policy where the maximum support is for 8 Weeks after a new version is available. Safari, while not updating that regularly, still provides several updates across the release cycle of a given iOS version. A given iOS version stops receiving features the moment a new version of the OS is out and only receives security updates. We can go and chase the long tail of older browsers, but that has a non-trivial cost in terms of development, testing and maintenance that needs to be put against other work, like new features, bug fixes and improvements. It's something that browser vendors have given up on themselves and switch everybody to a "keep your browser current" policy. What's even more important is that the direction of the trend is for this usage to naturally decline over time (and in many cases quite fast). With that in mind, we essentially support what is supported by Browser Vendors on a given release, we don't go out of our way to make older versions unsupported, but we don't focus on supporting versions that aren't even supported by the browser vendor themselves, unless there's a significant reason for it. Even in the cases where we don't support a specific OS/Browser version, JavaScript wise, nothing precludes you from grabbing the sources and compiling your own version with support for older versions via lowering the JS to older versions and including pollyfills for missing features, but it's not something that we are going to support, because it has a non-trivial cost and most people aren't going to need it.
If you have a concrete improvement, file a separate issue for us to track it and discuss it. For now, what I would say is that this has a very nontrivial cost, introduces a ton of complexity, and it's not clear to me whether it's worth doing all this work and introducing this complexity to support older versions that represent a small percentage of the total user base that is only going to shrink over time. |
The team will revisit this, and we will provide an update once we've discussed this. |
So I assume Blazor is not going to support the older versions of the iOS/Safari anymore, even though we have this in the documents: I hope this section of the doc gets updated for the .NET 9 😊 |
@javiercn I understand all your arguments and honestly I would like to live in an ideal world where only the latest devices/browsers need to be supported. The user base may vary by country and industry. I talked about iPads and 32% income reduction because my users are salespeople working in the field. Mobile phones are to small for them, cheap plastic tablets are not durable - they usually use iPads. I have found information that iPad released in March 2018 and iPad Pro released in June 2017 are upgradable to iPadOS 17.x. The same is true for iPhone XS and XR released in September 2018. iPhone 8 and X (2017) are upgradeable to iOS 16.7.7. iPhone 7 released in 2016 is upgradeable to iOS 15.8.1 only.
You are probably right - there are many more important problems to solve. One minor update to Blazor JavaScript code would be useful. Detect Blazor compatibility with the browser and display message (which can be easily translated into different languages) that browser is to old and have to be upgraded. |
For us, this makes .NET 9 problematic, and it makes me wonder how we deal with it considering the official policy is that .NET 8 MAUI leaves support in May 2025. Considering we need to support older devices, for much of the same reasoning that @Andrzej-W gave, we need to have some sort of workaround or resolution for this or we'll be stuck on .NET 8 for the foreseeable future. |
Just need to revert to pointing to ES2019, just like with .NET 8. |
Before diving into the details, could you please confirm if the blazor.web.js in .NET 9 Preview 7 is intended to support only iOS 17 and above? The same script works seamlessly on Android 7 (API level 25).
The text was updated successfully, but these errors were encountered: