Skip to content

Conversation

@fadidurah
Copy link
Contributor

@fadidurah fadidurah commented Oct 18, 2025

We do not gracefully handle webview process crashes, which can cause ANRs for calling activitties (LTW bug: https://dev.azure.com/microsoft/OS/_workitems/edit/59756442). In this PR we override the webview method onRenderProcessGone to handle what to do if webview no longer is able to render content, where we send the error to the callback rather than having an uncaught exception.

AB#3405900

@fadidurah fadidurah requested a review from a team as a code owner October 18, 2025 01:04
Copilot AI review requested due to automatic review settings October 18, 2025 01:04
@github-actions
Copy link

✅ Work item link check complete. Description contains link AB#3405900 to an Azure Boards work item.

@github-actions
Copy link

❌ Work item link check failed. Description contains AB#3405900 but the Bot could not link it to an Azure Boards work item.

Click here to learn more.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds error handling for WebView render process crashes to prevent ANRs in calling applications. When the WebView render process fails, the new onRenderProcessGone override catches the crash and sends an error to the callback instead of letting the exception propagate uncaught.

  • Overrides onRenderProcessGone method to handle WebView process crashes gracefully
  • Implements version-specific error messages based on Android SDK level
  • Returns true to indicate the crash was handled successfully

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@github-actions github-actions bot changed the title Add onRenderProcessGone override to webview logic Add onRenderProcessGone override to webview logic, Fixes AB#3405900 Oct 18, 2025
@fadidurah fadidurah added the No-Changelog This Pull-Request has no associated changelog entry. label Oct 19, 2025
…/webview/OAuth2WebViewClient.java

Co-authored-by: Copilot <[email protected]>
@shahzaibj shahzaibj requested a review from Copilot October 29, 2025 16:27
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 4 comments.

@fadidurah fadidurah merged commit 41f79a1 into dev Oct 30, 2025
24 of 25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

No-Changelog This Pull-Request has no associated changelog entry.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants