qrCode登录失败:该APP尚未开通扫描二维码登录的权限。
icey-yu opened this issue · comments
icey-yu commented
因为使用账号密码Login产生了 SliderNeededError
的错误,所以使用扫码登录,但是扫码之后显示:
登录失败,该APP尚未开通扫描二维码登录的权限。
Mirai版本:v0.0.0-20230315231550-b461f356a30a
运行环境:win64
使用协议:所有协议都尝试过
重现步骤:使用FetchQRCode
方法,保存图片并扫描二维码。
代码:
func TestA(t *testing.T) {
bot := client.NewClient(xxxx, "xxxx")
bot.UseDevice(client.GenRandomDevice())
bot.Device().Protocol = client.AndroidWatch
bot.AllowSlider = true
res, err := bot.Login()
if res.Error.String() != "" {
qrCode, err := bot.FetchQRCode()
if err != nil {
t.Error(err)
return
}
err = os.WriteFile("qrCode.png", qrCode.ImageData, 0777)
if err != nil {
t.Error(err)
return
}
time.Sleep(time.Minute * 2)
}
}
补充说明:
如果有的话,希望能够找到该框架的使用者的讨论群聊,一起交流。
Mrs4s commented
请在 UseDevice
前设置协议
saikaji0314 commented
android watch目前也无法使用token登录,报错信息为:exchange_emp failed: 15