Closed Matinal111 closed 1 month ago
👀 @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。我们会尽快调查此事,并尽快回复您。 请确保您已经提供了尽可能多的背景信息。
To troubleshoot the issue with the Casdoor webhook not responding in LobeChat, consider the following steps:
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.
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.
Network and Firewall Settings: Make sure there are no network or firewall restrictions blocking the webhook requests from Casdoor to LobeChat.
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.
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].
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
@cy948
Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑🤝🧑👫🧑🏿🤝🧑🏻👩🏾🤝👨🏿👬🏿
@Sis 48
LobeChat 环境变量
试试设置secret
为只含数字和字母
Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑🤝🧑👫🧑🏿🤝🧑🏻👩🏾🤝👨🏿👬🏿
Try setting
secret
to contain only numbers and letters
麻烦提供一下服务端的日志
Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑🤝🧑👫🧑🏿🤝🧑🏻👩🏾🤝👨🏿👬🏿
Please provide the server logs
设置为只含数字和字母的 secret 也不行
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
而且 Casdoor_Webhook 里设置的链接响应 405,这个正常的吗
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?
@Matinal111 这个响应不正常,请求没有到 lobe 的容器里。
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.
那就是 LobeChat 有问题了🤨
Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑🤝🧑👫🧑🏿🤝🧑🏻👩🏾🤝👨🏿👬🏿
That's LobeChat has a problem 🤧
尝试把lobe-chat-database回滚到 v1.51.1
试试看配置有没有问题? 新版有 variant router ,暂不清楚会不会受影响。
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.
回滚到 v1.51.1 ,清除浏览器缓存啥的还是一样
Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑🤝🧑👫🧑🏿🤝🧑🏻👩🏾🤝👨🏿👬🏿
Roll back to v1.51.1, clear browser cache and other things
然后我再次回滚到相关 PR 发布的 v1.19.12 版本也是一样的情况
Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑🤝🧑👫🧑🏿🤝🧑🏻👩🏾🤝👨🏿👬🏿
Then I rolled back to the v1.19.12 version released by the relevant PR again.
同样的问题,但是我这边是可以成功webhook到lobe-chat容器的。 我这边的问题似乎出在每次casdoor发布的webhook的更新用户名都是casdoor默认用户。lobe-chat容器报错如下: 2025/02/17 12:50AM 40 pid=29 hostname=8256asas3f31 msg=[casdoor]: Webhooks handler user update for "{"avatar":"https://lobe.xxx.com/casdoor/avatar/built-in/admin.jpeg","email":"admin@example.com","fullName":"Admin"}", but no user was found by the providerAccountId.
但是实际上更新用户名的是lobechat中的账户
2025/02/17 01:10AM 40 pid=29 hostname=825asf1a3f31 msg=[casdoor]: Webhooks handler user update for "{"avatar":"https://lobe.example.com/casdoor/avatar/built-in/Pi.jpeg","email":"hen6hg@example.com","fullName":"Snowflake_Pink"}", but no user was found by the providerAccountId. 我多注册了个用于casdoor的同名账号,在同名账号下,同样修改lobechat用户的头像,但是webhook请求更新的账号却是casdoor的同名账号🤔
📦 Environment
Docker
📌 Version
v1.51.3
💻 Operating System
Windows
🌐 Browser
Chrome, Edge
🐛 Bug Description
根据 #3942 PR 的步骤配置了 Webhook,不过好像并不起作用,
casdoor-secret
值与 LobeChat 环境变量CASDOOR_WEBHOOK_SECRET
确定是一致的📷 Recurrence Steps
No response
🚦 Expected Behavior
No response
📝 Additional Information
No response