barryvdh / laravel-snappy

Laravel Snappy PDF
MIT License
2.63k stars 290 forks source link

Error: Failed to load http://www.google.com/, with network status code 3 and http status code 0 - Host www.google.com not found Error #442

Closed raul-mg closed 2 years ago

raul-mg commented 3 years ago

Binaries installed and test from console ---- check Laravel 8 with barryvdh/laravel-snappy installed ---- check try this example:

Route::get('/test', function () { return PDF::loadFile("http://www.google.com")->inline('test.pdf'); });

not working, this is laravel log lines:

2021-07-10 02:42:13] local.ERROR: The exit status code '1' says something went wrong: stderr: "Loading pages (1/6) [> ] 0% [======> ] 10% Error: Failed to load http://www.google.com/, with network status code 3 and http status code 0 - Host www.google.com not found Error: Failed loading page http://www.google.com (sometimes it will work just to ignore this error with --load-error-handling ignore) Exit with code 1 due to network error: HostNotFoundError " stdout: "" command: D:\wkhtmltopdf\bin\wkhtmltopdf --lowquality --orientation "landscape" --encoding "UTF-8" --enable-local-file-access "http://www.google.com" "d:\Users\raul\AppData\Local\Temp\knp_snappy60e90904d8a707.05853766.pdf". {"userId":1,"exception":"[object] (RuntimeException(code: 1): The exit status code '1' says something went wrong: stderr: \"Loading pages (1/6) [> ] 0% [======> ] 10% Error: Failed to load http://www.google.com/, with network status code 3 and http status code 0 - Host www.google.com not found Error: Failed loading page http://www.google.com (sometimes it will work just to ignore this error with --load-error-handling ignore) Exit with code 1 due to network error: HostNotFoundError \" stdout: \"\" command: D:\wkhtmltopdf\bin\wkhtmltopdf --lowquality --orientation \"landscape\" --encoding \"UTF-8\" --enable-local-file-access \"http://www.google.com\" \"d:\Users\ aul\AppData\Local\Temp\knp_snappy60e90904d8a707.05853766.pdf\". at D:\Workspace\Clientes\Tribunal\proyectos\cedulasestadisticas\cedulas\vendor\knplabs\knp-snappy\src\Knp\Snappy\AbstractGenerator.php:381) [stacktrace]

I test from console and binary its working fine

manggaraaaa commented 3 years ago

same problem..

TidianeRolland commented 3 years ago

I have the same problem

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Any issues with PDF rendering itself that are not directly related to this package, should be reported on https://github.com/KnpLabs/snappy instead. When having doubts, please try to reproduce the issue with just snappy. If you believe this is an actual issue with the latest version of laravel-snappy, please reply to this issue so we can investigate further. Thank you for your contribution! Apologies for any delayed response on our side.