WebView2 stops working after 2 - 3 days with HRESULT 0x8007139F in WinForms application

test code 21 Reputation points
2026-08-26T12:10:17.6733333+00:00

We have a VB.NET WinForms application that uses five WebView2 controls on the same form.

A client is experiencing the following problem:

  • WebView2 works normally for approximately 2–3 days.
  • After that, the application only shows the loading state and the WebView does not start.
  • Replacing the WebView2 runtime makes the application work again temporarily.
  • After another 2–3 days, the same problem returns.
  • This happens with both the old and new runtime versions.

Runtime versions tested:

Old runtime: 123.0.2420.53_x64

New runtime: 147.0.3912.98_x64

Error:

The group or resource is not in the correct state to perform the requested operation.

(Exception from HRESULT: 0x8007139F)

The application targets .NET Framework and runs as an x86 process. It uses a fixed-version WebView2 runtime and a custom user-data folder under the current user’s local application data:

%LOCALAPPDATA%\runtime_browser 2.0

The application creates a WebView2 environment and uses it to initialize five controls:

Dim environmentOptions As New CoreWebView2EnvironmentOptions()

environmentOptions.AdditionalBrowserArguments = "--disable-web-security"

Dim webViewEnvironment =

    Await CoreWebView2Environment.CreateAsync(

        fixedVersionFolderPath,

        userDataFolder,

        environmentOptions)

Await WebView1.EnsureCoreWebView2Async(webViewEnvironment)

Await WebView2.EnsureCoreWebView2Async(webViewEnvironment)

Await WebView3.EnsureCoreWebView2Async(webViewEnvironment)

Await WebView4.EnsureCoreWebView2Async(webViewEnvironment)

Await WebView5.EnsureCoreWebView2Async(webViewEnvironment)

The form is reused across multiple dialog runs. WebView2 initialization is started from an Async Sub method, and the application may create a new environment on subsequent form loads while the same user-data folder is reused. Form closing does not currently wait for pending initialization to finish before the form lifecycle ends.

Environment creation succeeds, but WebView2 initialization eventually fails while creating the controller. The failure occurs before navigation or website code executes. Replacing the runtime does not provide a permanent solution; it only allows WebView2 to work for another few days.

Questions

  1. What are the most likely causes of 0x8007139F when EnsureCoreWebView2Async fails during controller creation after the application has been running for several days?
  2. What is the recommended solution to fix this problem and prevent the error from recurring?
Developer technologies | .NET | Other
0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.