Laravel snappy returning Failed to load about:blank, with network status code 301 and http status code 0 - Protocol "about" is unknown Error
Asked Answered
B

1

8

I am using laravel snappy based on wkhtmltopdf, everything was ok, but now on server and local I am getting this error:

Failed to load about:blank, with network status code 301 and http status code 0 - Protocol "about" is unknown Error. And

Blocked access to file /var/www/app/public/css/app.css

And no image is rendered in pdf.

This is so strange and discouraging to always being debugging snappy. I do not understand the issue and do not know how to fix it. anyone can help me please? thanks

Bookseller answered 27/7, 2020 at 16:45 Comment(4)
Did you find a solution?Towpath
@Towpath , please try this ->setOption('enable-local-file-access', true) . If it works, let me know I will answer my question with this. thanksBookseller
@Bookseller Thank you so much, you saved me :)))))))Back
@Towpath setOption('enable-local-file-access', true) worked for me. Thanks!Warta
B
18

With Laravel Snappy, you need to use this option

enable-local-file-access

like this :

->setOption('enable-local-file-access', true)

I also discover this link after : wkhtmltopdf, 0.12.6, Warning: Blocked access to file. It will help too.

Bookseller answered 10/11, 2020 at 8:59 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.