-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error when iterating orcgen.ConvertWebpage (panic: navigation failed: net::ERR_CONNECTION_REFUSED) #8
Comments
@magandrez it seems to be a problem with the gorod lib. I'll take a deeper look soon, try to update it, etc. Thanks. |
@magandrez hey, sorry for the delay, I totally forgot your case. Can you test it out? I downgraded go-rod to a version below and now it seems to be working fine. I'll also open an issue in go-rod. |
Here's the issue I submitted to go-rod - go-rod/rod#1123 I hope that the downgrade fix your issues. |
Great!, I'll try with the downgraded version. Thanks for your help! |
It seems the problem is elsewhere. Utilizing the downgraded deps:
The error remains the same:
I will try to do some tests to find out more. |
Yeah, so with your problem, I ended up discovering another one, haha. Maybe you can provide a sample code with a public URL for me because I couldn't simulate your error. Or does it fail for any URLs? I didn't check it out. |
Here a sample code simplified, that makes go-rod fail: https://github.com/magandrez/go-rod-issue |
Hey, sorry for the delay, I've been really busy last few weeks I'll try to fix this soon |
Bro, the problem is in your server implementation. Checking the repo you opened, the server only works in the first time, then it stays loading. I didn't check a solution to update HTML, but I think that you may be able to do it without opening multiple servers. Maybe you can do as following: Add all your HTML files to static, then iterate as following:
|
Hey, any updates? I'm going to close this for now. If there's any issue with the lib, feel free to open it again. Thanks. |
Hi again,
So, I have been back working with this library and after a small refactor where I process a file to generate a PDF, I loop over a list of files on a folder generating HTMLs and from there, the PDF versions of those.
For this, I use
ConvertWebpage
as it is now implemented with the new configuration handler. So what I do is the following:This is call within a loop, where before each call to
RenderCertAsPDF
I serve the content I need to render as PDF like:and immediately after the PDF is rendered, I shutdown the server:
So, the interesting part is, the first file in the loop is processed correctly, an HTML is generated, and a PDF is rendered. As for the second, an HTML is generated, but PDF rendering fails. See below trace:
I have been scratching my head around this and trying different approaches, but end on the same type of error. I did experiment with different ways of shutting down the server, but having come across the same problem, I am failing at debugging the source problem. I am unsure as to how to proceed debugging this issue. Could you give some insight on it? Is this a problem with orcgen not waiting enough time for the browser to request content to the server or is the server not behaving as expected? (I realized orcgen always initializes
rod
with the same idle and timeouts)The text was updated successfully, but these errors were encountered: