Failed to save draft (and can't create/embed diagrams) #5020

Closed
opened 2026-02-05 09:34:10 +03:00 by OVERLORD · 7 comments
Owner

Originally created by @aibaron on GitHub (Oct 23, 2024).

Attempted Debugging

  • I have read the debugging page

Searched GitHub Issues

  • I have searched GitHub for the issue.

Describe the Scenario

Issue

When editing documents, I see this flag at the top right.
image
I'm able to manually save the page/shelf/book though. But when I go to add a diagram, that flag is always present and when I click save, it errors out with the below flag and doesn't add to the document.
image

Hunch

  • I think it has something to do with the Cloudflare tunnel setup, but I'm not sure where else to look.

Troubleshooting steps

I found a related issue reported though that's Windows, and I have already disabled rocket loader as listed in the debugging docs.

Exact BookStack Version

v24.10

Log Content

The log at /var/www/bookstack/storage/logs doesn't show anything. I tried the test email as well which failed and showed in the log. But I'm not sure where to set up the smtp for the email setup and don't need it anyway.

[2024-10-23 11:49:26] production.ERROR: Failed to send user invite with error: connection could not be established with host ' localhost :587": stream-socket-client ( ) : Unable to connect to localhost : 587 (Connection refused)

Hosting Environment

Setup

I just installed Bookstack on a fresh install of Ubuntu 24.04 following the Installation Guide. I'm using the ubuntu-24.04.1-live-server-amd64.iso that I downloaded to my Proxmox server. I'm using a Cloudflare tunnel to get to the host with a domain I have.
Summary

  • Cloudflare tunnel
  • Proxmox Server
  • Ubuntu 24.04 vm
  • Fresh install of ubuntu and BookStack
Originally created by @aibaron on GitHub (Oct 23, 2024). ### Attempted Debugging - [X] I have read the debugging page ### Searched GitHub Issues - [X] I have searched GitHub for the issue. ### Describe the Scenario ## Issue When editing documents, I see this flag at the top right. ![image](https://github.com/user-attachments/assets/f3a7a204-baf4-4e5b-9017-05fd3a9061d7) I'm able to manually save the page/shelf/book though. But when I go to add a diagram, that flag is always present and when I click save, it errors out with the below flag and doesn't add to the document. ![image](https://github.com/user-attachments/assets/346cf7bf-0892-456f-b8c2-ba4e3df6e398) ### Hunch - I think it has something to do with the Cloudflare tunnel setup, but I'm not sure where else to look. ## Troubleshooting steps I found a related [issue reported](https://github.com/BookStackApp/BookStack/issues/2572) though that's Windows, and I have already [disabled rocket loader](https://www.bookstackapp.com/docs/admin/debugging/#dynamic-elements-not-working) as listed in the debugging docs. ### Exact BookStack Version v24.10 ### Log Content The log at /var/www/bookstack/storage/logs doesn't show anything. I tried the test email as well which failed and showed in the log. But I'm not sure where to set up the smtp for the email setup and don't need it anyway. [2024-10-23 11:49:26] production.ERROR: Failed to send user invite with error: connection could not be established with host ' localhost :587": stream-socket-client ( ) : Unable to connect to localhost : 587 (Connection refused) ### Hosting Environment ## Setup I just installed Bookstack on a fresh install of Ubuntu 24.04 following the [Installation Guide](https://www.bookstackapp.com/docs/admin/installation/#ubuntu-2404-installation-script). I'm using the ubuntu-24.04.1-live-server-amd64.iso that I downloaded to my Proxmox server. I'm using a Cloudflare tunnel to get to the host with a domain I have. **Summary** - Cloudflare tunnel - Proxmox Server - Ubuntu 24.04 vm - Fresh install of ubuntu and BookStack
OVERLORD added the 🐕 Support label 2026-02-05 09:34:10 +03:00
Author
Owner

@virtadpt commented on GitHub (Oct 23, 2024):

It's not Cloudflare. I've been seeing this since I started using Bookstack in January (v23.12, I think). It seems to be harmless though I don't know what's causing it.

@virtadpt commented on GitHub (Oct 23, 2024): It's not Cloudflare. I've been seeing this since I started using Bookstack in January (v23.12, I think). It seems to be harmless though I don't know what's causing it.
Author
Owner

@aibaron commented on GitHub (Oct 23, 2024):

@virtadpt But how are you able to add diagrams then? I can't

@aibaron commented on GitHub (Oct 23, 2024): @virtadpt But how are you able to add diagrams then? I can't
Author
Owner

@virtadpt commented on GitHub (Oct 23, 2024):

@aibaron I don't. At least not right now. My use case usually has me pasting images in and not using draw.io.

@virtadpt commented on GitHub (Oct 23, 2024): @aibaron I don't. At least not right now. My use case usually has me pasting images in and not using draw.io.
Author
Owner

@ssddanbrown commented on GitHub (Oct 23, 2024):

@aibaron Can you open the browser development tools (Often F12 or Ctrl+Shift+I) then view the console tab.
With the console tab open, edit a page, then when in the editor, refresh the browser page.
Then share any messages that appear in the console log.

@ssddanbrown commented on GitHub (Oct 23, 2024): @aibaron Can you open the browser development tools (Often `F12` or `Ctrl+Shift+I`) then view the `console` tab. With the console tab open, edit a page, then when in the editor, refresh the browser page. Then share any messages that appear in the console log.
Author
Owner

@aibaron commented on GitHub (Oct 23, 2024):

Thanks in advance Dan, I'll add the info I can, but please let me know if you need more or if I'm doing something incorrectly.

When I open console just on the main site (docs.**MYDOMAIN**.COM), before doing anything, I see an error:

GET        docs.**MYDOMAIN**.com/:489  
https://static.cloudflareinsights.com/beacon.min.js/vcd15cbe7772f49c399c6a5babf22c1241717689176015 net::ERR_BLOCKED_BY_CLIENT`

When I open a BookStack page (not to edit) I see below (censored domain, and these are screenshots now because copying from the console was more difficult than I thought)
image

After saving the diagram:
image

And after waiting about 10 seconds
image

Do you need me to expand any of the mixed content or type errors? I think the type errors are unrelated, but let me know.

@aibaron commented on GitHub (Oct 23, 2024): Thanks in advance Dan, I'll add the info I can, but please let me know if you need more or if I'm doing something incorrectly. When I open console just on the main site (docs.\*\*MYDOMAIN\*\*.COM), before doing anything, I see an error: ``` GET docs.**MYDOMAIN**.com/:489 https://static.cloudflareinsights.com/beacon.min.js/vcd15cbe7772f49c399c6a5babf22c1241717689176015 net::ERR_BLOCKED_BY_CLIENT` ``` When I open a BookStack **page** (not to edit) I see below (censored domain, and these are screenshots now because copying from the console was more difficult than I thought) ![image](https://github.com/user-attachments/assets/f3244c47-417c-45f3-91b6-0f2d6039b697) After saving the diagram: ![image](https://github.com/user-attachments/assets/8648fc0d-95f9-4f95-b968-ea62c84d337f) And after waiting about 10 seconds ![image](https://github.com/user-attachments/assets/865c6d08-a6e4-4d48-93e9-67063650d773) Do you need me to expand any of the mixed content or type errors? I think the type errors are unrelated, but let me know.
Author
Owner

@ssddanbrown commented on GitHub (Oct 24, 2024):

Thanks @aibaron,
I'm assuming you're hosting BookStack on a https:// url?
If so, Open/Edit the /var/www/bookstack/.env file and ensure the APP_URL starts with https:// too instead of http://.

@ssddanbrown commented on GitHub (Oct 24, 2024): Thanks @aibaron, I'm assuming you're hosting BookStack on a `https://` url? If so, Open/Edit the `/var/www/bookstack/.env` file and ensure the `APP_URL` starts with `https://` too instead of `http://`.
Author
Owner

@aibaron commented on GitHub (Oct 24, 2024):

@ssddanbrown

I'm assuming you're hosting BookStack on a https:// url?

Yes.

If so, Open/Edit the /var/www/bookstack/.env file and ensure the APP_URL starts with https:// too instead of http://.

Well, that was easy!

Ok thank you so much! This seems to be working now.
I think I followed the video tutorial too closely and just didn't add any context to the URL.

@aibaron commented on GitHub (Oct 24, 2024): @ssddanbrown > I'm assuming you're hosting BookStack on a https:// url? Yes. > If so, Open/Edit the /var/www/bookstack/.env file and ensure the APP_URL starts with https:// too instead of http://. Well, that was easy! Ok thank you so much! This seems to be working now. I think I followed the video tutorial too closely and just didn't add any context to the URL.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#5020