Skip to content
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

Puppeteer has error #90

Open
ABatenev opened this issue May 22, 2024 · 5 comments
Open

Puppeteer has error #90

ABatenev opened this issue May 22, 2024 · 5 comments

Comments

@ABatenev
Copy link

In 50% i have PuppeteerSharp.NavigationException: 'Timeout of 30000 ms exceeded' when call await converter.Convert()

PuppeteerSharp.NavigationException
HResult=0x80131500
Message=Timeout of 30000 ms exceeded
Source=PuppeteerSharp
StackTrace:
at PuppeteerSharp.Cdp.CdpFrame.d__17.MoveNext()
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Markdown2Pdf.Markdown2PdfConverter.<_GeneratePdfAsync>d__50.MoveNext()
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Markdown2Pdf.Markdown2PdfConverter.<_ConvertInternal>d__47.MoveNext()
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Markdown2Pdf.Markdown2PdfConverter.<_Convert>d__46.MoveNext()
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Markdown2Pdf.Markdown2PdfConverter.d__43.MoveNext()
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()

This exception was originally thrown at this call stack:
[External Code]

Inner Exception 1:
TimeoutException: Timeout of 30000 ms exceeded

@Flayms
Copy link
Owner

Flayms commented May 22, 2024

Interesting, is it related to a new version?
And are you using very big markdown files? It might be Highlight.js taking too long, hitting the default timeouts from Puppeteer
Edit: A timeout of 30 seconds is definitely too long

@ABatenev
Copy link
Author

I use the same md file, but in half of the cases the timeout causes an error, in the other it does not. This happens even for a single-line md file. Floating bug, I can't figure out why it's happening

@ABatenev
Copy link
Author

Perhaps I have found a solution to this problem. On my VM, Chrome.exe does not close after an error, causing subsequent runs without closing the process to return a timeout error. Maybe you should add browser.Process.Close(); in the catch block when chrome starts?
hardkoded/puppeteer-sharp#2393
image

@Flayms
Copy link
Owner

Flayms commented May 24, 2024

Using browser.Process.Close(); is keeping the Process stuck for me. In #90 I changed to await using for the browser and page. Can you check if this resolves the issue?

@INOPIAE
Copy link
Contributor

INOPIAE commented Sep 12, 2024

I run in the timeout if my CPU is busy with other workloads.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

3 participants