CommunityToolkit / Microsoft.Toolkit.Win32

ARCHIVE - This repository contained XAML Islands wrapper controls and tooling for XAML Islands with WinUI 2, see readme for more info about XAML Islands with WinUI 3 and the WindowsAppSDK.
https://aka.ms/windowsappsdk
Other
383 stars 89 forks source link

Crash in Wpf.WebView: The remote procedure call failed. HRESULT: 0x800706BE #29

Open lostmsu opened 6 years ago

lostmsu commented 6 years ago

I'm submitting a...

Current behavior

WPF.WebView initialization crashes

Expected behavior

Wpf.WebView should succesfully initialize

Minimal reproduction of the problem with instructions

Environment

Nuget Package(s): Microsoft.Toolkit.Win32.UI.Controls-3.0.0; MahApps.Metro-1.6.5

Windows 10 Build Number:

App min and target version:

Device form factor:

Visual Studio

Stack Trace

The remote procedure call failed. (Exception from HRESULT: 0x800706BE)

Exception Stack:
System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
Microsoft.Toolkit.Win32.UI.Controls.Interop.WinRT.WebViewControlProcess.<CreateWebViewControlHostAsync>d__16.MoveNext()
System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
Microsoft.Toolkit.Win32.UI.Controls.WPF.WebView.<<Initialize>b__134_0>d.MoveNext()

Thread 2 Crashed:
0   mscorlib                             0x0000000015a90063    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess  (0x06005cdb, 0x27)
1   mscorlib                             0x0000000015a9003a    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification  (0x06005cda, 0x28)
2   Microsoft.Toolkit.Win32.UI.Controls  0x00000000120501c9    at Microsoft.Toolkit.Win32.UI.Controls.Interop.WinRT.WebViewControlProcess+<CreateWebViewControlHostAsync>d__16.MoveNext  (0x06000394, 0x120)
3   mscorlib                             0x0000000015a90063    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess  (0x06005cdb, 0x27)
4   mscorlib                             0x0000000015a9003a    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification  (0x06005cda, 0x28)
5   Microsoft.Toolkit.Win32.UI.Controls  0x00000000120501a5    at Microsoft.Toolkit.Win32.UI.Controls.WPF.WebView+<<Initialize>b__134_0>d.MoveNext  (0x0600034e, 0xd3)

This does not happen on my own machine.

rjmurillo commented 6 years ago

Can you provide more information about the machine that has the problem, possibly even memory dump?

lostmsu commented 6 years ago

@rjmurillo , unfortunately, I can't provide the mem dump, as it is a cutstomer's laptop. I know the model though, it is Inspiron 17-7779. I also don't know the exact circumstances, but my guess would be that it happens when the control is created while a monitor is being connected/disconnected, or Explorer is forcibly restarted.

rjmurillo commented 6 years ago

@lostmsu Can you tell me which OS version is on the machine?

lostmsu commented 6 years ago

@rjmurillo , it is the April's update, 17134. Sorry, I thought I marked it properly in the head post.

rjmurillo commented 6 years ago

@lostmsu So you did, I just can't read 🙄 Can you clarify what you mean by having a min app version? The targets should apply to UWP applications, in which case there is already an Edge-based web view available. If it's a Win32 application and you're setting an app version for the MSIX manifest, you should target 17134 since that's the first version that Win32 web view is available

lostmsu commented 6 years ago

@rjmurillo , I will try that

rattapong00 commented 6 years ago

afellayno22@hotmail.com​

rjmurillo commented 6 years ago

@joshholmes FYI

keiserS commented 5 years ago

I have the same issue with WebView control on WinFroms app. It happens when you open Visual studio in administrator mode ("Run as Administrator"). When you run VS with current user permission set you will not get error and everything will work fine. But this is not the solution, since in my case I need to have Admin rights to start 2 different apps, one WebApi and the other WinForms app.

So is this ever fixed and found what is the real cause of this when running VS in Admin mode?

Regards, K.