MicrosoftEdge / WebView2Feedback

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

[Problem/Bug]: SharedWorker stops to work after page reload until DevTools attached #4852

Open sorokinva opened 1 month ago

sorokinva commented 1 month ago

What happened?

Im using webView2 to display spa which uses SharedWorker for background work. It works good, but if you reload page (right click - refresh) shared worker stops to work until you attach devtools to it, after that refresh works until devtools detached. If I have two webView2s attached to same shared worker refresh works, probably because its being kept alive by another instance. I suspect it might be something about cdp, playwrite and cypress had similar issues https://github.com/cypress-io/cypress/pull/28254 https://github.com/microsoft/playwright/pull/18976

Importance

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

Runtime Channel

Stable release (WebView2 Runtime)

Runtime Version

129.0.2792.79

SDK Version

1.0.2420.47

Framework

WPF

Operating System

Windows 11

OS Version

22621.4169

Repro steps

Create app with basic shared worker https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker, reload the page

Repros in Edge Browser

No, issue does not reproduce in the corresponding Edge version

Regression

Don't know

Last working version (if regression)

No response

vbryh-msft commented 1 month ago

Do you know if it was working in 128? Which last version you have seen it working?

sorokinva commented 1 month ago

@vbryh-msft Hi, sorry for the delay, thanks for response. I checked it on 128.0.2739.79, it still reproduces. Im not sure we ever saw it worked, it was just raised during internal dev session.