LagrangeDev / Lagrange.Core

An Implementation of NTQQ Protocol, with Pure C#, Derived from Konata.Core
GNU General Public License v3.0
2k stars 244 forks source link

[FATAL]: Tag: 禁止登录 #405

Closed dingdinglz closed 4 months ago

dingdinglz commented 4 months ago

请确保您已阅读以上注意事项,并勾选下方的确认框。

Lagrange项目

Core

所使用/依赖的Lagrange项目对应的commit

nuget 0.2.1

运行环境

Windows

运行架构

x64

连接方式

None

重现步骤

[2024-06-11 21:31:08] [WtExchangeLogic] [FATAL]: Login failed: 45 [2024-06-11 21:31:08] [WtExchangeLogic] [FATAL]: Tag: 禁止登录 State: 登录失败,请前往QQ官网im.qq.com下载最新版QQ后重试,或通过问题反馈与我们联系。

期望的结果是什么?

我搜索过去的issues发现需要配置signServer,但我在readme发现目前linux已经内置了signServer,并提供了一个链接,仍然出现这个问题,请问是否是需要在代码里启用signServer,该如何做,在文档中未找到相关内容,感谢!!

实际的结果是什么?

未登录成功

简单的复现代码/链接(可选)

var bot = BotFactory.Create(new BotConfig { UseIPv6Network = false, Protocol = Protocols.Linux,GetOptimumServer = true,AutoReconnect = true,
}, info, new BotKeystore());

bot.Invoker.OnBotLogEvent += (context, @event) =>
{
    Console.WriteLine(@event.ToString());
};

var qrCode = await bot.FetchQrCode();
if (qrCode != null)
{
    await File.WriteAllBytesAsync("qr.png", qrCode.Value.QrCode);
    await bot.LoginByQrCode();
    while(true)
    {

    }
}

Trace 级别日志记录(可选)

No response

补充说明(可选)

No response

Decrabbityyy commented 4 months ago

检查服务器到签名服务器(sign.lagrangecore.org)的网络连接

dingdinglz commented 4 months ago

检查服务器到签名服务器(sign.lagrangecore.org)的网络连接

你好,我是在本机调试的,ping的通,链接应该没问题

ghost commented 4 months ago

注册 OnBotLogEvent 以打印日志向我们提供

抱歉没有看见相关代码

dingdinglz commented 4 months ago

~注册 OnBotLogEvent 以打印日志向我们提供~

抱歉没有看见相关代码

读取配置文件中...
生成配置文件中...
{"Guid":"a4317aa6-feea-40d1-aafb-b37477fb9369","MacAddress":"NOZUnwx6","DeviceName":"Lagrange-00697B","SystemKernel":"Windows 10.0.19042","KernelVersion":"10.0.19042.0"}
[2024-06-11 21:45:22] [WtExchangeLogic] [INFORMATION]: Connecting Servers...
[2024-06-11 21:45:22] [SocketContext] [VERBOSE]: Server: http://36.155.207.230:8080/ Latency: 12
[2024-06-11 21:45:22] [SocketContext] [VERBOSE]: Server: http://36.155.245.16:8080/ Latency: 12
[2024-06-11 21:45:22] [SocketContext] [VERBOSE]: Server: http://36.155.163.25:8080/ Latency: 12
[2024-06-11 21:45:22] [SocketContext] [VERBOSE]: Server: http://36.155.187.225:8080/ Latency: 17
[2024-06-11 21:45:22] [SocketContext] [VERBOSE]: Server: http://36.155.163.117:8080/ Latency: 14
[2024-06-11 21:45:22] [SocketContext] [VERBOSE]: Server: http://36.155.197.218:8080/ Latency: 17
[2024-06-11 21:45:22] [ServiceContext] [DEBUG]: Outgoing SSOFrame: wtlogin.trans_emp
[2024-06-11 21:45:22] [ServiceContext] [DEBUG]: Incoming SSOFrame: wtlogin.trans_emp
[2024-06-11 21:45:22] [WtExchangeLogic] [INFORMATION]: QrCode Fetched, Expiration: 120 seconds
[2024-06-11 21:45:24] [ServiceContext] [DEBUG]: Outgoing SSOFrame: wtlogin.trans_emp
[2024-06-11 21:45:24] [ServiceContext] [DEBUG]: Incoming SSOFrame: wtlogin.trans_emp
[2024-06-11 21:45:24] [WtExchangeLogic] [INFORMATION]: QrCode State Queried: WaitingForScan Uin: 0
[2024-06-11 21:45:26] [ServiceContext] [DEBUG]: Outgoing SSOFrame: wtlogin.trans_emp
[2024-06-11 21:45:26] [ServiceContext] [DEBUG]: Incoming SSOFrame: wtlogin.trans_emp
[2024-06-11 21:45:26] [WtExchangeLogic] [INFORMATION]: QrCode State Queried: WaitingForScan Uin: 0
[2024-06-11 21:45:28] [ServiceContext] [DEBUG]: Outgoing SSOFrame: wtlogin.trans_emp
[2024-06-11 21:45:28] [ServiceContext] [DEBUG]: Incoming SSOFrame: wtlogin.trans_emp
[2024-06-11 21:45:28] [WtExchangeLogic] [INFORMATION]: QrCode State Queried: WaitingForScan Uin: 0
[2024-06-11 21:45:30] [ServiceContext] [DEBUG]: Outgoing SSOFrame: wtlogin.trans_emp
[2024-06-11 21:45:30] [ServiceContext] [DEBUG]: Incoming SSOFrame: wtlogin.trans_emp
[2024-06-11 21:45:30] [WtExchangeLogic] [INFORMATION]: QrCode State Queried: WaitingForScan Uin: 0
[2024-06-11 21:45:32] [ServiceContext] [DEBUG]: Outgoing SSOFrame: Heartbeat.Alive
[2024-06-11 21:45:32] [ServiceContext] [DEBUG]: Outgoing SSOFrame: wtlogin.trans_emp
[2024-06-11 21:45:32] [ServiceContext] [DEBUG]: Incoming SSOFrame: wtlogin.trans_emp
[2024-06-11 21:45:32] [WtExchangeLogic] [INFORMATION]: QrCode State Queried: WaitingForScan Uin: 0
[2024-06-11 21:45:34] [ServiceContext] [DEBUG]: Outgoing SSOFrame: wtlogin.trans_emp
[2024-06-11 21:45:34] [ServiceContext] [DEBUG]: Incoming SSOFrame: wtlogin.trans_emp
[2024-06-11 21:45:34] [WtExchangeLogic] [INFORMATION]: QrCode State Queried: WaitingForScan Uin: 0
[2024-06-11 21:45:36] [ServiceContext] [DEBUG]: Outgoing SSOFrame: wtlogin.trans_emp
[2024-06-11 21:45:36] [ServiceContext] [DEBUG]: Incoming SSOFrame: wtlogin.trans_emp
[2024-06-11 21:45:36] [WtExchangeLogic] [INFORMATION]: QrCode State Queried: WaitingForScan Uin: 0
[2024-06-11 21:45:38] [ServiceContext] [DEBUG]: Outgoing SSOFrame: wtlogin.trans_emp
[2024-06-11 21:45:38] [ServiceContext] [DEBUG]: Incoming SSOFrame: wtlogin.trans_emp
[2024-06-11 21:45:38] [WtExchangeLogic] [INFORMATION]: QrCode State Queried: WaitingForScan Uin: 0
[2024-06-11 21:45:40] [ServiceContext] [DEBUG]: Outgoing SSOFrame: wtlogin.trans_emp
[2024-06-11 21:45:40] [ServiceContext] [DEBUG]: Incoming SSOFrame: wtlogin.trans_emp
[2024-06-11 21:45:40] [WtExchangeLogic] [INFORMATION]: QrCode State Queried: WaitingForConfirm Uin: 3582683469
[2024-06-11 21:45:42] [ServiceContext] [DEBUG]: Outgoing SSOFrame: Heartbeat.Alive
[2024-06-11 21:45:42] [ServiceContext] [DEBUG]: Outgoing SSOFrame: wtlogin.trans_emp
[2024-06-11 21:45:42] [ServiceContext] [DEBUG]: Incoming SSOFrame: wtlogin.trans_emp
[2024-06-11 21:45:42] [WtExchangeLogic] [INFORMATION]: QrCode State Queried: WaitingForConfirm Uin: 3582683469
[2024-06-11 21:45:44] [ServiceContext] [DEBUG]: Outgoing SSOFrame: wtlogin.trans_emp
[2024-06-11 21:45:44] [ServiceContext] [DEBUG]: Incoming SSOFrame: wtlogin.trans_emp
[2024-06-11 21:45:44] [WtExchangeLogic] [INFORMATION]: QrCode State Queried: WaitingForConfirm Uin: 3582683469
[2024-06-11 21:45:46] [ServiceContext] [DEBUG]: Outgoing SSOFrame: wtlogin.trans_emp
[2024-06-11 21:45:46] [ServiceContext] [DEBUG]: Incoming SSOFrame: wtlogin.trans_emp
[2024-06-11 21:45:46] [WtExchangeLogic] [INFORMATION]: QrCode State Queried: Confirmed Uin: 3582683469
[2024-06-11 21:45:46] [WtExchangeLogic] [INFORMATION]: QrCode Confirmed, Logging in with A1 sig...
[2024-06-11 21:45:46] [WtExchangeLogic] [INFORMATION]: Doing Login...
[2024-06-11 21:45:46] [ServiceContext] [DEBUG]: Outgoing SSOFrame: wtlogin.login
[2024-06-11 21:45:47] [ServiceContext] [DEBUG]: Incoming SSOFrame: wtlogin.login
[2024-06-11 21:45:47] [WtExchangeLogic] [FATAL]: Login failed: 45
[2024-06-11 21:45:47] [WtExchangeLogic] [FATAL]: Tag: 禁止登录
State: 登录失败,请前往QQ官网im.qq.com下载最新版QQ后重试,或通过问题反馈与我们联系。
[2024-06-11 21:45:52] [ServiceContext] [DEBUG]: Outgoing SSOFrame: Heartbeat.Alive

我完整的代码是这样的,参考了Test里的写法

using Lagrange.Core.Common;
using Lagrange.Core.Common.Interface;
using Lagrange.Core.Common.Interface.Api;
using System.Text.Json;

Console.WriteLine("读取配置文件中...");
BotDeviceInfo info;
if (File.Exists("DeviceInfo.json"))
{
    info = JsonSerializer.Deserialize<BotDeviceInfo>(File.ReadAllText("DeviceInfo.json"));
    if (info == null)
    {
        info = BotDeviceInfo.GenerateInfo();
        File.WriteAllText("DeviceInfo.json", JsonSerializer.Serialize(info));
    }
}
else
{
    Console.WriteLine("生成配置文件中...");
    info = BotDeviceInfo.GenerateInfo();
    File.WriteAllText("DeviceInfo.json", JsonSerializer.Serialize(info));
}
Console.WriteLine(File.ReadAllText("DeviceInfo.json"));

var bot = BotFactory.Create(new BotConfig { UseIPv6Network = false, Protocol = Protocols.Linux,GetOptimumServer = true,AutoReconnect = true,
}, info, new BotKeystore());

bot.Invoker.OnBotLogEvent += (context, @event) =>
{
    Console.WriteLine(@event.ToString());
};

var qrCode = await bot.FetchQrCode();
if (qrCode != null)
{
    await File.WriteAllBytesAsync("qr.png", qrCode.Value.QrCode);
    await bot.LoginByQrCode();
    while(true)
    {

    }
}
ghost commented 4 months ago

在 nuget 里面的版本过旧,导致无法登陆,稍后会更新版本,请耐心等待

dingdinglz commented 4 months ago

在 nuget 里面的版本过旧,导致无法登陆,稍后会更新版本,请耐心等待

收到,感谢!

Executor-Cheng commented 4 months ago

@dingdinglz nightly-release 已重新生成, 点我去下载

ghost commented 4 months ago

@dingdinglz nightly-release 已重新生成, 点我去下载

人用的 Lagrange.Core 开发( 你给个 Lagrange.OneBot 的链接给他没用(

ghost commented 4 months ago

现在 0.2.2 已经在 NuGet 和 GitHub Packages 发版, 请自行更新

dingdinglz commented 4 months ago

现在 0.2.2 已经在 NuGet 和 GitHub Packages 发版, 请自行更新

已成功,感谢各位的辛勤付出