Open
Description
What happened?
window.chrome.webview.postMessage
stops working when visiting pages on youtube.com. It accepts messages, but these messages never arrive on the native side, i.e., WebMessageReceived
event. It works on any other site, e.g., wikipedia.org.
This seems to be caused by something that youtube.com has changed on their side, as it used to work with the same runtime version.
See our investigation results in my comment.
Importance
Important. My app's user experience is significantly compromised.
Runtime Channel
Stable release (WebView2 Runtime)
Runtime Version
135.0.3179.73
SDK Version
1.0.3116
Framework
WPF
Operating System
Windows 11
OS Version
26100.3775
Repro steps
Please use my WebView2Samples fork with the code to reproduce the issue.
- Change
BrowserExecutableFolder = "[path to WebView2 135.0.3179.73 runtime]"
line inMainWindow.InitializeWebView()
to point to the WebView2 135.0.3179.73 runtime directory. - Start the browser from the IDE and open the debug output window to see the
Debug.WriteLine
output. - Visit https://www.wikipedia.org/ and observe
WebMessageReceived: {"Initial":true}
followed byWebMessageReceived: {"Ping":true}
every second. - Visit https://www.youtube.com/watch?v=vBCrJaLseQc and observe only a single
WebMessageReceived: {"Initial":true}
message. Ping messages are not coming through. You can check the browser console to see that ping messages are still being sent from the JS side.
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