Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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

like image 916
Cutis Avatar asked Jul 27 '20 16:07

Cutis


1 Answers

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.

like image 52
Cutis Avatar answered Oct 08 '22 16:10

Cutis