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

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

Open
gokselgoktas opened this issue May 8, 2024 · 0 comments
Open
Assignees
Labels
bug Something isn't working

Comments

@gokselgoktas
Copy link

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

@gokselgoktas gokselgoktas added the bug Something isn't working label May 8, 2024
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

2 participants