Process hangs after recording finished
Closed this issue · 0 comments
I'm using puppeteer-stream to log into a webpage, click the play button on an embedded screen-reader, record the output, and save the audio to a file. My code is largely based on the example code provided in the repo. However, whenever I get to the end of the process, the browser will not close, and even if I close it manually, the process still hangs until I hit ^C
to stop it.
If I attempt to call browser.close()
, I get an error:
TargetCloseError: Protocol error (Runtime.callFunctionOn): Target closed
I noticed that the process opens 3 browser tabs:
- One empty tab
- One with the content I am navigating to
- One with a URL that looks like a Video Capture chrome extension
Closing these 3 tabs individually using page.close()
for each will also give the same TargetCloseError
when the final one is closed.
I need a way to end this process without it hanging or throwing this TargetCloseError
.