KurenaiRyu / im-sync-bot

im消息同步机器人,现主要同步(转发)tg跟qq群。
GNU Affero General Public License v3.0
25 stars 2 forks source link

怎么登陆qq啊 #23

Closed lancer-wang closed 1 year ago

lancer-wang commented 1 year ago

手表协议填密码的话提示

2023-06-28 07:02:28 W/Net : Exception in resumeConnection. net.mamoe.mirai.internal.network.components.LoginFailedExceptionAsNetworkException: Error(bot=Bot(), code=238, title=禁止登录, message=请使用手Q扫描二维码或短信登录。, errorInfo=) at net.mamoe.mirai.internal.network.handler.CommonNetworkHandler$StateConnecting$startState$2.invokeSuspend(CommonNetworkHandler.kt:248)

lancer-wang commented 1 year ago

不填就是

2023-06-28 07:04:46.101 INFO 8 --- [main] org.reflections.Reflections : Reflections took 195 ms to scan 1 urls, producing 42 keys and 833 values Exception in thread "main" com.fasterxml.jackson.module.kotlin.MissingKotlinParameterException: Instantiation of [simple type, class kurenai.imsyncbot.QQProperties] value failed for JSON property password due to missing (therefore NULL) value for creator parameter password which is a non-nullable type at [Source: (File); line: 6, column: 5] (through reference chain: kurenai.imsyncbot.ConfigProperties["bot"]->kurenai.imsyncbot.BotProperties["qq"]->kurenai.imsyncbot.QQProperties["password"])

KurenaiRyu commented 1 year ago

晚上我再发个fix吧,是我读取配置文件的问题。

急的话可以把password写作“”(也就是空串)或者删掉内容但是保留password(也就是password后面什么都不填)。

lancer-wang commented 1 year ago

晚上我再发个fix吧,是我读取配置文件的问题。

急的话可以把password写作“”(也就是空串)或者删掉内容但是保留password(也就是password后面什么都不填)。

现在就是无论“”还是 全删,手表协议都是报密码错误

KurenaiRyu commented 1 year ago

好吧,只能等我有空再出一版fix了。

btw,可以的话让我看看配置文件,记得脱敏。

lancer-wang commented 1 year ago

bot: qq: account: # qq账号 password: # qq密码,ANDROID_WATCH 协议下 protocol: ANDROID_WATCH #ANDROID_PAD | ANDROID_PHONE | ANDROID_WATCH telegram: token: # tg机器人token username: # tg机器人用户名 tg-msg-format: "#$name #id$id $newline$newline$msg" #tg消息格式化: $name: 发送者名称;$id: 发送者id;$newline: 换行;$msg: 消息体 qq-msg-format: "#$name: $msg" # qq消息格式化 master-of-tg: # 主人 tg id master-of-qq: # 主人 qq 账号 pic-to-file-size: 2 # 图片大约多少M则转为文件发送 enable-recall: false # true 则删掉转发的tg消息,否则会修改成划线消息以表示撤销 redis: host: redis # redis ip ;若是使用docker-compose构建环境则不需要修改 port: 6379 # redis 端口,一般默认就这个端口;若是使用docker-compose构建环境则不需要修改 database: 10 # redis数据库id,一般不需要修改,只有多个程序共用时为了避免问题而分开不同数据库

KurenaiRyu commented 1 year ago

请问一下你用的是哪个版本,我这边看了下1.2.2应该是没有jackson的包了,1.2.2我这边随便试了下应该读取配置没问题,另外部署是用的 jar 包还是 docker?

ps:你上面的配置格式并没有对其,每行前面的空格是必须保留的。如果只是贴过来格式没复制到的话就无视我这段吧

lancer-wang commented 1 year ago

我用的docker版本,没对其是复制的问题

KurenaiRyu commented 1 year ago

之前的版本是没有更新二维码扫描的,那晚点我把docker的也更新一下吧,你改一下docker-compose.yaml里面的image: kurenai9/im-sync-bot:1.2.1 -> image: kurenai9/im-sync-bot:latest,然后docker compose pull && docker compose up -d更新一下镜像应该就好了。

ps:二维码要求在同一个网络环境下登录,也就是说你部署在某个远程机上,你还要能有类似梯子的东西代理到远程机上相同网络环境才能够顺利登录(但我自己没试过,我只是在本地跑)

lancer-wang commented 1 year ago

新版本可以了 使用代理我测试可以登陆