iTXTech / mirai-native

强大的 mirai 原生插件加载器
GNU Affero General Public License v3.0
370 stars 141 forks source link

机器人私聊发送不了图片,群聊正常 #142

Closed zhouhuichen741 closed 3 years ago

zhouhuichen741 commented 3 years ago

之前一直是好的,突然不能私聊回复图片了,文字之类的一切正常,群聊图片也一直正常发送,报错如下: 2021-06-18 13:20:40 D/OneBot: 发生了被插件忽略的事件: BeforeImageUploadEvent(target=Friend(回复的QQ号), source=net.mamoe.mirai.internal.utils.ExternalResourceImplByFile@f07192) 2021-06-18 13:20:40 D/OneBot: 发生了被插件忽略的事件: Failed(target=Friend(回复的QQ), source=net.mamoe.mirai.internal.utils.ExternalResourceImplByFile@f07192, errno=-1, message=para error) 2021-06-18 13:20:40 E/MiraiNative: Exception in coroutine Plugin MiraiNative of MiraiNative java.lang.IllegalStateException: para error at net.mamoe.mirai.internal.contact.AbstractUser.uploadImage$suspendImpl(AbstractUser.kt:136) at net.mamoe.mirai.internal.contact.AbstractUser$uploadImage$1.invokeSuspend(AbstractUser.kt) at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) at kotlinx.coroutines.internal.ScopeCoroutine.afterResume(Scopes.kt:33) at kotlinx.coroutines.AbstractCoroutine.resumeWith(AbstractCoroutine.kt:113) 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: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) 版本 操作系统:Windows 10 2004

mirai-native-2.0.0-beta.1

onebot-mirai-0.3.4

mirai-core-2.2.0

mirai-console-2.2.0

zhouhuichen741 commented 3 years ago

尝试过更新mirai版本,更换服务器等操作,报错的情况是一样的,上个月都是正常运行的,也可以私聊发图之类的,所以完全搞不明白是哪个地方出现了问题

PeratX commented 3 years ago

可能是native得更新了,有空看看

zhouhuichen741 commented 3 years ago

可能是native得更新了,有空看看

好的谢谢

PeratX commented 3 years ago

core版本太老了

zhouhuichen741 commented 3 years ago

core版本太老了

我换成了2.6.4好像还是不行,是要换成最新的2.7吗

PeratX commented 3 years ago

public suspend fun uploadImage(resource: ExternalResource): Image

已经再三确认了方法没调用错,尝试编译个最新版,配合2.7-M2使用。 或者等待2.0.0-beta.2发布,配合2.7-M2使用

zhouhuichen741 commented 3 years ago

public suspend fun uploadImage(resource: ExternalResource): Image

已经再三确认了方法没调用错,尝试编译个最新版,配合2.7-M2使用。 或者等待2.0.0-beta.2发布,配合2.7-M2使用

给您添麻烦了,更新到2.7-M2正常了,实在抱歉