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(reload): do not throw when reload is racing with navigation #5113

Merged
merged 1 commit into from
Jan 22, 2021
Merged

fix(reload): do not throw when reload is racing with navigation #5113

merged 1 commit into from
Jan 22, 2021

Conversation

dgozman
Copy link
Contributor

@dgozman dgozman commented Jan 22, 2021

When page.reload() is racing against the renderer-initiated
navigation, we might end up with waitForNavigation() being rejected
before the reload implementation is able to catch it.

To avoid that, carefully use Promise.all and await waitForNavigation
from the get go.

Same happens to page.goForward() and page.goBack().

References #5111.

When `page.reload()` is racing against the renderer-initiated
navigation, we might end up with `waitForNavigation()` being rejected
before the reload implementation is able to catch it.

To avoid that, carefully use Promise.all and await `waitForNavigation`
from the get go.

Same happens to `page.goForward()` and `page.goBack()`.
@dgozman dgozman merged commit 3e1c72a into microsoft:master Jan 22, 2021
aslushnikov pushed a commit that referenced this pull request Jan 28, 2021
… (#5171)

When `page.reload()` is racing against the renderer-initiated
navigation, we might end up with `waitForNavigation()` being rejected
before the reload implementation is able to catch it.

To avoid that, carefully use Promise.all and await `waitForNavigation`
from the get go.

Same happens to `page.goForward()` and `page.goBack()`.
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.

2 participants