BookStackApp / BookStack

A platform to create documentation/wiki content built with PHP & Laravel
https://www.bookstackapp.com/
MIT License
15.43k stars 1.94k forks source link

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

Closed aibaron closed 4 weeks ago

aibaron commented 4 weeks ago

Attempted Debugging

Searched GitHub Issues

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

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

virtadpt commented 4 weeks ago

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.

aibaron commented 4 weeks ago

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

virtadpt commented 4 weeks ago

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

ssddanbrown commented 4 weeks ago

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

aibaron commented 4 weeks ago

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.

ssddanbrown commented 4 weeks ago

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://.

aibaron commented 4 weeks ago

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