Error: Exit with code 1 due to network error: UnknownNetworkError when accessed from hosted site

1,314 views
Skip to first unread message

Mirage

unread,
Sep 22, 2020, 10:06:18 AM9/22/20
to wkhtmltopdf General
As the title says, I am getting an " Exit with code 1 due to network error: UnknownNetworkError"  when  I attempt to print a pdf from my hosted site using the www.webpage.com link. 

If I attempt to print the pdf running from my local machine, or from localhost on the server it works fine. But trying for the live weblink is a no go. I updated to 0.12.6 of wkhtmltopdf, using windows server 2012 and my application is written in c# asp dotnet.

I read a few places where it says it may be unable to access some links, but even if I replace everything in the .cshtml page with a single div tag I get the same errror, yet locally everything works fine.

Appreciate any assistance in handling this error.

LanceP

unread,
Dec 19, 2020, 5:03:58 AM12/19/20
to wkhtmltopdf General
Did you ever get a resolution on this?

I'm facing the exact same issue but on linux.
Have downloaded 0.12.6 also, same problem.



George Reynolds

unread,
Dec 19, 2020, 6:00:26 AM12/19/20
to wkhtmltop...@googlegroups.com
So you're using the wkhtmltopdf to create pdfs from the command line, using your own code, correct. 

Have you tried a non https website ?

Have you got it working with any websites?





--
===================================================
You received this message because you are subscribed to the "wkhtmltopdf General" group.
To post to this group, send email to wkhtmltop...@googlegroups.com
To unsubscribe from this group, send email to wkhtmltopdf-gen...@googlegroups.com
 
For more options, visit this group at
http://groups.google.com/group/wkhtmltopdf-general?hl=en?hl=en
---
You received this message because you are subscribed to the Google Groups "wkhtmltopdf General" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wkhtmltopdf-gen...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/wkhtmltopdf-general/ca16f7a5-a6e4-462f-a25c-e0d982219c59n%40googlegroups.com.

LanceP

unread,
Dec 19, 2020, 9:20:28 AM12/19/20
to wkhtmltopdf General
Running it from the command line to try to figure out the issue.
I will run the command, it will work. 
I will run it again, exact same command, it will fail.

I cannot do non-https, https is forced on.

So I'm guessing more and more that it's related to SSL.

--lance


George Reynolds

unread,
Dec 19, 2020, 10:31:33 AM12/19/20
to wkhtmltop...@googlegroups.com
Try a non https website eg http://info.cern.ch/ is apparently the world's first website and doesn't have https 

I didn't use the wkhtmltopdf tool to retrieve anything personally , I  just ran it in a loop to convert some HTML files to pdf with the python wrapper. I wonder if you can take the http retrieval task away from the tool and run the conversion on temporary files instead? 

I don't of course know what your whole application does but it's a workaround perhaps?



LanceP

unread,
Dec 19, 2020, 10:35:09 AM12/19/20
to wkhtmltopdf General
OK, thanks for the tip.
I had not even considered running the conversion against a local file.
That'll be my next step.

Reply all
Reply to author
Forward
0 new messages