cssxsh / fix-protocol-version

GNU Affero General Public License v3.0
105 stars 19 forks source link

配合magic-signer-guide使用显示open fail #49

Closed weisuoyuzai closed 1 year ago

weisuoyuzai commented 1 year ago

mirai版本: 2.15.0 fix-protocol-version版本: 1.9.4 magic-signer-guide版本: kiliokuara/vivo50:63480537ddf77b6b626bc3836e5e1d9c2c9939cb

mirai-console日志

2023-07-12 11:05:31 I/ViVo50: Bot(****) initialize by http://192.168.2.198:8888
Login failed: Session(bot=****) open fail
2023-07-12 11:05:31 E/console: java.lang.IllegalStateException: Session(bot=****) open fail
java.lang.IllegalStateException: Session(bot=****) open fail
    at fix-protocol-version-1.9.4.mirai2.jar//xyz.cssxsh.mirai.tool.ViVo50$Session.open(ViVo50.kt:295)
    at fix-protocol-version-1.9.4.mirai2.jar//xyz.cssxsh.mirai.tool.ViVo50$Session.websocket(ViVo50.kt:346)
    at fix-protocol-version-1.9.4.mirai2.jar//xyz.cssxsh.mirai.tool.ViVo50.initialize(ViVo50.kt:80)
    at net.mamoe.mirai.internal.network.components.EcdhInitialPublicKeyUpdaterImpl.initializeSsoSecureEcdh(EcdhInitialPublicKeyUpdater.kt:123)
    at net.mamoe.mirai.internal.network.components.SsoProcessorImpl.login(SsoProcessor.kt:224)
    at net.mamoe.mirai.internal.network.components.SsoProcessorImpl$login$1.invokeSuspend(SsoProcessor.kt)
    at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
    at net.mamoe.mirai.internal.deps.io.ktor.util.pipeline.SuspendFunctionGun.resumeRootWith(SuspendFunctionGun.kt:138)
    at net.mamoe.mirai.internal.deps.io.ktor.util.pipeline.SuspendFunctionGun.loop(SuspendFunctionGun.kt:112)
    at net.mamoe.mirai.internal.deps.io.ktor.util.pipeline.SuspendFunctionGun.access$loop(SuspendFunctionGun.kt:14)
    at net.mamoe.mirai.internal.deps.io.ktor.util.pipeline.SuspendFunctionGun$continuation$1.resumeWith(SuspendFunctionGun.kt:62)
    at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:46)
    at net.mamoe.mirai.internal.deps.io.ktor.util.pipeline.SuspendFunctionGun.resumeRootWith(SuspendFunctionGun.kt:138)
    at net.mamoe.mirai.internal.deps.io.ktor.util.pipeline.SuspendFunctionGun.loop(SuspendFunctionGun.kt:112)
    at net.mamoe.mirai.internal.deps.io.ktor.util.pipeline.SuspendFunctionGun.access$loop(SuspendFunctionGun.kt:14)
    at net.mamoe.mirai.internal.deps.io.ktor.util.pipeline.SuspendFunctionGun$continuation$1.resumeWith(SuspendFunctionGun.kt:62)
    at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:46)
    at net.mamoe.mirai.internal.deps.io.ktor.util.pipeline.SuspendFunctionGun.resumeRootWith(SuspendFunctionGun.kt:138)
    at net.mamoe.mirai.internal.deps.io.ktor.util.pipeline.SuspendFunctionGun.loop(SuspendFunctionGun.kt:112)
    at net.mamoe.mirai.internal.deps.io.ktor.util.pipeline.SuspendFunctionGun.access$loop(SuspendFunctionGun.kt:14)
    at net.mamoe.mirai.internal.deps.io.ktor.util.pipeline.SuspendFunctionGun$continuation$1.resumeWith(SuspendFunctionGun.kt:62)
    at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:46)
    at net.mamoe.mirai.internal.deps.io.ktor.util.pipeline.SuspendFunctionGun.resumeRootWith(SuspendFunctionGun.kt:138)
    at net.mamoe.mirai.internal.deps.io.ktor.util.pipeline.SuspendFunctionGun.loop(SuspendFunctionGun.kt:112)
    at net.mamoe.mirai.internal.deps.io.ktor.util.pipeline.SuspendFunctionGun.access$loop(SuspendFunctionGun.kt:14)
    at net.mamoe.mirai.internal.deps.io.ktor.util.pipeline.SuspendFunctionGun$continuation$1.resumeWith(SuspendFunctionGun.kt:62)
    at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:46)
    at net.mamoe.mirai.internal.deps.io.ktor.util.pipeline.SuspendFunctionGun.resumeRootWith(SuspendFunctionGun.kt:138)
    at net.mamoe.mirai.internal.deps.io.ktor.util.pipeline.SuspendFunctionGun.loop(SuspendFunctionGun.kt:112)
    at net.mamoe.mirai.internal.deps.io.ktor.util.pipeline.SuspendFunctionGun.access$loop(SuspendFunctionGun.kt:14)
    at net.mamoe.mirai.internal.deps.io.ktor.util.pipeline.SuspendFunctionGun$continuation$1.resumeWith(SuspendFunctionGun.kt:62)
    at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:46)
    at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
    at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:570)
    at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750)
    at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:677)
    at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:664)

magic-signer-guide docker日志

2023-07-12 11:05:26 2023-07-12 03:05:26 [INFO ] [vert.x-eventloop-thread-0] RpcServerBootstrap - [ROUTER] receiving get handshake config request
2023-07-12 11:05:26 2023-07-12 03:05:26 [INFO ] [vert.x-eventloop-thread-0] RpcServerBootstrap - [ROUTER] receiving do handshake request
2023-07-12 11:05:26 2023-07-12 03:05:26 [INFO ] [vert.x-eventloop-thread-0] RpcServerBootstrap - [ROUTER] accepted do handshake request.
2023-07-12 11:05:26 2023-07-12 03:05:26 [INFO ] [vert.x-eventloop-thread-0] RpcServerBootstrap - session of bot **** is created: 1d61a799-7afa-41a5-8f8e-c002eb89fc20.cOsCoIM1G5H9CukVOFNB3ztTLxq56p7iazQ0YhRHb7O6J6QFDYsjgmsYxiMyKnuXvVjuG653ubo62nyYkdthnXB5y4t2L2fzvpoBNa70WBqwuV7Acdtnz8i3G7KXaS+KOIiAcr+aLIutd9susbp4Nzadf+7Gw/l5aNl3vtXjj6Iu4tBEBMq/z9hbtR60YC4E4Hfi1/s3HE3VIvuIeYeQkTwwtU8Ud/1OgYJoFzEx2P9TbPBCZdH9DeAfOG3WQ3WaqHpaxoKI1Sj65VsO6gvt7Pfzqbmi/G1Gk8TslHgWuPkWADx2AU6UqHE11hM1+MGOhAkv2PtDDyL9WI2ycMS8a4Hefwe+ndRPmduSNPTJ5kw0BSfljFNp4xaT7m9+miNMFVeYvGXCRQB68O6f6CX72vjgUG5Sg3Dpm8Zf7c/WvHrKMFE8TpBdWdt0qmwrOkJc+FHnuZ1B1F8v31AfILYbRptZUxqigJxhjp9oP+M0PpbsoFLyP04D2EforSa6x725bJbAAxVvaUKH0yT6hxPxkRg0Q++py03fiImHwC2Q9347C0wcvzyfF+5VJfYtBDuqU9fG8pkR7BJdsolxZyg8kUKQY6neBYcIL3epQd/dCB1f1fap8Se+vvfqdhhdv+PW7l5NX4oiQNa40TzwA+7PDiV7hpwLzuguZWSozJNC7MY=
2023-07-12 11:05:26 2023-07-12 03:05:26 [INFO ] [vert.x-eventloop-thread-0] RpcServerBootstrap - [ROUTER] client request to check session state 1d61a799-7afa-41a5-8f8e-c002eb89fc20.cOsCoIM1G5H9CukVOFNB3ztTLxq56p7iazQ0YhRHb7O6J6QFDYsjgmsYxiMyKnuXvVjuG653ubo62nyYkdthnXB5y4t2L2fzvpoBNa70WBqwuV7Acdtnz8i3G7KXaS+KOIiAcr+aLIutd9susbp4Nzadf+7Gw/l5aNl3vtXjj6Iu4tBEBMq/z9hbtR60YC4E4Hfi1/s3HE3VIvuIeYeQkTwwtU8Ud/1OgYJoFzEx2P9TbPBCZdH9DeAfOG3WQ3WaqHpaxoKI1Sj65VsO6gvt7Pfzqbmi/G1Gk8TslHgWuPkWADx2AU6UqHE11hM1+MGOhAkv2PtDDyL9WI2ycMS8a4Hefwe+ndRPmduSNPTJ5kw0BSfljFNp4xaT7m9+miNMFVeYvGXCRQB68O6f6CX72vjgUG5Sg3Dpm8Zf7c/WvHrKMFE8TpBdWdt0qmwrOkJc+FHnuZ1B1F8v31AfILYbRptZUxqigJxhjp9oP+M0PpbsoFLyP04D2EforSa6x725bJbAAxVvaUKH0yT6hxPxkRg0Q++py03fiImHwC2Q9347C0wcvzyfF+5VJfYtBDuqU9fG8pkR7BJdsolxZyg8kUKQY6neBYcIL3epQd/dCB1f1fap8Se+vvfqdhhdv+PW7l5NX4oiQNa40TzwA+7PDiV7hpwLzuguZWSozJNC7MY=
cssxsh commented 1 year ago

日志里看不出具体原因 有重复尝试,保证稳定复现吗。

weisuoyuzai commented 1 year ago

日志里看不出具体原因 有重复尝试,保证稳定复现吗。

可以百分百复现,如果是autoLogin的话还会多几行日志

下面是autoLogin多出来的日志

2023-07-12 17:41:31 I/main: Auto-login ****, protocol: ANDROID_PHONE, heartbeatStrategy: STAT_HB
2023-07-12 17:41:31 W/EncryptService.alert: Encrypt service was loaded: KFCFactory(config=file:///home/qqbot2/KFCFactory.json)
2023-07-12 17:41:31 W/EncryptService.alert: All outgoing message may be leaked by this service.
2023-07-12 17:41:31 W/EncryptService.alert: Use this service if and only if you trusted this service and the service provider.
2023-07-12 17:41:31 W/EncryptService.alert: Service details:
2023-07-12 17:41:31 W/EncryptService.alert:   `- Jvm Class: class xyz.cssxsh.mirai.tool.KFCFactory
2023-07-12 17:41:31 W/EncryptService.alert:   `- ClassLoader: JvmPluginClassLoader{fix-protocol-version-1.9.4.mirai2.jar}
2023-07-12 17:41:31 W/EncryptService.alert:   `- Source: file:/home/qqbot2/plugins/fix-protocol-version-1.9.4.mirai2.jar
2023-07-12 17:41:31 W/EncryptService.alert:   `- Protected Domain: ProtectionDomain  (file:/home/qqbot2/plugins/fix-protocol-version-1.9.4.mirai2.jar <no signer certificates>)
 JvmPluginClassLoader{fix-protocol-version-1.9.4.mirai2.jar}
 <no principals>
 java.security.Permissions@6ca367aa (
 ("java.io.FilePermission" "/home/qqbot2/plugins/fix-protocol-version-1.9.4.mirai2.jar" "read")
)
cssxsh commented 1 year ago

关键的报错可能在某处被遗弃了

改了一下 onError 的处理

https://github.com/cssxsh/fix-protocol-version/actions/runs/5531687014

把 build.zip 下载下来解压,替换你目前的版本

cssxsh commented 1 year ago

另外,两段日志的 时间不一样,差几秒,有校准时间吗

2023-07-12 11:05:31

2023-07-12 11:05:26

weisuoyuzai commented 1 year ago

另外,两段日志的 时间不一样,差几秒,有校准时间吗

2023-07-12 11:05:31

2023-07-12 11:05:26

破案了。两台机子同步了下时间就好了,确实是时间差的问题