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

[Bug] 在新手指引中登录Microsoft账号出错 #94

Closed
GoldBro233 opened this issue Mar 25, 2023 · 7 comments
Closed

[Bug] 在新手指引中登录Microsoft账号出错 #94

GoldBro233 opened this issue Mar 25, 2023 · 7 comments
Labels
bug Something isn't working help wanted Extra attention is needed need further discussion

Comments

@GoldBro233
Copy link

FluentLauncher错误报告:

FluentLauncher版本:2.1.6.0
主要大意:在新手指引中登录Microsoft账号出错
是游戏崩溃的问题吗:否

主要内容:

如文章大意所示,截图如下

部分附件:

屏幕截图 2023-03-25 192831

这个问题严重嘛:8

@xingxing2008 xingxing2008 changed the title [Bug] [Bug] 在新手指引中登录Microsoft账号出错 Mar 25, 2023
@gaviny82 gaviny82 added bug Something isn't working need to fix 需要修复 labels Mar 26, 2023
@xingxing2008
Copy link
Member

这个问题之前也有人报过,但一直不清楚是你的网络问题还是程序上的问题,建议同时用同一账号使用友商的启动器测试是否能登录。如果不能,就是你本机的网络问题,如果可以,请麻烦提供更多信息

@Myb-Wannyn
Copy link

+1

@xingxing2008
Copy link
Member

+1

请你测试一下你当前网络环境是否能正常链接微软和Mojang。如果可以,请你提供更多信息

@gaviny82
Copy link
Collaborator

image
这里AuthenticateAsync里面出现了NullReferenceException,应该是FluentCore这个方法里面的问题,我在设置里添加账户是没问题的

@gaviny82 gaviny82 reopened this Apr 13, 2023
@gaviny82 gaviny82 added the help wanted Extra attention is needed label Apr 13, 2023
@xingxing2008
Copy link
Member

At Natsurainko.FluentCore/Module/Authenticator/MicrosoftAuthenticator.cs
Line 137~148

var authorization = new Tuple<string, string>("Bearer", access_token);
using var profileRes = await HttpWrapper.HttpGetAsync("https://api.minecraftservices.com/minecraft/profile", authorization);
var microsoftAuthenticationResponse = JsonConvert.DeserializeObject(await profileRes.Content.ReadAsStringAsync());

    ProgressChanged?.Invoke(this, (1.0f, "Finished"));

    return new MicrosoftAccount
    {
        AccessToken = access_token,
        ClientToken = Guid.NewGuid().ToString("N"),
        Name = microsoftAuthenticationResponse.Name,
        Uuid = Guid.Parse(microsoftAuthenticationResponse.Id),
        RefreshToken = OAuth20TokenResponse.RefreshToken,
        DateTime = DateTime.Now
    };

怀疑可能是 "https://api.minecraftservices.com/minecraft/profile" 返回 null ,如果是正常账号一般不会出现这种情况。或者是之前与XBL通信失败无法获得access_token导致的。

@gaviny82
Copy link
Collaborator

At Natsurainko.FluentCore/Module/Authenticator/MicrosoftAuthenticator.cs Line 137~148

var authorization = new Tuple<string, string>("Bearer", access_token); using var profileRes = await HttpWrapper.HttpGetAsync("https://api.minecraftservices.com/minecraft/profile", authorization); var microsoftAuthenticationResponse = JsonConvert.DeserializeObject(await profileRes.Content.ReadAsStringAsync());

    ProgressChanged?.Invoke(this, (1.0f, "Finished"));

    return new MicrosoftAccount
    {
        AccessToken = access_token,
        ClientToken = Guid.NewGuid().ToString("N"),
        Name = microsoftAuthenticationResponse.Name,
        Uuid = Guid.Parse(microsoftAuthenticationResponse.Id),
        RefreshToken = OAuth20TokenResponse.RefreshToken,
        DateTime = DateTime.Now
    };

怀疑可能是 "https://api.minecraftservices.com/minecraft/profile" 返回 null ,如果是正常账号一般不会出现这种情况。或者是之前与XBL通信失败无法获得access_token导致的。

我又试了一遍,只有在引导界面登录才会出问题,设置里登录是正常的...

@Gholts
Copy link

Gholts commented May 15, 2023

我也是这样
网络环境没有问题,mojang和微软均可以正常连接

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed need further discussion
Projects
None yet
Development

No branches or pull requests

6 participants