mirror of
https://github.com/BookStackApp/BookStack.git
synced 2026-02-06 00:59:39 +03:00
[Bug Report]: Failed webhooks (Due to timeout or other) leads to "An Error Occured" #2537
Closed
opened 2026-02-05 04:27:05 +03:00 by OVERLORD
·
18 comments
No Branch/Tag Specified
development
further_theme_development
l10n_development
release
llm_only
vectors
v25-11
docker_env
drawio_rendering
user_permissions
ldap_host_failover
svg_image
prosemirror
captcha_example
fix/video-export
v25.12.3
v25.12.2
v25.12.1
v25.12
v25.11.6
v25.11.5
v25.11.4
v24.11.4
v25.11.3
v25.11.2
v25.11.1
v25.11
v25.07.3
v25.07.2
v25.07.1
v25.07
v25.05.2
v25.05.1
v25.05
v25.02.5
v25.02.4
v25.02.3
v25.02.2
v25.02.1
v25.02
v24.12.1
v24.12
v24.10.3
v24.10.2
v24.10.1
v24.10
v24.05.4
v24.05.3
v24.05.2
v24.05.1
v24.05
v24.02.3
v24.02.2
v24.02.1
v24.02
v23.12.3
v23.12.2
v23.12.1
v23.12
v23.10.4
v23.10.3
v23.10.2
v23.10.1
v23.10
v23.08.3
v23.08.2
v23.08.1
v23.08
v23.06.2
v23.06.1
v23.06
v23.05.2
v23.05.1
v23.05
v23.02.3
v23.02.2
v23.02.1
v23.02
v23.01.1
v23.01
v22.11.1
v22.11
v22.10.2
v22.10.1
v22.10
v22.09.1
v22.09
v22.07.3
v22.07.2
v22.07.1
v22.07
v22.06.2
v22.06.1
v22.06
v22.04.2
v22.04.1
v22.04
v22.03.1
v22.03
v22.02.3
v22.02.2
v22.02.1
v22.02
v21.12.5
v21.12.4
v21.12.3
v21.12.2
v21.12.1
v21.12
v21.11.3
v21.11.2
v21.11.1
v21.11
v21.10.3
v21.10.2
v21.10.1
v21.10
v21.08.6
v21.08.5
v21.08.4
v21.08.3
v21.08.2
v21.08.1
v21.08
v21.05.4
v21.05.3
v21.05.2
v21.05.1
v21.05
v21.04.6
v21.04.5
v21.04.4
v21.04.3
v21.04.2
v21.04.1
v21.04
v0.31.8
v0.31.7
v0.31.6
v0.31.5
v0.31.4
v0.31.3
v0.31.2
v0.31.1
v0.31.0
v0.30.7
v0.30.6
v0.30.5
v0.30.4
v0.30.3
v0.30.2
v0.30.1
v0.30.0
v0.29.3
v0.29.2
v0.29.1
v0.29.0
v0.28.3
v0.28.2
v0.28.1
v0.28.0
v0.27.5
v0.27.4
v0.27.3
v0.27.2
v0.27.1
v0.27
v0.26.4
v0.26.3
v0.26.2
v0.26.1
v0.26.0
v0.25.5
v0.25.4
v0.25.3
v0.25.2
v0.25.1
v0.25.0
v0.24.3
v0.24.2
v0.24.1
v0.24.0
v0.23.2
v0.23.1
v0.23.0
v0.22.0
v0.21.0
v0.20.3
v0.20.2
v0.20.1
v0.20.0
v0.19.0
v0.18.5
v0.18.4
v0.18.3
v0.18.2
v0.18.1
v0.18.0
v0.17.4
v0.17.3
v0.17.2
v0.17.1
v0.17.0
v0.16.3
v0.16.2
v0.16.1
v0.16.0
v0.15.3
v0.15.2
v0.15.1
v0.15.0
v0.14.3
v0.14.2
v0.14.1
v0.14.0
v0.13.1
v0.13.0
v0.12.2
v0.12.1
v0.12.0
v0.11.2
v0.11.1
v0.11.0
v0.10.0
v0.9.3
v0.9.2
v0.9.1
v0.9.0
v0.8.2
v0.8.1
v0.8.0
v0.7.6
v0.7.5
v0.7.4
v0.7.3
0.7.2
v.0.7.1
v0.7.0
v0.6.3
v0.6.2
v0.6.1
v0.6.0
v0.5.0
Labels
Clear labels
🎨 Design
📖 Docs Update
🐛 Bug
🐛 Bug
:cat2:🐈 Possible duplicate
💿 Database
☕ Open to discussion
💻 Front-End
🐕 Support
🚪 Authentication
🌍 Translations
🔌 API Task
🏭 Back-End
⛲ Upstream
🔨 Feature Request
🛠️ Enhancement
🛠️ Enhancement
🛠️ Enhancement
❤️ Happy feedback
🔒 Security
🔍 Pending Validation
💆 UX
📝 WYSIWYG Editor
🌔 Out of scope
🔩 API Request
:octocat: Admin/Meta
🖌️ View Customization
❓ Question
🚀 Priority
🛡️ Blocked
🚚 Export System
♿ A11y
🔧 Maintenance
> Markdown Editor
pull-request
Mirrored from GitHub Pull Request
No Label
🐛 Bug
Milestone
No items
No Milestone
Projects
Clear projects
No project
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: starred/BookStack#2537
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @rusty1281 on GitHub (Dec 26, 2021).
Describe the Bug
Looks like I have an issue with this on one of my docker instances (both using the same docker image).
One instance works just fine, and the other that is running via a reverse proxy does not. The RP instance runs great until I set up webhook. So it all works, creating, deleting, commenting, the works. But as soon as I activate a webook (regardless of what events), all other operations are complete but with an error.
So for example, create a new page, hit save and I get an internal error. The upside is that the new page does get created, same as any other operation (delete, move, comment) but all happen after the internal error.
As soon as I delete or disable the webhook, without even restarting the container, it all starts to work normally.
On my other, internal (non-RP) instance, it all works fine regardless of how many events or webooks I have active.
Has anyone had a chance to get the same or similar experience?
UPDATE: I have also tested this in a completely new docker instance with a fresh, empty DB, the same problem happens.
Steps to Reproduce
Activating a webhook will result in an "An error has occurred" message for any common tasks like create, update, delete or comment, etc.
Expected Behaviour
Common operations to complete without any error and webhook payload to be passed to the destination platform
Screenshots or Additional Context
Exact BookStack Version
v21.12
PHP Version
No response
Hosting Environment
Running in Docker using the current linuxserver image
@geoffreyjt commented on GitHub (Dec 27, 2021):
Hello, I have the same issues, did you find something about fix ? Thanks in advance
@rusty1281 commented on GitHub (Dec 27, 2021):
Nothing yet. Waiting for the response from DEV side on the matter.
@ssddanbrown commented on GitHub (Dec 27, 2021):
Hi @rusty1281 @geoffreyjt ,
I've just updated and tested in one of my own linuxserver.io instances.
All seems to work fine there so don't think it's down to the container image itself or usage within a container.
When you get that kind of error view, the error should be logged to the application log.
This should be at
www/laravel.logwithin the folder where you have mounted the/configvolume to.Can you check in there, find the error logged when the above appears, then report back?
@rusty1281 commented on GitHub (Dec 27, 2021):
Hello @ssddanbrown!
this is the log entry that I get after I configure and save the webhook
This is what happens after webhooks should be initiated but it fails:
The error does happen about 3 sec after the action is initiated. Visiting the site from the log, I get this.
Regards!
@ssddanbrown commented on GitHub (Dec 27, 2021):
@rusty1281 Thanks for providing.
Webhook request errors are supposed to be caught and reported to the log (In a simpler format at least) without causing error but looks like something is not handling errors as I originally expected. Will look to update that to prevent failures causing such error views.
In your case the request is hitting a timeout (It's hardcoded at 3s). Based on it saying "resolving timeout" I'm assuming this is a failure to resolve the webhook host/IP entirely. This could be down to networking at any point from PHP within the container making the curl request, up to the webhook host.
Can the URL be reached from within the container? Could test via:
@rusty1281 commented on GitHub (Dec 27, 2021):
Yes, it can, works fine.
@ssddanbrown commented on GitHub (Dec 27, 2021):
@rusty1281 Hmmm 🤔 Does the curl return instantly? Within 3 seconds or does it take a little while?
@rusty1281 commented on GitHub (Dec 27, 2021):
about 4.5 seconds
update: on the instance that is not running behind a reverse proxy it is instant, but that instance is also not on the same docker host as the one that is behind reverse proxy
@ssddanbrown commented on GitHub (Dec 27, 2021):
Okay, might be legitimately hitting our 3s timeout then, might need to make that configurable.
To be honest, I'm not sure if the reverse proxy should affect things. These webhook requests would typically be direct to the network from the BookStack container, rather than via proxy. A different host/network/dns-resolution/outbound-proxy could affect things for sure.
@rusty1281 commented on GitHub (Dec 27, 2021):
I have configured the reverse proxy instance to use the non-FQDN name for the webhook (considering that source and destination are both in the same network), and it works just fine now.
This is an acceptable solution for me, so we can consider this matter closed imho.
@ssddanbrown thank you for your time and effort on this matter as well as on the whole Bookstack platform.
Regards!
@ssddanbrown commented on GitHub (Dec 27, 2021):
@rusty1281 Glad I could help you to a solution.
Instead of closing this I'll update the title to focus it on preventing an error in such similar webhook request failure scenarios, for easier debugging and non-interruption of normal use.
@rusty1281 commented on GitHub (Dec 27, 2021):
Thank you again. Send some $$ for your troubles.
@southeasterntech commented on GitHub (Dec 27, 2021):
I believe I'm getting a similar error after upgrading to 21.12, with no webhooks enabled.
"So for example, create a new page, hit save and I get an internal error. The upside is that the new page does get created, same as any other operation (delete, move, comment) but all happen after the internal error."
This is what I'm getting on our own self-hosted server on our LAN running Ubuntu 20.04
@ssddanbrown commented on GitHub (Dec 27, 2021):
@southeasterntech This sounds like a separate issue. I'd guess the database migrations were not ran or failed during the upgrade process. It would be best to open a new issue report with any detail from your BookStack log provided.
@southeasterntech commented on GitHub (Dec 27, 2021):
OK! I'll make a new thread! thanks Dan
@ssddanbrown commented on GitHub (Jan 3, 2022):
I've now made a series of updates to webhooks, with this issue thread in mind, which will be part of the next patch release (v21.12.1):
Since the above should greatly cover the troubles experienced here I'll close this off.
@chrisbehectik commented on GitHub (Mar 12, 2024):
I think I have a similiar issue.
I'm trying to set-up a Discord webhook but any time an event is triggered I get "Response status from endpoint was 400"
I can curl in both db and app container giving me the following.
image: lscr.io/linuxserver/bookstack
image: lscr.io/linuxserver/mariadb
Logs give me:
Not sure what the issue is exactly. Any help would be appreciated.
Note: Replaced end of endpoint URL for anonimity.
@ssddanbrown commented on GitHub (Mar 12, 2024):
@chrisbehectik Try adding
/slackto the end of the URL. I demo webhooks, including usage with discord, in my video here: https://www.youtube.com/watch?v=_zIp1ruGpoIIf you need further help, please open a new support thread.