mirai更新到2.7M1后mirai-api-http插件无法使用
-
好家伙强制更新还不能降级
2021-06-20 11:17:15 E/Mirai HTTP API: java.lang.NoSuchMethodError: 'double kotlin.time.DurationKt.toDuration(int, java.util.concurrent.TimeUnit)' java.lang.NoSuchMethodError: 'double kotlin.time.DurationKt.toDuration(int, java.util.concurrent.TimeUnit)' at net.mamoe.mirai.api.http.route.BaseRouteKt$mirai$2.invoke(BaseRoute.kt:48) at net.mamoe.mirai.api.http.route.BaseRouteKt$mirai$2.invoke(BaseRoute.kt) at io.ktor.features.CORS$Feature.install(CORS.kt:517) at io.ktor.features.CORS$Feature.install(CORS.kt:509) at io.ktor.application.ApplicationFeatureKt.install(ApplicationFeature.kt:68) at net.mamoe.mirai.api.http.route.BaseRouteKt.mirai(BaseRoute.kt:45) at net.mamoe.mirai.api.http.MiraiHttpAPIServer$start$2$1$1.invoke(MiraiHttpAPIServer.kt:93) at net.mamoe.mirai.api.http.MiraiHttpAPIServer$start$2$1$1.invoke(MiraiHttpAPIServer.kt:29) at io.ktor.server.engine.ApplicationEngineEnvironmentReloading.instantiateAndConfigureApplication(ApplicationEngineEnvironmentReloading.kt:303) at io.ktor.server.engine.ApplicationEngineEnvironmentReloading.createApplication(ApplicationEngineEnvironmentReloading.kt:138) at io.ktor.server.engine.ApplicationEngineEnvironmentReloading.start(ApplicationEngineEnvironmentReloading.kt:270) at io.ktor.server.cio.CIOApplicationEngine$serverJob$1$1.invokeSuspend(CIOApplicationEngine.kt:53) at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106) at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:571) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:678) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:665)
-
mcl的更新可以设置disable updator然后手动指定版本
-
@nambers 好家伙,果然是BUG,我说怎么昨天好好的,今天登录不了。老哥能不能细说如何指定版本,目前我只能用图形界面的旧版代替。
-
- 输入
mcl -d updater
指令禁掉自动更新脚本, 用mcl -e updater
恢复 - 在config.json里面指定版本
- 输入
-
编辑 config.json 把 channel 改成 stable
-
好的🙏谢谢各位
-
发布了一个 1.x 的版本,2.x 的版本和其他变更一起之后再发布
-
感谢大佬们,修好了
附改完的config.json{ "js_optimization_level": -1, "mirai_repo": "https://gitee.com/peratx/mirai-repo/raw/master", "maven_repo": "https://maven.aliyun.com/repository/public", "packages": [ { "id": "net.mamoe:mirai-console", "channel": "stable", "version": "2.6.7", "type": "libs" }, { "id": "net.mamoe:mirai-console-terminal", "channel": "stable", "version": "2.6.7", "type": "libs" }, { "id": "net.mamoe:mirai-core-all", "channel": "stable", "version": "2.6.7", "type": "libs" }, { "id": "net.mamoe:mirai-api-http", "channel": "stable", "version": "1.10.0", "type": "plugins" } ], "disabled_scripts": [], "proxy": "", "log_level": 0, "script_props": {} }
-
mah居然没有设置beta channel -
@nambers 在 mirai更新到2.7M1后mirai-api-http插件无法使用 中说:
- 输入
mcl -d updater
指令禁掉自动更新脚本, 用mcl -e updater
恢复 - 在config.json里面指定版本
怎么我试了不行,还是会2.6.4升2.6.7:
{ "js_optimization_level": -1, "mirai_repo": "https://gitee.com/peratx/mirai-repo/raw/master", "maven_repo": "https://maven.aliyun.com/repository/public", "packages": [ { "id": "net.mamoe:mirai-console", "channel": "stable", "version": "2.6.4", "type": "libs" }, { "id": "net.mamoe:mirai-console-terminal", "channel": "stable", "version": "2.6.4", "type": "libs" }, { "id": "net.mamoe:mirai-core-all", "channel": "stable", "version": "2.6.4", "type": "libs" } ], "disabled_scripts": [], "proxy": "", "log_level": 0, "script_props": {} }
- 输入
-
-
@nambers
……懂了。因为我是在本地改config.json然后覆盖服务器上的,"disabled_scripts": [] 也覆盖上去了。 -
我都是直接
java -cp ./content/*;./libraries/* net.mamoe.mirai.console.terminal.MiraiConsoleTerminalLoader
到 Maven Central 补全 mirai 的包 (bcprov-jdk15on, mirai-core-all, mirai-console, mirai-console-terminal),丢到 content 文件夹里,一直没出过事(
可能是我爱折腾不喜欢用启动器吧 -
mcl -d updater
指令禁掉自动更新脚本,
然后config.json中更改版本:{ "id": "net.mamoe:mirai-console", "channel": "stable", "version": "2.6.7", "type": "libs" },