MicrosoftEdge / MicrosoftEdge/WebView2Feedback

WebView does not display the content in ~5% of runs

Open
#1,975 5 comments 0 reactions 1 assignee View on GitHub

@champnic is already working on this.

Since Dec 1, 2021.

bug priority-low tracked
Dominant language
PowerShell
Stars
526
Forks
67
PR merge metrics
No merged PRs in 30d

Description

Description
Hi! I use Fixed Version WebView in Win32 application.
It usually works fine. But in ~5% of application runs, the WebView does not display the content.
Usually, 8 msedgewebview2.exe processes are created on the system to service WebView control. But in those 5% of cases when the WebView content is not displayed, there are only 4 or 5 processes.
Crashpad\reports is empty.
Event Log is empty.
ProcessFailed event does not happen.

What could be the problem? Are there any tools for debugging?

Usage sample:

	auto options = Make<CoreWebView2EnvironmentOptions>();
	checkHRESULT( options->put_AdditionalBrowserArguments( L"--disable-features=msSmartScreenProtection" ) );
	checkHRESULT( CreateCoreWebView2EnvironmentWithOptions( runtimePath, userDataPath, options.Get(),
		Callback<ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler>( this, &CWebView::OnCreateEnvironmentCompleted ).Get() ) );

	// Pseudo-synchronous creation https://github.com/MicrosoftEdge/WebView2Feedback/issues/740
	while( webviewWindow == nullptr && ::WaitMessage() ) {
		CMessageLoop::PumpMessages( 0, WM_USER + 1, WM_USER + 1 );
	}

	checkHRESULT( webviewWindow->add_ProcessFailed(
		Callback<ICoreWebView2ProcessFailedEventHandler>( this, &CWebView::OnProcessFailed ).Get(), &processFailedToken ) );

	CComPtr<ICoreWebView2Settings> settings;
	checkHRESULT( webviewWindow->get_Settings( &settings ) );
	checkHRESULT( settings->put_IsZoomControlEnabled( FALSE ) );
	checkHRESULT( settings->put_IsStatusBarEnabled( FALSE ) );
	checkHRESULT( settings->put_AreDefaultContextMenusEnabled( FALSE ) );
	checkHRESULT( settings->put_AreDevToolsEnabled( FALSE ) );

	checkHRESULT( controller->put_Bounds( rect ) );

	checkHRESULT( webviewWindow->Navigate( url ) );

Version
SDK: 1.0.1020.30
Runtime: 95.0.1020.53
Framework: Win32
OS: Win10

AB#37316750

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.