Skip to content
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

Emulator Webview Update instructions are wrong #34428

Open
ghhv opened this issue Jan 2, 2025 · 3 comments
Open

Emulator Webview Update instructions are wrong #34428

ghhv opened this issue Jan 2, 2025 · 3 comments
Assignees

Comments

@ghhv
Copy link

ghhv commented Jan 2, 2025

Description

This statement

"Install Google Chrome from the Google Play Store. If Google Chrome is already installed, update Chrome from the Google Play Store. If an emulated device doesn't have the latest version of Chrome installed, it might not have the latest version of the Android Web View installed."

is incorrect. Google Chrome and WebView are totally separate apps. Updating Chrome does nothing to to WebView.

And after going through the motions to add a new device with Play store, (and enabling that with a new Gmail address with SMS and credit card verification 😫) there is no apparent way to view the installed WebView app or update it from the Play Store. Clicking the check for updates on device says everything is up to date..

The way I did get around it was installing the WebView Dev stream which then prompts you to choose the default 'system' for device and I was able to select the newer and NET 9 Maui Blazor finally works. Image

Ideally the Android emulator should be updated by default. I know you previously linked to this on a another issue but nothing seems ideal.
https://stackoverflow.com/questions/34291902/android-studio-emulator-does-not-come-with-play-store-for-api-23/34581874#34581874

Page URL

https://learn.microsoft.com/en-au/aspnet/core/blazor/hybrid/security/security-considerations?view=aspnetcore-9.0#android

Content source URL

https://github.com/dotnet/AspNetCore.Docs/blob/main/aspnetcore/blazor/hybrid/security/security-considerations.md

Document ID

fc350fad-132a-020e-d99f-837405fde70f

Article author

@guardrex

Related Issues

@guardrex
Copy link
Collaborator

guardrex commented Jan 2, 2025

Hello @ghhv ... Thanks for the report.

Updating Chrome does nothing to to WebView.

... doesn't sound correct to me.

there is no apparent way to view the installed WebView app or update it from the Play Store

My limited understanding is that the version is found from the User-Agent string per the earlier remark in this section, and it's updated when Chrome is updated.

Beth will advise if we need to update the section. Let's stand-by until she gets on here to help.

Beth, here's the section ...

https://learn.microsoft.com/en-au/aspnet/core/blazor/hybrid/security/security-considerations?view=aspnetcore-9.0#android

@ghhv
Copy link
Author

ghhv commented Jan 2, 2025

for example.. here's the apps installed on my Android emulated device
Image

The default Android System Web View is not shown.. only the new one I added, the DEV stream.

And just above that is Google Chrome
Image

I can click and open the DEV WebView icon.. I get this
Image

On the menu I can switch between WebView Providers
Image

Image

And I just found via the help in DEV Webview
https://chromium.googlesource.com/chromium/src/+/HEAD/android_webview/docs/developer-ui.md

Well, I've just answered my own question.. if you do the device search (this Pixel device) it opens this page, and you type webview and it presents the Play Store link, which on opening gave me the update button.
Image

Now the update button is gone but it doesn't tell me any version number:
Image

But if I go back to the DEV stream version, and open the Change Provider menu, I can see the base WebView has in fact been updated to current.
Image

But updating this broke Chrome.. and the emulator wouldn't shut down. Restarting via Device Manager, and Chrome is working again.. and the MAUI app still works! Great success!

Image

@guardrex
Copy link
Collaborator

guardrex commented Jan 2, 2025

That's great news! 🎉

I'll leave it to @BethMassi to determine what changes should be applied to the section, if any. For example, should the section go into more detail covering the steps that you just took?

https://learn.microsoft.com/en-au/aspnet/core/blazor/hybrid/security/security-considerations?view=aspnetcore-9.0#android

... but noting that we must use a direct app store link (not the Net) for downloading the WebView. It's a major security risk to follow a link to find a download.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Triage
Development

No branches or pull requests

3 participants