-
Notifications
You must be signed in to change notification settings - Fork 255
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
The Message records byte[] messy code Error decode! #1416
Comments
It should not be the problem of the RPC service because if the RPC service encodes or decodes client messages incorrectly, turms clients will not have the chance to receive the responses and notifications. I added some system tests about sending and receiving message records on my local computer, and all tests passed. So I cannot reproduce the problems. If you still encounter the problem, you can debug your clients and Turms servers yourself (that's why Turms is open-source). |
Thanks for reporting and helping to pinpoint the bug. I will @you once published. |
@zhaieryuan The bug has been fixed. The root cause is the bytes parameters of turms requests may be recycled while the server handler is handling the request. For details, please check the commit: 296afae |
我这边在message 消息中存储了二进制的json文本,当我去前台 queryMessage的时候,获取records 二进制数据进行,前端适配转换,出现了乱码,使用官网的develop分支进行的测试。而且这个问题是偶现的,怀疑是处理 rpc service中哪里使用了buffer 导致
![image](https://private-user-images.githubusercontent.com/127175435/313212706-1b151854-0814-4d46-b714-aab99e54144b.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTk3MDMwOTIsIm5iZiI6MTcxOTcwMjc5MiwicGF0aCI6Ii8xMjcxNzU0MzUvMzEzMjEyNzA2LTFiMTUxODU0LTA4MTQtNGQ0Ni1iNzE0LWFhYjk5ZTU0MTQ0Yi5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwNjI5JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDYyOVQyMzEzMTJaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT01ZGIwNmY0OGZjYjYxOGM5YmU0NGY5YzQwYmY1M2UwMTBlZjBlNDk3NmNlNDFkMDk0YjdlZjNhY2ExYWVlM2Q0JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.aI22hgodx12Vqb3NwghousvtqjqUvBsjkxZAmBNVq94)
客户端调用代码:
clientUserTwo.messageService.queryMessages({
ids: [3116933066495946752],
areGroupMessages: false,
areSystemMessages: false
}).then(res =>{
console.log("****************************************************************************");
// console.log(res);
message 格式如下:
{
"isGroupMessage": false,
"isSystemMessage": false,
"text": "message00000001",
"recordBizStr": [
"{"type":1,"description":{"url":"[https://www.baidu.cn/tmp/im/1dc47ac1f206edd66ef89446761d8f82.jpeg](https://www.baidu.cn/tmp/im/1dc47ac1f206edd66ef89446761d8f82.jpeg/)","size":47719,"mimeType":"image/jpeg"}}"
],
"senderId": 10000,
"senderName": "senderName_25d652a4664e",
"targetId": 8453652352380108800
}
麻烦帮忙看下,感谢。
The text was updated successfully, but these errors were encountered: