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

fix(page): navigating 11 pages simultaneously should not throw warning #3560

Merged
merged 1 commit into from Nov 20, 2018

Conversation

aslushnikov
Copy link
Contributor

@aslushnikov aslushnikov commented Nov 17, 2018

NavigatorWatcher subscribes to Connection to get a Disconnected event,
causing us to hit the default max of 10 listeners constraint.

Technically we don't leak anything here and can safely bump
the maxListenersCount to Infinity.

However, we conveniently have CDPSession, and
can re-dispatch the event on it and keep the safety check in place.

References #1995

NavigatorWatcher subscribes to Connection to get a `Disconnected` event,
causing us to hit the default max of 10 listeners constraint.

Technically we don't leak anything here and can safely bump
the maxListenersCount to Infinity.

However, we conveniently have `CDPSession`, and
can re-dispatch the event on it and keep the safety check in place.
await page.goto(server.EMPTY_PAGE);
await page.close();
}));
process.removeListener('warning', warningHandler);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test looks like it might fail in parallel if some other test creates a warning.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:'(

@aslushnikov aslushnikov merged commit e2e43bc into puppeteer:master Nov 20, 2018
@aslushnikov aslushnikov deleted the fix-warning branch January 22, 2019 20:49
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

2 participants