PDF Export is failing after Update #3898

Closed
opened 2026-02-05 07:48:17 +03:00 by OVERLORD · 4 comments
Owner

Originally created by @xKugeki on GitHub (Jul 4, 2023).

Attempted Debugging

  • I have read the debugging page

Searched GitHub Issues

  • I have searched GitHub for the issue.

Describe the Scenario

Hello everyone,

i just updated Bookstack to v.23.06 and now as soon as I try to export to pdf with wkhtmltopdf I get the following error (debug mode):

Error RuntimeException The exit status code '1' says something went wrong: stderr: "Loading pages (1/6) [> ] 0% [======> ] 10% Warning: Blocked access to file [======================> ] 38% Error: Failed to load about:blank, with network status code 301 and http status code 0 - Protocol "about" is unknown [========================> ] 41% [=========================> ] 43% [===========================> ] 45% [============================> ] 47% [=============================> ] 49% [==============================> ] 50% [==============================> ] 51% [============================================================] 100% Counting pages (2/6) [============================================================] Object 1 of 1 Resolving links (4/6) [============================================================] Object 1 of 1 Loading headers and footers (5/6) Printing pages (6/6) [> ] Preparing [===> ] Page 1 of 20 [======> ] Page 2 of 20 [=========> ] Page 3 of 20 [============> ] Page 4 of 20 [===============> ] Page 5 of 20 [==================> ] Page 6 of 20 [=====================> ] Page 7 of 20 [========================> ] Page 8 of 20 [===========================> ] Page 9 of 20 [==============================> ] Page 10 of 20 [=================================> ] Page 11 of 20 [====================================> ] Page 12 of 20 [=======================================> ] Page 13 of 20 [==========================================> ] Page 14 of 20 [=============================================> ] Page 15 of 20 [================================================> ] Page 16 of 20 [===================================================> ] Page 17 of 20 [======================================================> ] Page 18 of 20 [=========================================================> ] Page 19 of 20 [============================================================] Page 20 of 20 Done Exit with code 1 due to network error: ProtocolUnknownError " stdout: "" command: /usr/local/bin/wkhtmltopdf --lowquality --page-size 'A4' --outline --print-media-type '/tmp/knp_snappy64a43237e82ef4.77906981.html' '/tmp/knp_snappy64a43237e88347.92181246.pdf'.

I already tried to reinstall wkhtmltopdf and checked my .env but it seems like it is correct:
.env entry:

'WKHTMLTOPDF=/usr/local/bin/wkhtmltopdf'

This is the location:
image

I hope you can help me :)
Wish you a great day!

~ xKugeki

Exact BookStack Version

v23.06

Log Content

No response

PHP Version

8.2

Hosting Environment

Ubuntu 22.04.2 LTS, Nginx

Originally created by @xKugeki on GitHub (Jul 4, 2023). ### Attempted Debugging - [X] I have read the debugging page ### Searched GitHub Issues - [X] I have searched GitHub for the issue. ### Describe the Scenario Hello everyone, i just updated Bookstack to v.23.06 and now as soon as I try to export to pdf with wkhtmltopdf I get the following error (debug mode): `Error RuntimeException The exit status code '1' says something went wrong: stderr: "Loading pages (1/6) [> ] 0% [======> ] 10% Warning: Blocked access to file [======================> ] 38% Error: Failed to load about:blank, with network status code 301 and http status code 0 - Protocol "about" is unknown [========================> ] 41% [=========================> ] 43% [===========================> ] 45% [============================> ] 47% [=============================> ] 49% [==============================> ] 50% [==============================> ] 51% [============================================================] 100% Counting pages (2/6) [============================================================] Object 1 of 1 Resolving links (4/6) [============================================================] Object 1 of 1 Loading headers and footers (5/6) Printing pages (6/6) [> ] Preparing [===> ] Page 1 of 20 [======> ] Page 2 of 20 [=========> ] Page 3 of 20 [============> ] Page 4 of 20 [===============> ] Page 5 of 20 [==================> ] Page 6 of 20 [=====================> ] Page 7 of 20 [========================> ] Page 8 of 20 [===========================> ] Page 9 of 20 [==============================> ] Page 10 of 20 [=================================> ] Page 11 of 20 [====================================> ] Page 12 of 20 [=======================================> ] Page 13 of 20 [==========================================> ] Page 14 of 20 [=============================================> ] Page 15 of 20 [================================================> ] Page 16 of 20 [===================================================> ] Page 17 of 20 [======================================================> ] Page 18 of 20 [=========================================================> ] Page 19 of 20 [============================================================] Page 20 of 20 Done Exit with code 1 due to network error: ProtocolUnknownError " stdout: "" command: /usr/local/bin/wkhtmltopdf --lowquality --page-size 'A4' --outline --print-media-type '/tmp/knp_snappy64a43237e82ef4.77906981.html' '/tmp/knp_snappy64a43237e88347.92181246.pdf'.` I already tried to reinstall wkhtmltopdf and checked my .env but it seems like it is correct: .env entry: 'WKHTMLTOPDF=/usr/local/bin/wkhtmltopdf' This is the location: ![image](https://github.com/BookStackApp/BookStack/assets/119607113/c72f3806-de65-45f3-981a-b3ac53cbe5e6) I hope you can help me :) Wish you a great day! ~ xKugeki ### Exact BookStack Version v23.06 ### Log Content _No response_ ### PHP Version 8.2 ### Hosting Environment Ubuntu 22.04.2 LTS, Nginx
OVERLORD added the 🐕 Support label 2026-02-05 07:48:17 +03:00
Author
Owner

@ssddanbrown commented on GitHub (Jul 4, 2023):

Hi @xKugeki,

  • Does this occur for all page PDF exports?
  • If you create a fresh book, with a fresh child page, and in that page only write the simple text "hello" with no added formatting, does that page export okay?
@ssddanbrown commented on GitHub (Jul 4, 2023): Hi @xKugeki, - Does this occur for all page PDF exports? - If you create a fresh book, with a fresh child page, and in that page only write the simple text "hello" with no added formatting, does that page export okay?
Author
Owner

@xKugeki commented on GitHub (Jul 4, 2023):

Hi @xKugeki,

  • Does this occur for all page PDF exports?
  • If you create a fresh book, with a fresh child page, and in that page only write the simple text "hello" with no added formatting, does that page export okay?

Hey @ssddanbrown :)

this problem occurs with any page i want to export to pdf.
I created a fresh book, with a new page and without formatting just "hello" , after pressing on "export > to pdf" i get redirected to an error page with "An unknown error occurred"

@xKugeki commented on GitHub (Jul 4, 2023): > Hi @xKugeki, > > * Does this occur for all page PDF exports? > * If you create a fresh book, with a fresh child page, and in that page only write the simple text "hello" with no added formatting, does that page export okay? Hey @ssddanbrown :) this problem occurs with any page i want to export to pdf. I created a fresh book, with a new page and without formatting just "hello" , after pressing on "export > to pdf" i get redirected to an error page with "An unknown error occurred"
Author
Owner

@ssddanbrown commented on GitHub (Jul 4, 2023):

Thanks, Do you have anything set in the "Custom HTML Head Content" customization setting in BookStack?

@ssddanbrown commented on GitHub (Jul 4, 2023): Thanks, Do you have anything set in the "Custom HTML Head Content" customization setting in BookStack?
Author
Owner

@xKugeki commented on GitHub (Jul 5, 2023):

Thanks, Do you have anything set in the "Custom HTML Head Content" customization setting in BookStack?

Hey :)
that solved my problem :D

I had a little HTML / CSS Code for a top bar banner in it but it seems like wkhtmltopdf doesnt liked it tho^^

Thank you very much for your help, I hope you´ll have a great day!

@xKugeki commented on GitHub (Jul 5, 2023): > Thanks, Do you have anything set in the "Custom HTML Head Content" customization setting in BookStack? Hey :) that solved my problem :D I had a little HTML / CSS Code for a top bar banner in it but it seems like wkhtmltopdf doesnt liked it tho^^ Thank you very much for your help, I hope you´ll have a great day!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#3898