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] The callback does not take effect #2555

Closed
qihaoyang opened this issue Aug 26, 2024 · 8 comments
Closed

[BUG] The callback does not take effect #2555

qihaoyang opened this issue Aug 26, 2024 · 8 comments
Assignees
Labels
bug Categorizes issue or PR as related to a bug.

Comments

@qihaoyang
Copy link

OpenIM Server Version

openim/openim-server:release-v3.8

Operating System and CPU Architecture

Linux (AMD)

Deployment Method

Docker Deployment

Bug Description and Steps to Reproduce

docker环境安装,webhook.yml 如下

`url: "http://10.10.40.205:9503/openImCallback"
beforeSendSingleMsg:
enable: true
timeout: 5
failedContinue: true
beforeUpdateUserInfoEx:
enable: false
timeout: 5
failedContinue: true
afterUpdateUserInfoEx:
enable: false
timeout: 5
afterSendSingleMsg:
enable: true
timeout: 5

Only the senID/recvID specified in attentionIds will send the callback

if not set, all user messages will be callback

attentionIds: []
beforeSendGroupMsg:
enable: true
timeout: 5
failedContinue: true
beforeMsgModify:
enable: false
timeout: 5
failedContinue: true
afterSendGroupMsg:
enable: false
timeout: 5
afterUserOnline:
enable: false
timeout: 5
afterUserOffline:
enable: false
timeout: 5
afterUserKickOff:
enable: false
timeout: 5
beforeOfflinePush:
enable: false
timeout: 5
failedContinue: true
beforeOnlinePush:
enable: false
timeout: 5
failedContinue: true
beforeGroupOnlinePush:
enable: false
timeout: 5
failedContinue: true
beforeAddFriend:
enable: true
timeout: 5
failedContinue: true
beforeUpdateUserInfo:
enable: false
timeout: 5
failedContinue: true
afterUpdateUserInfo:
enable: false
timeout: 5
beforeCreateGroup:
enable: false
timeout: 5
failedContinue: true
afterCreateGroup:
enable: false
timeout: 5
beforeMemberJoinGroup:
enable: false
timeout: 5
failedContinue: true
beforeSetGroupMemberInfo:
enable: false
timeout: 5
failedContinue: true
afterSetGroupMemberInfo:
enable: false
timeout: 5
afterQuitGroup:
enable: false
timeout: 5
afterKickGroupMember:
enable: false
timeout: 5
afterDismissGroup:
enable: false
timeout: 5
beforeApplyJoinGroup:
enable: false
timeout: 5
failedContinue: true
afterGroupMsgRead:
enable: false
timeout: 5
afterSingleMsgRead:
enable: false
timeout: 5
beforeUserRegister:
enable: false
timeout: 5
failedContinue: true
afterUserRegister:
enable: false
timeout: 5
afterTransferGroupOwner:
enable: false
timeout: 5
beforeSetFriendRemark:
enable: false
timeout: 5
failedContinue: true
afterSetFriendRemark:
enable: false
timeout: 5
afterGroupMsgRevoke:
enable: false
timeout: 5
afterJoinGroup:
enable: false
timeout: 5
beforeInviteUserToGroup:
enable: false
timeout: 5
failedContinue: true
afterSetGroupInfo:
enable: false
timeout: 5
beforeSetGroupInfo:
enable: false
timeout: 5
failedContinue: true
afterRevokeMsg:
enable: false
timeout: 5
beforeAddBlack:
enable: false
timeout: 5
failedContinue:
afterAddFriend:
enable: false
timeout: 5
beforeAddFriendAgree:
enable: false
timeout: 5
failedContinue: true
afterDeleteFriend:
enable: false
timeout: 5
beforeImportFriends:
enable: false
timeout: 5
failedContinue: true
afterImportFriends:
enable: false
timeout: 5
afterRemoveBlack:
enable: false
timeout: 5
`

重启open-server后,执行相关事件,并不会触发回调,回调接口是通的,但是没有收到回调请求信息

openserver 日志如下
{"platform": "Web", "connID": "d9e6a7d57ff4822bf55d2688accf541b", "operationID": "b6a2da44-a281-423d-bd94-09b4622493f7", "opUserID": "4286288539", "conversationID": "n_11111113_4286288539", "seq": "conversationID:\"n_11111113_4286288539\" num:1", "error": "mongo: no documents in result"} 2024-08-24 07:07:11.448 WARN [PID:2216] openim-rpc-msg [version:3.8.0] [msg/sync_msg.go:67] GetMsgBySeqs error {"platform": "Web", "connID": "d9e6a7d57ff4822bf55d2688accf541b", "operationID": "b6a2da44-a281-423d-bd94-09b4622493f7", "opUserID": "4286288539", "conversationID": "n_4286288539_6096754130", "seq": "conversationID:\"n_4286288539_6096754130\" num:1", "error": "mongo: no documents in result"} 2024-08-24 07:07:15.838 WARN [PID:2184] openim-push [version:3.8.0] [push/push_handler.go:167] offlinePushMsg failed {"platform": "Web", "connID": "d9e6a7d57ff4822bf55d2688accf541b", "operationID": "b39c5235-1e07-458c-94fe-ddc6d406b35a", "opUserID": "4286288539", "offlinePUshUserID": "[6360833522]", "msg": "sendID:\"4286288539\" recvID:\"6360833522\" clientMsgID:\"10972f2917c2d97105f2437008a5cf20\" serverMsgID:\"24918d341ef1284b0c3f5fc1c2aca710\" senderPlatformID:5 senderNickname:\"hyqi\" sessionType:1 msgFrom:100 contentType:101 content:\"{\\\"content\\\":\\\"111222222\\\"}\" seq:3 sendTime:1724483235655 createTime:1724483235628 status:1 offlinePushInfo:{title:\"你有一条新消息\" iOSPushSound:\"+1\" iOSBadgeCount:true} attachedInfo:\"null\"", "error": "code 20001, msg appid is invalid"} 2024-08-24 07:07:54.725 WARN [PID:2123] openim-rpc-friend [version:3.8.0] [mw/rpc_server_interceptor.go:97] rpc server resp WithDetails error {"platform": "Web", "operationID": "1646445464564", "opUserID": "imAdmin", "funcName": "/openim.relation.friend/ApplyToAddFriend", "error": "Error: already friends has f: 1304 RelationshipAlreadyError | Error trace: 1 (/go/pkg/mod/google.golang.org/[email protected]/server.go:1027) -> handleStream (/go/pkg/mod/google.golang.org/[email protected]/server.go:1797) -> processUnaryRPC (/go/pkg/mod/google.golang.org/[email protected]/server.go:1386) -> _Friend_ApplyToAddFriend_Handler (/go/pkg/mod/github.com/openimsdk/[email protected]/relation/relation.pb.go:4773) -> func1 (/go/pkg/mod/google.golang.org/[email protected]/server.go:1194) -> 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:1203) -> func7 (/openim-server/pkg/common/startrpc/start.go:199) -> func1 (/go/pkg/mod/github.com/openimsdk/[email protected]/relation/relation.pb.go:4771) -> ApplyToAddFriend (/openim-server/internal/rpc/relation/friend.go:150) -> WrapMsg (/go/pkg/mod/github.com/openimsdk/[email protected]/errs/coderr.go:78) -> WrapMsg (/go/pkg/mod/github.com/openimsdk/[email protected]/errs/coderr.go:134)"} 2024-08-24 07:07:54.725 WARN [PID:2123] openim-rpc-friend [version:3.8.0] [mw/rpc_server_interceptor.go:116] RPC Server Response Error - ApplyToAddFriend {"platform": "Web", "operationID": "1646445464564", "opUserID": "imAdmin", "funcName": "/openim.relation.friend/ApplyToAddFriend", "req": "fromUserID:\"4286288539\" toUserID:\"6360833522\" reqMsg:\"hello!\"", "err": "<nil>", "error": "rpc error: code = Code(1304) desc = already friends has f: 1304 RelationshipAlreadyError"} 2024-08-24 07:07:54.725 ERROR [PID:2127] openim-api [version:3.8.0] [mw/rpc_client_interceptor.go:50] RPC Client Response Error - applyToAddFriend {"platform": "Web", "operationID": "1646445464564", "opUserID": "imAdmin", "funcName": "/openim.relation.friend/applyToAddFriend", "error": "rpc error: code = Code(1304) desc = already friends has f: 1304 RelationshipAlreadyError"} 2024-08-24 07:10:37.948 WARN [PID:2125] openim-msggateway [version:3.8.0] [msggateway/client.go:140] readMessage {"remoteAddr": "172.18.0.1:50128", "platform": "Web", "connID": "d9e6a7d57ff4822bf55d2688accf541b", "operationID": "1724483233338622782", "opUserID": "4286288539", "messageType": "-1", "error": "websocket: close 1006 (abnormal closure): unexpected EOF"}

Screenshots Link

image

@qihaoyang qihaoyang added the bug Categorizes issue or PR as related to a bug. label Aug 26, 2024
@OpenIM-Robot OpenIM-Robot changed the title [BUG] 回调不生效 [BUG] The callback does not take effect Aug 26, 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.

@liony823
Copy link

same issues

@ciooool
Copy link

ciooool commented Sep 13, 2024

遇到相同情况了,配置了环境变量同样不生效

@OpenIM-Robot
Copy link

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


Encountered the same situation, and the environment variables configured also did not take effect.

@Kolo7
Copy link

Kolo7 commented Sep 19, 2024

我在3.7版本遇到相同的问题

@OpenIM-Robot
Copy link

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


I have the same problem in version 3.7

@icey-yu
Copy link
Member

icey-yu commented Oct 8, 2024

In our testing, the webhook is functioning correctly. The above log indicates that both parties were already friends when the friend request was sent, causing the request to fail.

@skiffer-git
Copy link
Member

The latest version doesn't have this issue. Please go ahead and use it.

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

7 participants