Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

群聊消息图片发送不出去,私聊可以,换了账号尝试仍是如此 #1601

Closed
xingchenxuup opened this issue Oct 12, 2021 · 18 comments
Labels
x:question 标签: 需要更多信息 z:wait-for-reply 状态: 等待回复

Comments

@xingchenxuup
Copy link

2021-10-12 16:30:08 V/Bot 1627021747: Event: BeforeImageUploadEvent(target=Group(248217225), source=net.mamoe.mirai.internal.utils.ExternalResourceImplByFile@7f665fc9)
2021-10-12 16:30:08 V/Net 1627021747: Send: ImgStore.GroupPicUp(ImgStore.GroupPicUp)
2021-10-12 16:30:08 V/Bot 1627021747: Event: Succeed(target=Group(248217225), source=net.mamoe.mirai.internal.utils.ExternalResourceImplByFile@7f665fc9, image=[mirai:image:{DADBBC98-49C4-2DBA-4795-7F645679C8AC}.png])
2021-10-12 16:30:08 V/Net 1627021747: Recv: ImgStore.GroupPicUp
2021-10-12 16:30:08 V/Bot 1627021747: Event: GroupMessagePreSendEvent(target=Group(248217225), message=[mirai:image:{DADBBC98-49C4-2DBA-4795-7F645679C8AC}.png])
2021-10-12 16:30:09 V/Net 1627021747: Send: MessageSvc.PbSendMsg(MessageSvc.PbSendMsg)
2021-10-12 16:30:09 V/Net 1627021747: Recv: MessageSvc.PbSendMsg
2021-10-12 16:30:11 V/Bot 1627021747: Group(248217225) <- [mirai:image:{DADBBC98-49C4-2DBA-4795-7F645679C8AC}.png]
2021-10-12 16:30:11 V/Bot 1627021747: Event: GroupMessagePostSendEvent(target=Group(248217225), message=[mirai:image:{DADBBC98-49C4-2DBA-4795-7F645679C8AC}.png], exception=null, receipt=net.mamoe.mirai.message.MessageReceipt@22320d13)

@xingchenxuup xingchenxuup added the x:question 标签: 需要更多信息 label Oct 12, 2021
@xingchenxuup
Copy link
Author

已升级最新版

@xingchenxuup
Copy link
Author

public void execute(Contact sender, Contact receiver, String content) {
    Image image = receiver.uploadImage(Objects.requireNonNull(ImageUtils.initImage(new File("menu.png"))));
    receiver.sendMessage(image);
}

@xingchenxuup
Copy link
Author

public static ExternalResource initImage(File file) {
    try {
        return ExternalResource.create(file);
    } catch (Exception e) {
        return null;
    }
}

@Karlatemp
Copy link
Member

version

@Karlatemp
Copy link
Member

发不出去指什么

@Karlatemp Karlatemp added the z:wait-for-reply 状态: 等待回复 label Oct 12, 2021
@xingchenxuup
Copy link
Author

发不出去指什么

就是群聊收不到图片消息

@xingchenxuup
Copy link
Author

version

2.7.1
2.8.0-M1都试过了
目前版本是2.7.1

@Karlatemp
Copy link
Member

尝试挂几天后重试,另请确认是否只有特定群聊账号出现此问题

@Pika-Lee
Copy link

尝试挂几天后重试,另请确认是否只有特定群聊账号出现此问题

同遇到该问题,而且挂了几天后依然存在。我尝试删除根目录/bot里的device.json,重新加载mirai并生成新的json,群聊可以短暂恢复显示,但没过多久又被屏蔽了。私聊正常。

@Pika-Lee
Copy link

我用手机QQ或者PC QQ都可以,只有mirai不行,版本2.7.1

@xingchenxuup
Copy link
Author

尝试挂几天后重试,另请确认是否只有特定群聊账号出现此问题

还是不行

@Pika-Lee
Copy link

QQ截图20211027163639

每次启动mirai后有这个报错,不知道是不是和这个有关?

@MDeath
Copy link

MDeath commented Nov 2, 2021

这个报错是没有日志库

@xingchenxuup
Copy link
Author

用最新的2.7.1版本已经解决了图片发送的问题

@xingchenxuup
Copy link
Author

这个报错是没有日志库

服务器IP好像被风控了怎么办,本地调试可以发,服务器上不行

@MDeath
Copy link

MDeath commented Nov 2, 2021

你把本地device.json替换掉服务器上的试试

@MDeath
Copy link

MDeath commented Nov 2, 2021

里面是设备信息

@xingchenxuup
Copy link
Author

你把本地device.json替换掉服务器上的试试

搞定了,谢谢大佬

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
x:question 标签: 需要更多信息 z:wait-for-reply 状态: 等待回复
Projects
None yet
Development

No branches or pull requests

4 participants