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

CoreWebView2WebMessageReceivedEventArgs.AdditionalObjects throws a Microsoft.CSharp.RuntimeBinder.RuntimeBinderException exception #3474

Closed
mikeduglas opened this issue May 10, 2023 · 10 comments
Assignees
Labels
bug Something isn't working tracked We are tracking this work internally.

Comments

@mikeduglas
Copy link

mikeduglas commented May 10, 2023

Description
An access to CoreWebView2WebMessageReceivedEventArgs.AdditionalObjects in WebMessageReceived event handler throws following exception:

[6980] WebMessageReceived: Microsoft.CSharp.RuntimeBinder.RuntimeBinderException: the most suitable overloaded method for "System.Runtime.InteropServices.Marshal.GetObjectForIUnknown(System.IntPtr)" has several invalid arguments
[6980]    in CallSite.Target(Closure , CallSite , Type , Object ) 
[6980]    in System.Dynamic.UpdateDelegates.UpdateAndExecute2[T0,T1,TRet](CallSite site, T0 arg0, T1 arg1) 
[6980]    in CallSite.Target(Closure , CallSite , Type , Object ) 
[6980]    in Microsoft.Web.WebView2.Core.COMDotNetTypeConverter.CoreWebView2ObjectCollectionViewCOMToNet(ICoreWebView2ObjectCollectionView rawObjectCollection) 
[6980]    in Microsoft.Web.WebView2.Core.CoreWebView2WebMessageReceivedEventArgs.get_AdditionalObjects() 
[6980]    in claedge.ClaEdge.WebMessageReceived(Object sender, CoreWebView2WebMessageReceivedEventArgs e)

Version
SDK: 1.0.1774.30
Runtime: 113.0.1774.35
Framework: WinForms
OS: Win11

Repro Steps

Screenshots

Additional context

AB#44726780

@mikeduglas mikeduglas added the bug Something isn't working label May 10, 2023
@mikeduglas
Copy link
Author

2 weeks - no reaction. "The following APIs have been promoted to Stable and are now included in this Release SDK." - does anyone ever test new features before reporting them as stable?
Reproducible in current runtime 113.0.1774.42.

@yildirimcagri-msft yildirimcagri-msft added tracked We are tracking this work internally. priority-high labels May 21, 2023
@yildirimcagri-msft
Copy link
Member

Hi, thanks for reporting this! Will look into this with high priority.

@yildirimcagri-msft
Copy link
Member

yildirimcagri-msft commented May 23, 2023

I have a fix prepared for this. Unfortunately, some of our .NET tests (including the one that would have caught this) were not running properly in the pipeline; hence this is why this was overlooked. Apologize for inconvenience and will keep you updated on when this will be fixed (I'm pushing for an urgent SDK release for this). Thanks for your patience!

@yildirimcagri-msft
Copy link
Member

Hi, wanted to update you that the fix for this has merged and has been bumped up to the next SDK release, which is anticipated to be next week.

@mikeduglas
Copy link
Author

Thanks for the update.

@champnic champnic closed this as completed Jun 8, 2023
@mikeduglas
Copy link
Author

mikeduglas commented Jun 8, 2023

Nothing changed in the SDK 1.0.1823.32 and Runtime 114.0.1832.37: same Microsoft.CSharp.RuntimeBinder.RuntimeBinderException.
Please reopen as not fixed.

@yildirimcagri-msft
Copy link
Member

Looking

@yildirimcagri-msft
Copy link
Member

yildirimcagri-msft commented Jun 9, 2023

Hi @mikeduglas, we've looked into this and unfortunately turns out the fix wasn't properly cherry picked to the release SDK. Apologies for this again. The fix will be available in the prerelease SDK, which will be out on 6/12. You should be able to use the prerelease SDK without having to switch the runtime channel out of Stable as the fix is only at the SDK level.

@yildirimcagri-msft
Copy link
Member

Hi again, I've verified with the latest prerelease package 1.0.1905, this issue is fixed. Closing this issue now.

@mikeduglas
Copy link
Author

Yup, it works in 1.0.1905.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working tracked We are tracking this work internally.
Projects
None yet
Development

No branches or pull requests

3 participants