-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
BasicBlazorComponentClick test fails on Android API 27 and earlier #4517
Comments
Looks like increasing the timeout (#4543) didn't work: https://devdiv.visualstudio.com/DevDiv/_build/results?buildId=5724063&view=ms.vss-test-web.build-test-results-tab&runId=32882308&resultId=100000&paneView=debug
However this doesn't look like flakiness to me. In all 5 of the most recent builds, I'm assuming that since MAUI has tests going back to API level 23 (Android 6, 2015), that's what MAUI apps are supposed to support. We need to debug why BlazorWebView doesn't work that far back. It might be that we're using some JS APIs that didn't appear until later. Or it might be a problem in MAUI itself. I'm going to change the issue title to match this. |
So it turns out I was wrong about the underlying functionality being broken. I've confirmed that As such, there must be some other reason why this test mechanism consistently fails on API <= 27 when running in CI, as in this build: Inspecting logs from the API level 27 run, the following looks like a smoking gun:
Yes, it's very much not going to work if we use
We need to work out how exactly we are defining the range of supported Android versions, and perhaps stop using |
Note that here's where we use dynamic import. It's not specific to blazor.webview.js: const initializer = await import(/* webpackIgnore: true */ adjustedPath) as Partial<BlazorInitializer>; |
I'm not sure where we can get worthwhile statistics on the market share of different Chrome for Android versions. Online sources for browser market share data don't easily offer any breakdowns of Chrome for Android versions. The statistics for Android < 9 versions look pretty bad:
However, presumably a lot of these end users aren't actually still on Chrome 62, even if their device was like that when they bought it. If a lot of the Blazor developer community needed to support Chrome 62, then we'd have got a lot more pushback about Blazor on .NET 6, since it uses @dotnet/aspnet-blazor-eng @danroth27 Have we already got a defined plan for Android version support? Is it meant to be the same as MAUI itself? I suspect we're going to have to define it as being "the same devices that can use Blazor Server and Blazor WebAssembly in their browser", which is currently Chrome 63+. The only alternative would be to refactor |
Wholeheartedly agree with @SteveSandersonMS here. Our support matrix should be the intersection between Maui and Blazor. Supporting things outside that creates a broken experience and forces us to expand the Blazor support matrix which would require big changes and would have a severe impact on libraries. As a compromise, we could think of a way that lets users get access to the files at build time so that they can transpile the sources and include necessary polyfills without us providing any guarantee that everything would be supported. (We won't block you, but we won't consider that scenario part of our support matrix) |
Our Android version support should ideally be the same as .NET MAUI (.NET MAUI supported platforms), but I assume we can separately define what browser versions we support with Blazor. The data on browser version adoption, while not specific to mobile, seems to indicate pretty strongly that new Chrome browser versions are adopted rapidly. I think we can require a reasonably up to date browser. For Blazor we test on the latest browser versions. Why wouldn't we do the same for .NET MAUI Blazor? |
Adding @davidortinau and @jamesmontemagno to add their perspectives on our support matrix for MAUI. |
Agreed, that is what I was proposing and also what @javiercn's comment recommends. Sounds like we're all happy with that. Further, it seems that even back on Android 5, which is the oldest that MAUI supports, it's possible to install a reasonably modern version of Chrome and the WebView will use it. So any given user whose device runs MAUI can also run a BlazorWebView app if they are willing to update their browser. But even with all this, we'd be concluding that BlazorWebView's support range is a subset of MAUI's, since MAUI itself can also run on Android 5 even if the browser has not been updated. We couldn't strictly claim that BlazorWebView runs everywhere that MAUI does and might need to note that in some docs somewhere. |
There are 2 issues with old Android support, give me a sec to find them. |
These are the two "older Android" issues I know of:
|
Agreed. I'll follow up to make sure this gets documented. |
https://apilevels.com/ is a good reference point... It really depends RN for example also support API 21+ and iOS 11+. Ionic seems to be the same with v6 supporting 5.0+ with Chromium 60+ on Android but iOS i only iOS 13+ which is interesting. So I think maybe it is just documentation and have a "recommended" lowest version. I target API 26 personally now adays. |
* Run BlazorWebView tests only on Android API level 28+ Fixes #4517 * Update device-tests.yml * Update device-tests.yml * Update device-tests.yml * Update device-tests.yml * Update device-tests.yml
Is there any way how to detect browser version installed on the device from within MAUI? Or any other way how to check if the browser version will be compatible with MAUI Blazor? I am asking for using this information to, for example display message: “Please update your browser app”. I am new to this so sorry if thats stupid question. Thanks. |
@Laftek please log a new issue. Comments on closed items will likely not get seen. |
This test is one of 3 that affects the overall pass rate for the repo and we should prioritize fixing it.
The text was updated successfully, but these errors were encountered: