MicrosoftEdge / MicrosoftEdge/WebView2Feedback

[Problem/Bug]: Disabling built-in error pages not working as expected

Open
#4,542 2 comments 1 reaction 2 assignees View on GitHub

@ParadoxZero is already working on this.

Since Feb 13, 2025.

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

Description

What happened?

Setting IsBuiltInErrorPageEnabled to FALSE via ICoreWebView2Settings::put_IsBuiltinErrorPageEnabled does not disable the built-in error pages as expected.

Expected Behavior
  • The built-in error pages should be disabled after setting IsBuiltInErrorPageEnabled to FALSE.
  • Unless the library-user navigates to a custom error page, nothing should be displayed instead of the built-in error pages when navigation errors occur.
Actual Behavior
  • Even with IsBuiltInErrorPageEnabled set to FALSE, the built-in error pages still appear.
  • Emitting HTML error responses from ICoreWebView2WebResourceRequestedEventHandler results in the built-in error page flashing before displaying the custom error page.
Additional Information

The issue persists even when omitting the NavigateToString call in ICoreWebView2NavigationCompletedEventHandler.

Importance

Moderate. My app's user experience is affected, but still usable.

Runtime Channel

Stable release (WebView2 Runtime)

Runtime Version

124.0.2478.80

SDK Version

1.0.2088.41

Framework

Win32

Operating System

Windows 11

OS Version

23H2

Repro steps
  1. Set IsBuiltInErrorPageEnabled to FALSE within the ICoreWebView2CreateCoreWebView2ControllerCompletedHandler callback.
  2. Register a custom URI scheme and handle associated requests using AddWebResourceRequestedFilter and ICoreWebView2WebResourceRequestedEventHandler.
  3. Register a ICoreWebView2NavigationCompletedEventHandler to handle navigation errors and display a custom error page using NavigateToString.
Repros in Edge Browser

No, issue does not reproduce in the corresponding Edge version

Regression

Don't know

Last working version (if regression)

No response

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.