iTXTech/mirai-console-loader

无法安装 mirai-api-http 插件 报错Failed to verify package "net.mamoe:mirai-api-http"

Closed this issue · 1 comments

Windows环境
先执行
./mcl --update-package net.mamoe:mirai-api-http --channel stable-v2 --type plugin

输出:

  01:59:00 [INFO] iTX Technologies Mirai Console Loader version 2.1.2-61c8bd8
  01:59:01 [INFO] Runtime: OpenJDK 64-Bit Server VM 11.0.14 (arch: 64)
  01:59:01 [INFO] https://github.com/iTXTech/mirai-console-loader
  01:59:01 [INFO] This program is licensed under GNU AGPL v3
  01:59:01 [INFO] MCL Addon is installed! Website: https://github.com/iTXTech/mcl-addon
  01:59:01 [WARN] To remove MCL Addon, run "./mcl --disable-module addon" and "./mcl --remove-package org.itxtech:mcl-addon"
  01:59:01 [INFO] Package "net.mamoe:mirai-api-http" has been added.

然后启动,日志输出如下:

  01:59:26 [INFO] iTX Technologies Mirai Console Loader version 2.1.2-61c8bd8
  01:59:26 [INFO] Runtime: OpenJDK 64-Bit Server VM 11.0.14 (arch: 64)
  01:59:26 [INFO] https://github.com/iTXTech/mirai-console-loader
  01:59:26 [INFO] This program is licensed under GNU AGPL v3
  01:59:27 [ERROR] Failed to fetch announcement for "net.mamoe:mirai-api-http"
  01:59:27 [ERROR] Failed to fetch MCL announcement.
  01:59:27 [INFO] Verifying "net.mamoe:mirai-console"
  01:59:27 [INFO] Updating "net.mamoe:mirai-console" to v2.13.2
 Downloading mirai-console-2.13.2-all.jar [==============================] 7.36 MB
 Downloading mirai-console-2.13.2-all.jar.sha1 [==============================] 40 B
  01:59:41 [INFO] Verifying "net.mamoe:mirai-console-terminal"
  01:59:41 [INFO] Updating "net.mamoe:mirai-console-terminal" to v2.13.2
 Downloading mirai-console-terminal-2.13.2-all.jar [==============================] 1.32 MB                         
 Downloading mirai-console-terminal-2.13.2-all.jar.sha1 [==============================] 40 B
  01:59:42 [INFO] Verifying "net.mamoe:mirai-core-all"
  01:59:43 [INFO] Updating "net.mamoe:mirai-core-all" to v2.13.2
 Downloading mirai-core-all-2.13.2-all.jar [==============================] 36.02 MB
 Downloading mirai-core-all-2.13.2-all.jar.sha1 [==============================] 40 B
  01:59:44 [INFO] Verifying "org.itxtech:mcl-addon"
  01:59:45 [INFO] Updating "org.itxtech:mcl-addon" to v2.1.1
 Downloading mcl-addon-2.1.1.jar [==============================] 57.22 KB
 Downloading mcl-addon-2.1.1.jar.sha1 [==============================] 40 B
  01:59:45 [INFO] Verifying "net.mamoe:mirai-api-http"
  01:59:45 [ERROR] Failed to verify package "net.mamoe:mirai-api-http"
  01:59:45 [ERROR] com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 1 path $
        at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:395)
        at com.google.gson.Gson.fromJson(Gson.java:1214)
        at com.google.gson.Gson.fromJson(Gson.java:1124)
        at com.google.gson.Gson.fromJson(Gson.java:1034)
        at com.google.gson.Gson.fromJson(Gson.java:1001)
        at org.itxtech.mcl.component.Repository.fetchPackage(Repository.java:84)
        at org.itxtech.mcl.module.builtin.RepoCache$RepoWithCache.fetchPackage(RepoCache.java:88)
        at org.itxtech.mcl.module.builtin.Updater.check(Updater.java:101)
        at org.itxtech.mcl.module.builtin.Updater.load(Updater.java:60)
        at org.itxtech.mcl.module.ModuleManager.phaseLoad(ModuleManager.java:117)
        at org.itxtech.mcl.Loader.lambda$start$3(Loader.java:190)
        at org.itxtech.mcl.Loader.tryCatching(Loader.java:151)
        at org.itxtech.mcl.Loader.start(Loader.java:190)
        at org.itxtech.mcl.Loader.main(Loader.java:84)
Caused by: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 1 path $
        at com.google.gson.stream.JsonReader.beginObject(JsonReader.java:393)
        at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:384)
        ... 13 more

可以正常启动并登陆qq,但是 mirai-api-http 插件没有安装并运行

最终目录结构如下:

│  config.json
│  LICENSE
│  mcl
│  mcl.cmd
│  mcl.jar
│  README.md
│
├─libs
│      mirai-console-2.13.2-all.jar
│      mirai-console-2.13.2-all.jar.sha1
│      mirai-console-terminal-2.13.2-all.jar
│      mirai-console-terminal-2.13.2-all.jar.sha1
│      mirai-core-all-2.13.2-all.jar
│      mirai-core-all-2.13.2-all.jar.sha1
│
├─modules
└─plugins
        mcl-addon-2.1.1.jar
        mcl-addon-2.1.1.jar.sha1

jdk问题,参考官方文档安装其推荐的jdk