CmlLib / CmlLib.Core.Auth.Microsoft

Minecraft Login with Microsoft Xbox account
MIT License
22 stars 4 forks source link

Stuck on loading screen #2

Open chaarlottte opened 2 years ago

chaarlottte commented 2 years ago

Hi, I have been experiencing an issue with this library where I will become stuck on this screen (https://cdn.upload.systems/uploads/1aHnmwEO.png) for an extremely long period of time (I left it and did something else for an hour, came back and it was still this screen).

My code:

        private void button2_Click(object sender, EventArgs e)
        {
            MicrosoftLoginForm loginForm = new MicrosoftLoginForm();
            MSession session = loginForm.ShowLoginDialog();
            if (session != null) {
                MessageBox.Show("Login success : " + session.Username);

                LauncherForm launcherGui = new LauncherForm();
                launcherGui.session = session;
                launcherGui.Show();
                this.Close();
            } else { 
                MessageBox.Show("Failed to login");
            }
        }

Thank you for any help :)

AlphaBs commented 2 years ago

did you install webview2 runtime?

chaarlottte commented 2 years ago

Yes

AlphaBs commented 2 years ago

can you tell me more detailed information?

AlphaBs commented 2 years ago

and please check this program to verify your webview2 is working without any problem.

WebView2WindowsFormBrowser.zip
(This file is built from WebView2 Sample)

chaarlottte commented 2 years ago

OS: windows 10 .NET framework version: CmlLib.Core library version: 3.3.3 CmlLib.Core.Auth.Microsoft.UI.WinForm library version: 1.0.2

And while using the program you linked, it seemed to be working with no problems.

Indoraptor1 commented 2 years ago

Hello, You can solve it by addign using Microsoft.Web.WebView2;