MicrosoftEdge / WebView2Feedback

Feedback and discussions about Microsoft Edge WebView2
https://aka.ms/webview2
426 stars 51 forks source link

[Problem/Bug]: Multiple Browser Instances Sharing User Data Folder Cannot Have Different Settings #4593

Open vrad-joshuamckelvey opened 1 month ago

vrad-joshuamckelvey commented 1 month ago

What happened?

WebView2 fails to launch when two WebView2 browser instances are sharing the same User Data Folder with differing CoreWebView2EnvironmentOptions.AllowSingleSignOnUsingOSPrimaryAccount values.

The second browser throws the error below:

System.Runtime.InteropServices.COMException: 'The group or resource is not in the correct state to perform the requested operation. (Exception from HRESULT: 0x8007139F)'

Importance

Important. My app's user experience is significantly compromised.

Runtime Channel

Stable release (WebView2 Runtime)

Runtime Version

125.0.2535.67

SDK Version

1.0.2535.41

Framework

Winforms

Operating System

Windows 11

OS Version

10.0.22631

Repro steps

  1. Launch WebView2 in dialog with CoreWebView2EnvironmentOptions.AllowSingleSignOnUsingOSPrimaryAccount set to false. L2. Launch WebView2 in another dialog with CoreWebView2EnvironmentOptions.AllowSingleSignOnUsingOSPrimaryAccount set to true.

Repros in Edge Browser

No, issue does not reproduce in the corresponding Edge version

Regression

Regression in newer Runtime

Last working version (if regression)

124.0.2478.109

vrad-joshuamckelvey commented 1 month ago

I can provide a demo application as well if that would help.

vbryh-msft commented 1 month ago

It should be by design - it is browser feature. If you are running wv2 with the same UDF they share browser process. Could you please double check that it is working in 124?