Closed voidZiAD closed 2 years ago
Nevermind, I got an error
No Idea what to do
Line 194: MSession session = await form.ShowLoginDialog();
I think it doesn't support .NET, not Windows Forms but not 100% sure. I need the fix asap!
this may related to WebView2 issue.
https://github.com/MicrosoftEdge/WebView2Feedback/issues/2447
I just checked that issue and I'm still not sure what to do...
I've tried reverting back to an older version (1.0.1210.39) and got a different error this time
System.StackOverflowException
HResult=0x800703E9
Message=Exception of type 'System.StackOverflowException' was thrown.
I've seen very similar issues on another project.
it was made on .net framework and uses Fody.Costura.
StackOverflowException was related to Fody.Costura. Costura was not able to load webview2 library and it retry infinitely.
System.ArgumentException was releated to wrong webview2 library version. (not sure)
As I remember, I solved this by removing all nuget package and reinstall only one package: CmlLib.Core.Auth.Microsoft.UI.Winform (or Wpf), and I removed app.config file in my project.
btw webview2 is so buggy actually i don't want to maintain UI.Winform and UI.Wpf package. CmlLib.Core.Auth.Microsoft.MsalClient provides more options to login without any webview2 related bugs.
Oh, then that explains it. I use Costura.Fody and I guess that's why it's happening. Anyways, i've found another way to authenticate accounts via Microsoft Login by using the MSALClient, but thank you for letting me know what the issue is from. I recommend you switch from WebView2 to some other package cause from what i've heard and what you said it's really buggy.
I've tried this on a .NET Windows Forms app and it didnt do anything when I clicked button1.