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

Give Users Access To waitForChromeToClose() Call #357

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

JavaScriptDude
Copy link

@JavaScriptDude JavaScriptDude commented Jan 26, 2022

When users specify a --user-data-dir=<path> browser argument, Launcher.waitForChromeToClose() is not called and this causes messages such as the following after the program has exited like Future exception was never retrieved ...

This option will expose waitForBrowserToClose option to the Launcher.

When users specify a `--user-data-dir=<path>` browser argument, `Launcher.waitForChromeToClose()` is not called and this causes  messages such as the following after the program has exited.

```
Future exception was never retrieved
future: <Future finished exception=NetworkError('Protocol error Target.sendMessageToTarget: Target closed.')>
pyppeteer.errors.NetworkError: Protocol error Target.sendMessageToTarget: Target closed.
```

This is also a problem on Windows as it causes the exit code from `sys.exit(<code>)` to be clobbered with code 120 under some conditions.

This option will expose `waitForBrowserToClose` option to the Launcher.
@JavaScriptDude
Copy link
Author

An alternative to this PR would be to change the code to always wait for browser to close. I have not done testing but I suspect that this may not impact performance.

Related to #225

@JavaScriptDude
Copy link
Author

Question: Shouldn't waitForChromeToClose() be made async?

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

Successfully merging this pull request may close these issues.

None yet

1 participant