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

[Other]: The callback operation isn't triggered when using the Docker image. #199

Closed
FeyaM opened this issue Nov 6, 2024 · 6 comments
Closed
Assignees

Comments

@FeyaM
Copy link

FeyaM commented Nov 6, 2024

What would you like to share?

根据官网回调例子在docker-compose.yaml中openim-server.environment添加配置:

      - IMENV_WEBHOOKS_URL=http://*.*.*.*:8000/callbackExample
      - IMENV_WEBHOOKS_AFTERSENDSINGLEMSG_ENABLE=true

后用户对话,openim-server发出警告:

2024-11-06 11:07:22.186 WARN    [PID:1841]      openim-push                     [version:3.8.1]         [push/push_handler.go:178]                              offlinePushMsg failed                                   {"platform": "Web", "connID": "ee422d441c4df70c239c596bc391e8bd", "operationID": "8f04828c-07df-43a9-ba59-5b6571c582b3", "opUserID": "9854857619", "offlinePushUserID": ["6074729403"], "msg": "sendID:\"9854857619\" recvID:\"6074729403\" clientMsgID:\"e076b0b51e0ff49040a0fb1110443ae2\" serverMsgID:\"3314df86c67cdb1e6b776c9ee50f61ea\" senderPlatformID:5 senderNickname:\"test3\" sessionType:1 msgFrom:100 contentType:101 content:\"{\\\"content\\\":\\\"11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111\\\"}\" seq:14 sendTime:1730891241668 createTime:1730891241515 status:1 offlinePushInfo:{title:\"You have a new message.\" iOSPushSound:\"+1\" iOSBadgeCount:true} attachedInfo:\"null\"", "error": "code 20001, msg appid is invalid"}

也并没有调用回调接口

Additional information

No response

@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.

@skiffer-git skiffer-git changed the title [Other]: 使用docker镜像无法触发回调操作 [Other]: The callback operation isn't triggered when using the Docker image. Nov 7, 2024
@skiffer-git
Copy link
Member

log.ZInfo(ctx, "webhook", "url", fullURL, "input", input, "config", timeout)

Check if there are any logs containing "webhook."

@FeyaM
Copy link
Author

FeyaM commented Nov 7, 2024

log.ZInfo(ctx, "webhook", "url", fullURL, "input", input, "config", timeout)

Check if there are any logs containing "webhook."检查是否有任何日志包含 “webhook”。

我使用docker logs -f openim-server查看log没有捕获到关于afterSendSingleMsg的日志

@icey-yu
Copy link
Member

icey-yu commented Nov 8, 2024

In the subsequent version, we have fixed this issue. You can update the openim-server image version to openim/openim-server:3.8.2-alpha.2 to apply the update.

The "offlinePushMsg failed" message indicates that the offline push configuration has not been set up. In future updates, we will disable offline push by default to eliminate this warning.

@FeyaM
Copy link
Author

FeyaM commented Nov 8, 2024

In the subsequent version, we have fixed this issue. You can update the openim-server image version to openim/openim-server:3.8.2-alpha.2 to apply the update.

The "offlinePushMsg failed" message indicates that the offline push configuration has not been set up. In future updates, we will disable offline push by default to eliminate this warning.

使用openim/openim-server:3.8.2-alpha.2镜像修改.env文件为:

OPENIM_SERVER_IMAGE=openim/openim-server:3.8.2-alpha.2

docker-compose.yaml添加openim-server.environment环境变量:

      - IMENV_WEBHOOKS_URL="http://*.*.*.*:8000/callbackExample"
      - IMENV_WEBHOOKS_AFTERSENDSINGLEMSG_ENABLE=true

启动测试,仍然无法触发afterSendSingleMsg回调

@icey-yu
Copy link
Member

icey-yu commented Nov 8, 2024

  1. Add - IMENV_LOG_REMAINLOGLEVEL=6 to openim-server.environment
  2. Restart container.
  3. Send a single message.
  4. Run docker exec -it openim-server /bin/bash
  5. Run cd _output/logs/
  6. Run grep webhook openim-service-log.2024-11-08 | grep url
  7. If there is a result, it means the webhook is working. You can use this step to confirm it again.

@FeyaM FeyaM closed this as completed Nov 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants