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

RenderProcessExited #443

Closed
TimWeidner opened this issue Sep 16, 2020 · 12 comments
Closed

RenderProcessExited #443

TimWeidner opened this issue Sep 16, 2020 · 12 comments
Labels
bug Something isn't working

Comments

@TimWeidner
Copy link

TimWeidner commented Sep 16, 2020

Description
The "ProcessFailedKind:" addition is from us, but the RenderProcessExited error is thrown by webview on first load.
In another test Form with just an URL to https://www.microsoft.com/ I get just a blank / empty Form

Error Message:
---------------------------

---------------------------
ProcessFailedKind: RenderProcessExited
---------------------------
OK   
---------------------------

Version
SDK: 0.9.579-prerelease
Runtime: Dev 87.0.637.0
Framework: Winforms
OS: Win10

Screenshots
image

@TimWeidner TimWeidner added the bug Something isn't working label Sep 16, 2020
@champnic
Copy link
Member

champnic commented Sep 16, 2020

Was this working before and broke from an update to the Dev Edge browser?

Can you share the code that's catching and printing that error message? If you remove the error handling, what's the failure stack?

@TimWeidner
Copy link
Author

TimWeidner commented Sep 17, 2020

It worked on my machine about two and a half weeks ago. Since then the Version of the Browser has changed multiple times as well as the code. I deinstalled all versions of edge and installed the beta version (86.x) and that ain't working either. An update to the most recent version of the webview prerelease (which needs 87.x, so i used the dev channel) changed nothing. It even works on the machines of my coworkers and I have no idea what causes this, because if I comment out the error handling it just fails silently.

private void WebView_CoreWebView2Ready(object sender, EventArgs e)
{
        webView.CoreWebView2.ProcessFailed += CoreWebView2_ProcessFailed;
}
private void CoreWebView2_ProcessFailed(object sender, CoreWebView2ProcessFailedEventArgs e)
{
        MessageBox.Show(this, "ProcessFailedKind: " + e.ProcessFailedKind);
}

image

@cgeier
Copy link

cgeier commented Sep 17, 2020

@TimWeidner Are you compiling as 64-bit (x64 or Any CPU with Prefer 32 bit unchecked) or 32-bit (x86 or Any CPU with Prefer 32 bit checked).

@TimWeidner
Copy link
Author

Any CPU with Prefer 32 bit unchecked

@cgeier
Copy link

cgeier commented Sep 17, 2020

You can try what's mentioned in #431, but that may not apply to you. Try this demo: WebView2Test_v628.zip . It's just a WebView2 control on a form.

@TimWeidner
Copy link
Author

Not working at all. Doesn't display the blank page, just the form background.

image

@cgeier
Copy link

cgeier commented Sep 18, 2020

@TimWeidner In the demo project, add the following line:
MessageBox.Show("MS Edge version: " + Microsoft.Web.WebView2.Core.CoreWebView2Environment.GetAvailableBrowserVersionString(), "Version Info", MessageBoxButtons.OK, MessageBoxIcon.Information); . Then post the result.

What version of .NET is your project using?
Looks like your using Windows 10 64-bit. Is that correct?

Ensure that you see the following files in same folder as the executable (ex: bin\Debug...):

  • Microsoft.Web.WebView2.Core.dll
  • Microsoft.Web.WebView2.Core.xml
  • Microsoft.Web.WebView2.WinForms.dll
  • Microsoft.Web.WebView2.WinForms.xml
  • WebView2Loader.dll
private void Form1_Load(object sender, EventArgs e)
{
 
    MessageBox.Show("MS Edge version: " + Microsoft.Web.WebView2.Core.CoreWebView2Environment.GetAvailableBrowserVersionString(), "Version Info", MessageBoxButtons.OK, MessageBoxIcon.Information);

    webView21.Source = new Uri("https://www.microsoft.com", UriKind.Absolute);
}

You might try removing the WebView2 package from your project. Then deleting the WebView2 NuGet package from:
%UserProfile%\.nuget\packages\microsoft.web.webview2\<version>-prerelease

Then in your project add the WebView2 NuGet package. It will be downloaded again to both %UserProfile%\.nuget\packages\microsoft.web.webview2\<version>-prerelease and
<solution name>\packages\Microsoft.Web.WebView<version>-prerelease

*Note: For .NET, it should be a "prerelease" version.

Also keep in mind that the oldest (most stable) version of MS Edge is being used. If you have MS Edge Beta and MS Edge Dev installed, then MS Edge Beta will be used.

@TimWeidner
Copy link
Author

TimWeidner commented Sep 30, 2020

Sorry for not responding sooner.

---------------------------
Version Info
---------------------------
MS Edge version: 86.0.622.28 beta
---------------------------
OK   
---------------------------

The Project is using .NET 4.7.2. I am using Windows 10 64-bit.

I have all the specified .dll-Files, but no XML Files in the debug directory.

We have done all the steps you recommended about clearing the packages and (after fixing the nullpointer from the other issue #431) nothing works, just like before doing the steps. So basically the problem still persists

@TimWeidner
Copy link
Author

My coworker came back from vacation and he has the exact same issue.
So now we have 2 people on the team with this exact error and one who does not have this error at all.
We are not using the same hardware.

@Flaflo
Copy link

Flaflo commented Sep 30, 2020

@cgeier @champnic

@cgeier
Copy link

cgeier commented Sep 30, 2020

@TimWeidner

Please check that your anti-virus isn't blocking/removing the files. If you haven't already done so, please reboot your computer.

Clean the Visual Studio Toolbox (this will remove manually added controls):

  • Open Visual Studio
  • Open <project name>
  • On menu, View
  • Solution Explorer
  • Open a Form (such as Form1.cs)
  • On menu, View
  • Toolbox
  • Right-click in Toolbox, and select Reset Toolbox

Uninstall the Microsoft.Web.WebView2 NuGet package from the project

  • Open Visual Studio
  • Open <project name>
  • On menu, View
  • Solution Explorer
  • Right-click <project name>
  • Select Manage NuGet Packages...
  • Click Installed
  • Click Uninstall
  • Click OK

*Note: Once the WebView2 NuGet package has been uninstalled from your project/solution, the following folder should no longer exist:

  • <solution folder>\packages\Microsoft.Web.WebView2.0.9.628-prerelease

Delete the WebView2 NuGet package files/folders:

  • %UserProfile%.nuget\packages\microsoft.web.webview2\0.9.628-prerelease

Install the Microsoft.Web.WebView2 0.9.628-prerelease NuGet package to the project which will re-download the WebView2 files/folders to %UserProfile%\.nuget\packages\microsoft.web.webview2\0.9.628-prerelease

  • Open Visual Studio
  • Open <project name>
  • On menu, View
  • Solution Explorer
  • Right-click <project name>
  • Select Manage NuGet Packages...
  • Click Browse: Microsoft.Web.WebView2
  • Check Include prerelease
  • Version: 0.9.628-prerelease
  • Click Install
  • Click OK

Uninstall the Microsoft.Web.WebView2 NuGet package from the project again

  • Open Visual Studio
  • Open <project name>
  • On menu, View
  • Solution Explorer
  • Right-click <project name>
  • Select Manage NuGet Packages...
  • Click Installed
  • Click Uninstall
  • Click OK

Modify the Microsoft.Web.WebView2.targets files as described in #431

  • <project folder>\packages\Microsoft.Web.WebView2-prerelease\build\Microsoft.Web.WebView2.targets
  • <project folder>\packages\Microsoft.Web.WebView2-prerelease\build\native\Microsoft.Web.WebView2.targets

Install the Microsoft.Web.WebView2 0.9.628-prerelease NuGet package to the project again which will copy the WebView2 files/folders from %UserProfile%\.nuget\packages\microsoft.web.webview2\0.9.628-prerelease to your <solution folder> (including the modified Microsoft.Web.WebView2.targets files)

  • Open Visual Studio
  • Open <project name>
  • On menu, View
  • Solution Explorer
  • Right-click <project name>
  • Select Manage NuGet Packages...
  • Click Browse: Microsoft.Web.WebView2
  • Check Include prerelease
  • Version: 0.9.628-prerelease
  • Click Install
  • Click OK

Are you using Visual Studio? If so, what version? The latest versions are:

  • VS 2017: 15.9.27
  • VS 2019: 16.7.5

Use "Visual Studio Installer" to install the latest updates. (Type here to search: Visual Studio Installer)

How are you compiling? Command line? Visual Studio? Are you receiving any errors when you compile? Have you specified any additional build parameters? What Configuration and Platform are you compiling for?

  • In menu, Build
  • Select Configuration Manager

If you're using Visual Studio to compile, set the output to Diagnostic.

  • Open Visual Studio
  • Open the demo project
  • Click Tools
  • Select Options
  • Expand Projects and Solutions
  • Click Build and Run
  • Set MSBuild project build output verbosity: Diagnostic
  • Click OK
  • On menu, click Build
  • Select Clean <project name>
  • Select Rebuild <project name>
  • Copy the contents of the Output window to a text file, zip it, and post it here. (Make sure that it doesn't contain any sensitive information)

Please post the Microsoft.Web.WebView2.targets files that your project is using.

  • <project folder>\packages\Microsoft.Web.WebView2-prerelease\build\Microsoft.Web.WebView2.targets
  • <project folder>\packages\Microsoft.Web.WebView2-prerelease\build\native\Microsoft.Web.WebView2.targets

What version of Windows 10 are you using? The latest version of Windows 10 is v2004.

  • Open a cmd window
  • reg query "HKLM\Software\Microsoft\Windows NT\CurrentVersion" -v ProductName
  • reg query "HKLM\Software\Microsoft\Windows NT\CurrentVersion" -v CurrentBuild
  • reg query "HKLM\Software\Microsoft\Windows NT\CurrentVersion" -v ReleaseId

What OS architecture are you using?

  • Open a cmd window
  • reg query "HKLM\System\CurrentControlSet\Control\Session Manager\Environment" -v PROCESSOR_ARCHITECTURE

There have been numerous updates during this time. Visual Studio updates, MSBuild updates, MS Edge updates Webview2 updates, and maybe even some OS updates. Please make sure you've installed all of the mentioned updates and reboot your computer.

*Note: It looks like the MS Edge (stable) update occurs when one navigates to edge://settings/help or:

  • Open MS Edge Chromium
  • Click "..." in upper-right corner
  • Click "About Microsoft Edge"

rather than through Windows Updates.

There's some info in #421 that describes where the MS Edge files and registry keys are.

*Note: During the compile/build process the following files are copied from <solution folder>\packages\Microsoft.Web.WebView2.0.9.628-prerelease\lib\net462:

  • Microsoft.Web.WebView2.Core.dll
  • Microsoft.Web.WebView2.Core.xml
  • Microsoft.Web.WebView2.WinForms.dll
  • Microsoft.Web.WebView2.WinForms.xml
  • Microsoft.Web.WebView2.Wpf.dll
  • Microsoft.Web.WebView2.Wpf.xml

to your build folder (ex: bin\Debug, bin\x64\Debug, ...)

One or more of the following are also copied to your build folder (ex: bin\Debug, bin\x64\Debug, ...):

  • <solution folder>\packages\Microsoft.Web.WebView2.0.9.628-prerelease\runtimes\win-arm\native\WebView2Loader.dll
  • <solution folder>\packages\Microsoft.Web.WebView2.0.9.628-prerelease\runtimes\win-x64\native\WebView2Loader.dll
  • <solution folder>\packages\Microsoft.Web.WebView2.0.9.628-prerelease\runtimes\win-x86\native\WebView2Loader.dll

Due to issue 431, the appropriate version of WebView2Loader.dll, should be copied to the same location as your executable and Microsoft.Web.WebView2.WinForms.dll files.

What files/folders exist in your build folder (ex: bin\Debug, bin\x64\Debug, ...) after compiling?

Other options:
Run a chkdsk on your computer (or if you have a desktop support person, ask them to run it).

  • Open a cmd window as Administrator
  • chkdsk /r %SystemDrive%
  • You'll see the following message: Chkdsk cannot run because the volume is in use by another process. Would you like to schedule this volume to be checked the next time the system restarts? Enter 'Y'. Reboot your computer.

Use the System File Checker tool to repair missing or corrupted system files

@TimWeidner
Copy link
Author

@TimWeidner

Please check that your anti-virus isn't blocking/removing the files. If you haven't already done so, please reboot your computer.

This line is exactly what resolved this issue.

The reason for our internal problems with Webview is the simple fact that our corporate structure dictated usage of an old version of symantec endpoint protection. It's not that any files were blocked, but it seams like symantec conflicted with webview2s RendererCodeIntegrity. See The Chrome 78.0 Symentec SEP error. Two people on our team used the registry workaround and another one did not have Symantec installed for whatever reason. It worked fine on his machine, so that perfectly explains that.

So I am guessing some change to the inner workings of edge/webview (in the last month or so) made the webview crash as soon as RendererCodeIntegrity was disabled. This is obvious in hindsight, but figuring out the problem in the first place took us literally the past 2 1/2 weeks plus some time before that (dealing with some other strange behaviour).

So thank you so much for this detailed answer, which made the penny drop). You sir @cgeier are the real MVP. Thank you so much.

I'm going to close this issue now, please feel free to remove the bug label.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants