Repository navigation
Open
Labels
Breaking ChangeNotable change in behavior that may require updating your app
Description
[Breaking Change] Granular Process Failure Reasons in WebView2
Summary:
WebView2's ProcessFailed event currently reports Unexpected as the failure reason for three distinct process exit scenarios: normal exit, abnormal exit, and code integrity failure. This change adds three new granular values to CoreWebView2ProcessFailedReason, gated behind a feature flag for backward compatibility.
Details:
- Feature flag name:
msWebView2GranularProcessFailedReason - Scope:
ProcessFailedevent'sReasonproperty - Purpose of feature: Allow apps to distinguish between different types of unexpected
process exits for better diagnostics, telemetry, and error handling.
New Enum Values:
| Value | Description |
|---|---|
NormalExit |
The process exited normally (exit code 0). Typically a clean or transparent process shutdown. |
AbnormalExit |
The process exited abnormally (non-zero exit code). An unexpected termination that is not a crash or kill. |
IntegrityFailure |
The OS terminated the process due to a code integrity failure (e.g., a DLL failed Windows Code Integrity verification). |
These values were previously all reported as Unexpected.
Impact:
- Expected Behavior Change: When the feature flag is enabled,
get_Reason()/CoreWebView2ProcessFailedEventArgs.Reasonwill return the new granular values instead ofUnexpectedfor the corresponding exit scenarios. When disabled (default), behavior is unchanged — all three continue to returnUnexpected. - Who is Affected: WebView2 apps that handle the
ProcessFailedevent and check theReasonproperty. Apps withswitch/ifstatements that don't have adefaultcase for unknown reason values may need updating.
Rollout:
- 148 (Current): Off (flag gated) —
msWebView2GranularProcessFailedReasonfeature flag is disabled by default. Existing behavior preserved. Apps can opt in to test. - 149: Off (flag gated) — Feature flag remains disabled by default. Second release for apps to proactively test and validate.
- 150: On by default — Feature flag enabled by default. Apps will start receiving granular values (
NormalExit,AbnormalExit,IntegrityFailure) instead ofUnexpected. - Future (TBD): Feature flag removal — granular values become the permanent behavior.
Testing:
- How to test prior to release: Set the following environment variable before launching your WebView2 app:
Then trigger process failures and verify your
set WEBVIEW2_ADDITIONAL_BROWSER_ARGUMENTS=--enable-features=msWebView2GranularProcessFailedReasonProcessFailedevent handler correctly handles the newReasonvalues.
Known Issues/Changes:
- The
Reasonproperty will return new enum values that did not exist before. Apps that use exhaustive switch statements without a default case may encounter warnings or unexpected behavior. - This is a runtime-only behavioral change when the flag is enabled. No SDK update is required to maintain existing behavior.
WebView2 Mitigations:
- Feature flag
msWebView2GranularProcessFailedReasonis disabled by default in releases 148 and 149, preserving existing behavior and giving apps two releases to test. - When the flag is off, all three exit scenarios continue to report
Unexpectedexactly as before.
App Actions:
- No immediate action required. The feature is disabled by default in releases 148–149.
- Recommended: Review your
ProcessFailedevent handlers. Ensure they have adefaultcase or handle unknownReasonvalues gracefully, so they work correctly when granular values are enabled by default in release 150. - Proactive testing: Test with the feature flag enabled during releases 148–149 to identify any impact early.
Timeline and Next Steps:
- Feature Enablement: The feature will be enabled by default in release 150. Apps have releases 148 and 149 to proactively test with the feature flag.
- Testing Deadline: Before release 150. Apps are encouraged to test during releases 148–149 to identify any impact.
- Contact: For questions or concerns, please use the https://github.com/MicrosoftEdge/WebView2Feedback.
Metadata
Metadata
Assignees
Labels
Breaking ChangeNotable change in behavior that may require updating your app
Activity
vipulgupta11 commentedon Aug 26, 2026
We're enabling msWebView2GranularProcessFailedReason by default in the Edge 153 release — ProcessFailed get_Reason() now returns granular NORMAL_EXIT / ABNORMAL_EXIT / INTEGRITY_FAILURE instead of collapsing to UNEXPECTED.
It's already on by default in Dev (153) and Canary (154); it reaches Beta with the 153 release rolling out this week. Please validate accordingly.