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

When I send a message using the sendMessageNotOss function, I get the error message "10002 unexpected end of JSON input." #2651

Open
ttyob opened this issue Sep 23, 2024 · 4 comments
Assignees
Labels
bug Categorizes issue or PR as related to a bug.

Comments

@ttyob
Copy link

ttyob commented Sep 23, 2024

OpenIM Server Version

3.8.0

Operating System and CPU Architecture

Linux (AMD)

Deployment Method

Source Code Deployment

Bug Description and Steps to Reproduce

IOS客户端创建createImageMessageByURL图片消息,通过sendMessageNotOss发送消息,报错10002 unexpected end of JSON input,服务器没有日志信息
安卓测试正常

IOS客户端sdk版本:3.8.0

Screenshots Link

No response

@ttyob ttyob added the bug Categorizes issue or PR as related to a bug. label Sep 23, 2024
@OpenIM-Robot OpenIM-Robot changed the title [BUG] [BUG] Sep 23, 2024
@OpenIM-Robot
Copy link

Hello! Thank you for filing an issue.

If this is a bug report, please include relevant logs to help us debug the problem.

Join slack 🤖 to connect and communicate with our developers.

@ttyob ttyob changed the title [BUG] 通过sendMessageNotOss发送消息,报错10002 unexpected end of JSON input Sep 23, 2024
@FGadvancer
Copy link
Member

You need to check whether the result of createXXX is an empty string. If it is, make sure to fetch your own user information once after logging in, before createXXX.

@ttyob
Copy link
Author

ttyob commented Sep 26, 2024

You need to check whether the result of createXXX is an empty string. If it is, make sure to fetch your own user information once after logging in, before createXXX.

The returned data is normal, and Android can send it normally

{ "clientMsgID": "961296690b591a4a6e489b0f392948e9", "createTime": 1726817296151, "sendTime": 1726817296151, "sessionType": 0, "sendID": "1801542", "msgFrom": 100, "contentType": 102, "senderPlatformID": 1, "senderNickname": "遗世独立", "senderFaceUrl": "https://xxx.com/static_data/uploaddata/avatar/1/1801542.gif?_t=1683340236", "seq": 0, "isRead": false, "status": 1, "pictureElem": { "sourcePicture": { "uuid": "161a89049113f1bccad75c05aa9409", "type": "image/jpg", "size": 168453, "width": 3000, "height": 3000, "url": "https://xxx.com/static_data/uploaddata/im_file/20240920/82ff1402e0119f4a82a4a43c56efb815.jpg" }, "bigPicture": { "uuid": "161a89049113f1bccad75c05aa9409", "type": "image/jpg", "size": 168453, "width": 3000, "height": 3000, "url": "https://xxx.com/static_data/uploaddata/im_file/20240920/82ff1402e0119f4a82a4a43c56efb815.jpg" }, "snapshotPicture": { "uuid": "161a89049113f1bccad75c05aa9409", "type": "image/jpg", "size": 168453, "width": 3000, "height": 3000, "url": "https://xxx.com/static_data/uploaddata/im_file/20240920/82ff1402e0119f4a82a4a43c56efb815.jpg" } } }

@skiffer-git skiffer-git changed the title 通过sendMessageNotOss发送消息,报错10002 unexpected end of JSON input When I send a message using the sendMessageNotOss function, I get the error message "10002 unexpected end of JSON input." Sep 27, 2024
@skiffer-git
Copy link
Member

You need to check whether the result of createXXX is an empty string. If it is, make sure to fetch your own user information once after logging in, before createXXX.

Should we optimize this so that if the user information is empty, the SDK retrieves it internally?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

No branches or pull requests

4 participants