-
-
Notifications
You must be signed in to change notification settings - Fork 111
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
bug: Node freezes when using the programmatic API #146
Comments
Thanks a lot for the bug report and digging into it, yeah I must have missed that 🙈 I'll see that I get it fixed soon. |
Not really done properly because there's likely some edge cases where this implementation would fail wrt timing. Fixes #146.
Not really done properly because there's likely some edge cases where this implementation would fail wrt timing. Fixes #146.
Turns out fixing this is a lot harder than I thought, mainly because of how the library behaves now when running multiple programmatic There's two options to fix this now:
At the cost of performance, I think I'd go with the second solution, and rather fix the performance problem in a better way (I've been planning to change the programmatic API to accept an array input anyway). |
@Brainy0207 should be fixed in |
I ran my test script, no freezing, so I guess it is fixed. Thanks for the quick response. |
Context:
md-to-pdf -v
): 5.2.0Describe the bug:
I have a really simple script:
If I run this script with node, it logs the filename but freezes after that. I have to press Ctrl+C to get it to return.
It seems that multiple chrome.exe processes are created in the background and node is waiting for them to exit. If I kill these processes with the task manager, node returns.
This seems to be related to #141.
The browser instance created in
generateOutput
is never closed for the programmatic API:md-to-pdf/src/lib/generate-output.ts
Lines 36 to 38 in 9f464aa
And because
closeBrowser
is not exported to the top level, there seems to be no way to close this browser instance programmaticaly.The text was updated successfully, but these errors were encountered: