-
Notifications
You must be signed in to change notification settings - Fork 328
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
Exception "Method not found: 'Void Microsoft.Web.WebView2.WinForms.WebView2.add_AcceleratorKeyPressed" when calling AcquireTokenInteractive #2685
Comments
@bgavrilMS I vaguely remember getting something like this when I upgraded WebView2 SDK in MSAL (while testing something else). In this case, feels like it might be a back compat issue with the WebView2 runtime? (Because I think it worked for me on runtime 91.x). Might also want to consider updating to the latest SDK (1.0.864.35) or do we need to stay on the lower version? |
I believe WebView2.AcceleratorKeyPressed event has been depraciated since 1.0.774.44, that was 3 releases ago. |
I don't understand how this can happen, we took a dependency on a stable (non pre-release) version of the SDK |
@twieczor You are right it was removed since 1.0.774.44. |
For reference: MicrosoftEdge/WebView2Feedback#1453 |
@bgavrilMS Based on the MicrosoftEdge/WebView2Feedback#1453 (comment), if we upgrade WebView2 SDK version, we'll have to use Another point is that these events block all shortcut keys like CTRL + V, arrow keys. I think we might need to update the event handler to allow copy, paste, and such. Another alternative is to maybe set |
@pmaytak Unfortunately, we use WebView2 SDK directly, and can't downgrade it. Hopefully the new MSAL will solve this. |
Logs and network traces
Without logs or traces, it is unlikely that the team can investigate your issue. Capturing logs and network traces is described in Logging wiki.
Which version of MSAL.NET are you using?
MSAL.NET 4.32.0
Platform
.NET 4.6
What authentication flow has the issue?
Other?
Microsoft Edge WebView2 Runtime ver. 91.0.864.41
Is this a new or existing app?
c. This is a new app or experiment.
Repro
Expected behavior
authResult returns access token
Actual behavior
Exception:
Method not found: 'Void Microsoft.Web.WebView2.WinForms.WebView2.add_AcceleratorKeyPressed(System.EventHandler`1<Microsoft.Web.WebView2.Core.CoreWebView2AcceleratorKeyPressedEventArgs>)'.
Possible solution
Additional context / logs / screenshots
Add any other context about the problem here, such as logs and screenshots.
d__16.MoveNext, Line 270] : Error acquiring access token
System.MissingMethodException: Method not found: 'Void Microsoft.Web.WebView2.WinForms.WebView2.add_AcceleratorKeyPressed(System.EventHandler`1<Microsoft.Web.WebView2.Core.CoreWebView2AcceleratorKeyPressedEventArgs>)'.
at Microsoft.Identity.Client.Platforms.Features.WebView2WebUi.WebView2WebUi.d__3.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Identity.Client.Internal.AuthCodeRequestComponent.d__7.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Identity.Client.Internal.AuthCodeRequestComponent.d__4.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Identity.Client.Internal.Requests.InteractiveRequest.d__11.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Identity.Client.Internal.Requests.InteractiveRequest.d__8.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Identity.Client.Internal.Requests.RequestBase.d__13.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Identity.Client.ApiConfig.Executors.PublicClientExecutor.d__2.MoveNext()
System.MissingMethodException: Method not found: 'Void Microsoft.Web.WebView2.WinForms.WebView2.add_AcceleratorKeyPressed(System.EventHandler`1<Microsoft.Web.WebView2.Core.CoreWebView2AcceleratorKeyPressedEventArgs>)'.
at Microsoft.Identity.Client.Platforms.Features.WebView2WebUi.WebView2WebUi.d__3.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Identity.Client.Internal.AuthCodeRequestComponent.d__7.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Identity.Client.Internal.AuthCodeRequestComponent.d__4.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Identity.Client.Internal.Requests.InteractiveRequest.d__11.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Identity.Client.Internal.Requests.InteractiveRequest.d__8.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Identity.Client.Internal.Requests.RequestBase.d__13.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Identity.Client.ApiConfig.Executors.PublicClientExecutor.d__2.MoveNext()
The text was updated successfully, but these errors were encountered: