Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Problem/Bug]: Extension is disabled after it is added with AddBrowserExtensionAsync with a pre-release runtime #5113

Open
seldoff opened this issue Feb 18, 2025 · 1 comment
Assignees
Labels
bug Something isn't working regression Something used to work but doesn't anymore tracked We are tracking this work internally.

Comments

@seldoff
Copy link

seldoff commented Feb 18, 2025

What happened?

After the extension is added with the AddBrowserExtensionAsync call, it seems to be disabled immediately. I.e. a call to the GetBrowserExtensionsAsync returns a CoreWebView2BrowserExtension object with IsEnabled == false. A call to extension.EnableAsync(true) doesn't help and the extension remains disabled.

This is a regression in the pre-release versions of the Edge runtime. AddBrowserExtensionAsync works as expected with the current Stable Edge runtime (133.0.3065.69). The current Beta (134.0.3124.8), Dev (134.0.3124.5), and Canary (135.0.3145.0) runtimes have this issue.

Importance

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

Runtime Channel

Prerelease (Edge Canary/Dev/Beta)

Runtime Version

134.0.3124.5

SDK Version

1.0.3065.39

Framework

WPF

Operating System

Windows 11

OS Version

26100.3194

Repro steps

Please use my WebView2Samples fork with the code to reproduce the issue.

  1. Start the WebView2WpfBrowser.
  2. Use Settings\Enable Extensions menu item. The Extensions window will appear.
  3. Click Add at the bottom. The Add extension window will appear with a prepopulated path to a test extension.
  4. Click OK to add the extension.

Expected \ works with Stable runtime:

  • The "Test Extension" line is added to the list of extensions.
  • The edge://serviceworker-internals page lists the extension service worker.
Image

Actual \ broken in pre-release runtimes:

  • The "Disabled Test Extension" line is added to the list of extensions.
  • The edge://serviceworker-internals page does not list the extension service worker.
Image

Repros in Edge Browser

No, issue does not reproduce in the corresponding Edge version

Regression

Regression in newer Runtime

Last working version (if regression)

Runtime 133.0.3065.69

@seldoff seldoff added the bug Something isn't working label Feb 18, 2025
@github-actions github-actions bot added the regression Something used to work but doesn't anymore label Feb 18, 2025
@RendijsSmukulis
Copy link

RendijsSmukulis commented Feb 18, 2025

  • I'm seeing the same behaviour on 135.0.3146.0 (Official build) canary (64-bit) WebView2 when using a 3rd party extension (Dark Mode)
  • When loading the same unpacked extension in Edge Canary (same version), it works fine (i.e. extension is loaded, active, and service worker is visible in edge://serviceworker-internals)

@chetanpandey1266 chetanpandey1266 self-assigned this Feb 19, 2025
@dhveerap dhveerap added the tracked We are tracking this work internally. label Feb 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working regression Something used to work but doesn't anymore tracked We are tracking this work internally.
Projects
None yet
Development

No branches or pull requests

7 participants