MicrosoftEdge / WebView2Feedback

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

[Problem/Bug]: WebView2 AreBrowserExtensionsEnabled Not working #4650

Open duyngle opened 6 days ago

duyngle commented 6 days ago

What happened?

We're currently exploring the WebView2 extensions API on WinUI 3. When we tried to enable it, we encountered the following error: No such interface supported.

Our WinAppSDK version: 1.5.240607001

Importance

Blocking. My app's basic functions are not working due to this issue.

Runtime Channel

Stable release (WebView2 Runtime)

Runtime Version

126.0.2592.68

SDK Version

1.0.2210.55

Framework

WinUI3/WinAppSDK

Operating System

Windows 11

OS Version

22631.3737

Repro steps

Here is how we plan to call it

var environmentOptions = new CoreWebView2EnvironmentOptions();
environmentOptions.AreBrowserExtensionsEnabled = true;

CoreWebView2Environment environment = await CoreWebView2Environment.CreateWithOptionsAsync("", userDataFolder: null, environmentOptions);
await LiWebView.EnsureCoreWebView2Async(environment);

Repros in Edge Browser

No, issue does not reproduce in the corresponding Edge version

Regression

No, this never worked

Last working version (if regression)

No response

dianaqu commented 6 days ago

Could you try a newer SDK version? I see the AreBrowserExtensionsEnabled API was promoted to stable in 120.0.2210.66, But our SDK version released was 10.0.2210.55. AreBrowserExtensionsEnabled might still in experimentation interface for this SDK release.

I suggest most recent SDK since we had to fix GetBrowserExtensionsAsync issue for one of the SDK as well