You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The bug was found in more complex project, but I reproduced it in the most simple way possible in separate clear WPF project. I added only WebView2 there and added HostObject by calling AddHostObjectToScript with code below:
Important. My app's user experience is significantly compromised.
Runtime Channel
Stable release (WebView2 Runtime)
Runtime Version
123.0.2420.47
SDK Version
1.0.2420.47
Framework
WPF
Operating System
Windows 11
OS Version
Edition Windows 11 Enterprise
Version 22H2
Installed on 11. 4. 2024
OS build 22621.3447
Experience Windows Feature Experience Pack 1000.22688.1000.0
Repro steps
Create simple application with the code in the description above
Start the application
Right click the WebView2 element and go to Inspect->Console
Run await chrome.webview.hostObjects.bridge.TestMethodD()
Expected behavior: returned null value as it successfully happens for example for TestMethodC
Actual behavior: Crash of the application with the StackTrace in the description above
Repros in Edge Browser
No, issue does not reproduce in the corresponding Edge version
It is a bug in WebView2. An internal work item has been created and the issue is being worked on. Will update this when the fix is ready. The fix would be inside WebView2 SDK, so you would have to update the app to pick up the new SDK when it is released.
The fix has been checked in. It may take a while to be released.
It should be in newer WebView2 SDK with version > 1.0.2562.0.
We also made a change in WebView2 Runtime that would avoid the crash for apps using older SDK (only avoid crash, not correct behavior). That fix would be available in newer Edge builds with version >= 126.0.2562.0.
What happened?
The bug was found in more complex project, but I reproduced it in the most simple way possible in separate clear WPF project. I added only WebView2 there and added HostObject by calling AddHostObjectToScript with code below:
To explore all basic possibilities the BridgeHostObject has following four methods
Only the last one
TestMethodD
causes the application to crash with following StackTrace:Importance
Important. My app's user experience is significantly compromised.
Runtime Channel
Stable release (WebView2 Runtime)
Runtime Version
123.0.2420.47
SDK Version
1.0.2420.47
Framework
WPF
Operating System
Windows 11
OS Version
Edition Windows 11 Enterprise
Version 22H2
Installed on 11. 4. 2024
OS build 22621.3447
Experience Windows Feature Experience Pack 1000.22688.1000.0
Repro steps
await chrome.webview.hostObjects.bridge.TestMethodD()
Expected behavior: returned null value as it successfully happens for example for
TestMethodC
Actual behavior: Crash of the application with the StackTrace in the description above
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
AB#50461832
The text was updated successfully, but these errors were encountered: