Skip to content

'今日老婆' Unsupported image type (mirai) for ExternalResource #8

@tangsu99

Description

@tangsu99

'今日老婆' 命令的图片 API 参数问题导致第一次调用 API 返回不是图片导致触发命令时出现错误:

2024-12-26 17:36:24 E/com.generalk1ng.Kookie: Exception in coroutine Plugin com.generalk1ng.Kookie of com.generalk1ng.Kookie
java.lang.IllegalArgumentException: Unsupported image type (mirai) for ExternalResource net.mamoe.mirai.internal.utils.ExternalResourceImplByByteArray@33c25715, considering use gif/png/bmp/jpg format. image header: 3C 21 44 4F 43 54 59 50 45 20 68 74 6D 6C 3E 0D 0A 3C 68 74 6D 6C 20 6C 61 6E 67 3D 22 7A
	at net.mamoe.mirai.internal.message.image.ImageDecoderKt.calculateImageInfo(ImageDecoder.kt:159)
	at net.mamoe.mirai.internal.contact.CommonGroupImpl$uploadImage$lambda$16$$inlined$runBIO$1.invoke(CoroutineUtils.kt:23)
	at kotlinx.coroutines.InterruptibleKt.runInterruptibleInExpectedContext(Interruptible.kt:51)
	at kotlinx.coroutines.InterruptibleKt.access$runInterruptibleInExpectedContext(Interruptible.kt:1)
	at kotlinx.coroutines.InterruptibleKt$runInterruptible$2.invokeSuspend(Interruptible.kt:43)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
	at kotlinx.coroutines.internal.LimitedDispatcher.run(LimitedDispatcher.kt:42)
	at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:95)
	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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions