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] LobeChat 配置 Casdoor_Webhook 无响应 #5836

Open
Matinal111 opened this issue Feb 7, 2025 · 19 comments
Open

[Bug] LobeChat 配置 Casdoor_Webhook 无响应 #5836

Matinal111 opened this issue Feb 7, 2025 · 19 comments
Labels
🐛 Bug Something isn't working | 缺陷

Comments

@Matinal111
Copy link

📦 Environment

Docker

📌 Version

v1.51.3

💻 Operating System

Windows

🌐 Browser

Chrome, Edge

🐛 Bug Description

根据 #3942 PR 的步骤配置了 Webhook,不过好像并不起作用,casdoor-secret 值与 LobeChat 环境变量 CASDOOR_WEBHOOK_SECRET 确定是一致的

Image

📷 Recurrence Steps

No response

🚦 Expected Behavior

No response

📝 Additional Information

No response

@Matinal111 Matinal111 added the 🐛 Bug Something isn't working | 缺陷 label Feb 7, 2025
@github-project-automation github-project-automation bot moved this to Roadmap - Chat 1.x in Lobe Chat Routine Feb 7, 2025
@lobehubbot
Copy link
Member

👀 @Matinal111

Thank you for raising an issue. We will investigate into the matter and get back to you as soon as possible.
Please make sure you have given us as much context as possible.
非常感谢您提交 issue。我们会尽快调查此事,并尽快回复您。 请确保您已经提供了尽可能多的背景信息。

Copy link

dosubot bot commented Feb 7, 2025

To troubleshoot the issue with the Casdoor webhook not responding in LobeChat, consider the following steps:

  1. Verify Webhook Configuration: Ensure that the webhook URL, method (POST), and content type (application/json) are correctly configured in Casdoor. Double-check that the URL is accessible from the Casdoor server.

  2. Check Secret Consistency: You've mentioned that the casdoor-secret matches the CASDOOR_WEBHOOK_SECRET in LobeChat. Ensure there are no extra spaces or formatting issues in the secret values.

  3. Network and Firewall Settings: Make sure there are no network or firewall restrictions blocking the webhook requests from Casdoor to LobeChat.

  4. Review Logs for Errors: Check the LobeChat logs for any errors or warnings related to webhook processing. This can provide insights into what might be going wrong.

  5. Payload Format: Ensure that the JSON payload sent by Casdoor matches the expected format by LobeChat. The payload should include an action field and an extendedUser object with the necessary fields [1].

  6. Debugging and Tracing: Utilize LobeChat's tracing capabilities to monitor incoming webhook requests and responses. This can help identify where the process might be failing [2].

If these steps do not resolve the issue, consider reviewing any additional documentation or updates related to the specific version of LobeChat you are using.

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other

@Matinal111
Copy link
Author

@cy948

@lobehubbot
Copy link
Member

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


@sis 48

@Matinal111
Copy link
Author

Matinal111 commented Feb 7, 2025

LobeChat 环境变量

Image

@cy948
Copy link
Contributor

cy948 commented Feb 8, 2025

试试设置secret为只含数字和字母

@lobehubbot
Copy link
Member

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


Try setting secret to contain only numbers and letters

@cy948
Copy link
Contributor

cy948 commented Feb 8, 2025

麻烦提供一下服务端的日志

@lobehubbot
Copy link
Member

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


Please provide the server logs

@Matinal111
Copy link
Author

设置为只含数字和字母的 secret 也不行

Image

@lobehubbot
Copy link
Member

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


Setting to a secret that only contains numbers and letters is not OK

Image

@Matinal111
Copy link
Author

而且 Casdoor_Webhook 里设置的链接响应 405,这个正常的吗

@lobehubbot
Copy link
Member

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


And the link response set in Casdoor_Webhook is 405, is this normal?

@cy948
Copy link
Contributor

cy948 commented Feb 8, 2025

@Matinal111 这个响应不正常,请求没有到 lobe 的容器里。

@lobehubbot
Copy link
Member

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


@Matinal111 This response is not normal and the request is to the lobe container.

@Matinal111
Copy link
Author

那就是 LobeChat 有问题了🤨

@lobehubbot
Copy link
Member

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


That's LobeChat has a problem 🤧

@cy948
Copy link
Contributor

cy948 commented Feb 8, 2025

尝试把lobe-chat-database回滚到 v1.51.1 试试看配置有没有问题? 新版有 variant router ,暂不清楚会不会受影响。

@lobehubbot
Copy link
Member

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


Try rolling back to v1.51.1 and try to see if there is any problem with the configuration? The new version has variant router, and it is not clear whether it will be affected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Bug Something isn't working | 缺陷
Projects
Status: Roadmap - Chat 1.x
Development

No branches or pull requests

3 participants