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

[BUG] REST API /conversation/get_sorted_conversation_list always returns 1004 #2798

Closed
cipchk opened this issue Oct 27, 2024 · 6 comments
Closed
Assignees
Labels
bug Categorizes issue or PR as related to a bug.

Comments

@cipchk
Copy link

cipchk commented Oct 27, 2024

OpenIM Server Version

3.8.1

Operating System and CPU Architecture

Linux (AMD)

Deployment Method

Docker Deployment

Bug Description and Steps to Reproduce

请求 URL https://xxx.com/api/conversation/get_sorted_conversation_list
请求体:

{"userID":"10002","pagination":{"pageNumber":1,"showNumber":50}}

返回:

{"errCode":1004,"errMsg":"1004 mongo find one: mongo: no documents in result mongo find one: mongo: no documents in result","errDlt":"1004 mongo find one: mongo: no documents in result mongo find one: mongo: no documents in result"}

我可以确信 userID 是有会话数据。

Screenshots Link

No response

@cipchk cipchk added the bug Categorizes issue or PR as related to a bug. label Oct 27, 2024
@cipchk
Copy link
Author

cipchk commented Nov 1, 2024

@withchao Any progressing?

@withchao
Copy link
Contributor

withchao commented Nov 8, 2024

You need to provide the log. You can confirm based on the log which rpc reported the error.

@cipchk
Copy link
Author

cipchk commented Nov 10, 2024

@withchao

2024-11-10 17:00:00.830	ERROR	[PID:1657]     	openim-api               	[version:3.8.1]  	[mw/rpc_client_interceptor.go:53]                 	RPC Client Response Error - GetSortedConversationList	{"platform": "Admin", "operationID": "5a5a6e6e-935c-4e61-8292-892f55654c32", "opUserID": "imAdmin", "funcName": "/openim.conversation.conversation/GetSortedConversationList", "error": "rpc error: code = Code(1004) desc = 1004 RecordNotFoundError"}

@withchao
Copy link
Contributor

Complete log query based on operationID

@cipchk
Copy link
Author

cipchk commented Nov 11, 2024

Below are all the related logs I requested for the same operationID:

Request:

QQ_1731309163611

Docker Log:

2024-11-11 07:09:59.623	WARN	[PID:1719]     	openim-rpc-conversation  	[version:3.8.1]  	[mw/rpc_server_interceptor.go:97]                 	rpc server resp WithDetails error                 	{"platform": "Admin", "operationID": "d4e6a68d-b682-4ee6-8a05-4ec097f6ddad", "opUserID": "imAdmin", "funcName": "/openim.conversation.conversation/GetSortedConversationList", "error": "Error: 1004 RecordNotFoundError | Error trace: 1 (/go/pkg/mod/google.golang.org/[email protected]/server.go:1029) -> handleStream (/go/pkg/mod/google.golang.org/[email protected]/server.go:1805) -> processUnaryRPC (/go/pkg/mod/google.golang.org/[email protected]/server.go:1394) -> _Conversation_GetSortedConversationList_Handler (/go/pkg/mod/github.com/openimsdk/[email protected]/conversation/conversation.pb.go:4873) -> func1 (/go/pkg/mod/google.golang.org/[email protected]/server.go:1202) -> RpcServerInterceptor (/go/pkg/mod/github.com/openimsdk/[email protected]/mw/rpc_server_interceptor.go:53) -> func1 (/go/pkg/mod/google.golang.org/[email protected]/server.go:1211) -> func6 (/openim-server/pkg/common/startrpc/start.go:185) -> func1 (/go/pkg/mod/github.com/openimsdk/[email protected]/conversation/conversation.pb.go:4871) -> GetSortedConversationList (/openim-server/internal/rpc/conversation/conversation.go:123) -> Wrap (/go/pkg/mod/github.com/openimsdk/[email protected]/errs/coderr.go:74) -> Wrap (/go/pkg/mod/github.com/openimsdk/[email protected]/errs/coderr.go:126)"}

2024-11-11 07:09:59.623	WARN	[PID:1719]     	openim-rpc-conversation  	[version:3.8.1]  	[mw/rpc_server_interceptor.go:116]                	RPC Server Response Error - GetSortedConversationList	{"platform": "Admin", "operationID": "d4e6a68d-b682-4ee6-8a05-4ec097f6ddad", "opUserID": "imAdmin", "funcName": "/openim.conversation.conversation/GetSortedConversationList", "req": "userID:\"38\"  pagination:{pageNumber:1  showNumber:50}", "err": null, "error": "rpc error: code = Code(1004) desc = 1004 RecordNotFoundError"}

2024-11-11 07:09:59.624	ERROR	[PID:1657]     	openim-api               	[version:3.8.1]  	[mw/rpc_client_interceptor.go:53]                 	RPC Client Response Error - GetSortedConversationList	{"platform": "Admin", "operationID": "d4e6a68d-b682-4ee6-8a05-4ec097f6ddad", "opUserID": "imAdmin", "funcName": "/openim.conversation.conversation/GetSortedConversationList", "error": "rpc error: code = Code(1004) desc = 1004 RecordNotFoundError"}

@withchao
Copy link
Contributor

Parameter error, missing conversationIDs. Example:
{
"userID": "2733681391",
"conversationIDs": [
"sg_2166291437"
],
"pagination": {
"pageNumber": 1,
"showNumber": 50
}
}

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

2 participants