-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Leaking async ops when running tests using Puppeteer #27775
Comments
Hey, would it be possible to scope down the repo example. What I mean by that is. Can you see if the issue is reproducible by only calling Does setting any of this to bigger number help with the size of the stacks:
|
Hey @Lightning00Blade, thanks for taking a look at this!
No, that function just installs the browser. If I only run that function inside a test I'm unable to reproduce the leak. The
You can skip the Also, I get the same output even when using the flags you mention (also, the following output is not using the >> deno test -A ./test.ts --trace-leaks --v8-flags="--stack-size=4096,--max-stack-trace-source-length=1000"
running 1 test from ./test.ts
A ...
B ... ok (0ms)
A ... FAILED (457ms)
ERRORS
A => ./test.ts:50:6
error: Leaks detected:
- A child process stderr was opened during the test, but not closed during the test. Close the child process stderr by calling `proc.stderr.close()` or `await child.stderr.cancel()`.
- An async call to op_read was started in this test, but never completed. The operation was started here:
at Object.op_read (ext:core/00_infra.js:293:13)
at Object.pull (ext:deno_web/06_streams.js:995:30)
at Module.invokeCallbackFunction (ext:deno_webidl/00_webidl.js:1105:16)
at ReadableByteStreamController.pullAlgorithm (ext:deno_web/06_streams.js:3566:14)
at readableByteStreamControllerCallPullIfNeeded (ext:deno_web/06_streams.js:1241:49)
at ReadableByteStreamController.[[[PullSteps]]] (ext:deno_web/06_streams.js:5958:5)
at readableStreamDefaultReaderRead (ext:deno_web/06_streams.js:2516:36)
at ReadableStreamDefaultReader.read (ext:deno_web/06_streams.js:5455:5)
at Readable.read [as _read] (ext:deno_node/_stream.mjs:5368:14)
at Readable.read (ext:deno_node/_stream.mjs:2561:16)
FAILURES
A => ./test.ts:50:6
FAILED | 0 passed (1 step) | 1 failed (459ms)
error: Test failed |
I found a place that this may be coming from - puppeteer/puppeteer#13558 |
Hello @Lightning00Blade . Thanks for your fix, what steps do we have to follow to be able to set up/use Puppeteer locally? |
You can read here - https://pptr.dev/contributing#getting-started |
We just release v24.2.0 - https://github.com/puppeteer/puppeteer/releases/tag/puppeteer-v24.2.0 |
Hey @Lightning00Blade, thanks for the update. We tried the local setup with no luck, so we decided to wait until the official release. I just did some testing (after upgrading to Puppeteer 24.2.0 and Puppeteer/Browsers 2.7.1) and the example in the initial comment (#27775 (comment)) works well, no leaks detected in that case. That is good news, but when running our complete suite of tests we can still see some leaks.
Thanks for taking a look at this issue! |
If you could provide more info on what the test that fails with As for the other I will try to see if I can find what the issue is - very likely that Node vs Deno handle |
Setup:
npm:puppeteer-core@24.0.0
)npm:@puppeteer/browsers@2.7.0
)The bug
When running tests that make use of a Puppeteer browser Deno complains about leaks detected:
How to reproduce?
Extra info
The text was updated successfully, but these errors were encountered: