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

Crash trying to set WebView2.UriSource #2147

Closed
lostmsu opened this issue Mar 23, 2020 · 6 comments
Closed

Crash trying to set WebView2.UriSource #2147

lostmsu opened this issue Mar 23, 2020 · 6 comments
Labels
team-Rendering Issue for the Rendering team

Comments

@lostmsu
Copy link

lostmsu commented Mar 23, 2020

Describe the bug
I am trying WinUI 3.0 Alpha. In a blank app, single window with a WebView2 control, the app crashes when I try to set WebView2.UriSource in Page.OnNavigatedTo.

Steps to reproduce the bug

  1. Create new blank WinUI app
  2. Add WebView2 with x:Name="Web" to the MainPage
  3. Override Page.OnNavigatedTo with this.Web.UriSource = new Uri("https://bing.com/");
  4. Launch the app in debug mode

Expected behavior
Should navigate to Bing

Version Info

NuGet package version:
Microsoft.UI.Xaml 3.0.0-alpha.200210.0

Windows 10 version Saw the problem?
Insider Build (xxxxx)
November 2019 Update (18363) Yes
May 2019 Update (18362)
October 2018 Update (17763)
April 2018 Update (17134)
Fall Creators Update (16299)
Creators Update (15063)
OS: 18363.720
Device form factor Saw the problem?
Desktop Yes
Mobile
Xbox
Surface Hub
IoT

Additional context
Edgium: 80.0.361.69 (Release channel)

Event Log:
Faulting application name: BlankAppSample.exe, version: 1.0.0.0, time stamp: 0x5d36223e
Faulting module name: ucrtbase.dll, version: 10.0.18362.387, time stamp: 0x4361b720
Exception code: 0xc0000409
Fault offset: 0x000000000006db8e
Faulting process id: 0x91f4
Faulting application start time: 0x01d600cb7c1dfa46
Faulting application path: MASKED\BlankAppSample\bin\x64\Debug\AppX\BlankAppSample.exe
Faulting module path: C:\WINDOWS\System32\ucrtbase.dll
Report Id: 5baf0fa9-5e7e-4db3-a2e7-d519f3432cc9
Faulting package full name: ef2a70f7-2839-4b3a-8db2-7801d62089a3_1.0.0.0_x64__nr8wym1fh6evt
Faulting package-relative application ID: App

I could upload a crash dump, but file is too large for GitHub.

@msft-github-bot msft-github-bot added the needs-triage Issue needs to be triaged by the area owners label Mar 23, 2020
@lostmsu
Copy link
Author

lostmsu commented Mar 23, 2020

Turns out I needed to install Microsoft.Web.WebView2 NuGet (0.8.355, later might not work). But the error message is non-descriptive.

@ranjeshj ranjeshj added the team-Rendering Issue for the Rendering team label Mar 23, 2020
@goh-chunlin
Copy link

Yes, same problem here. It crashes with the latest Microsoft.Web.WebView2 v0.9.430 which is supposed to be stable version.

@ranjeshj
Copy link
Contributor

@codendone Known issue ?

@codendone
Copy link
Contributor

Thanks for reporting this. This is a known issue which came up in the comments for #1965. Version 0.8.355 is the only supported version of Microsoft.Web.WebView2 in the current WinUI Alpha. The problem is that we currently use some in-development APIs which are not part of the public Microsoft.Web.WebView2 SDK. A couple of those APIs unfortunately changed in v0.9.430, breaking binary compatibility and leading to this crash.

We're working on getting all necessary APIs into the public SDK, at which point this will no longer be a problem. But for now, it is necessary to stick to v0.8.355.

@msft-github-bot msft-github-bot removed the needs-triage Issue needs to be triaged by the area owners label Mar 24, 2020
@lostmsu
Copy link
Author

lostmsu commented Mar 24, 2020

@codendone the original issue about it crashing without a descriptive message when Microsoft.Web.WebView2 package is not installed at all.

@msft-github-bot msft-github-bot added the needs-triage Issue needs to be triaged by the area owners label Mar 24, 2020
@codendone
Copy link
Contributor

@lostmsu In the next preview, it should not be necessary for an app to explicitly add the Microsoft.Web.WebView2 package -- that should be included automatically with the WinUI3 package. (We haven't finished the work for that yet, but it is in plan.) So that problem will be fixed as well.

@msft-github-bot msft-github-bot removed the needs-triage Issue needs to be triaged by the area owners label Mar 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
team-Rendering Issue for the Rendering team
Projects
None yet
Development

No branches or pull requests

5 participants