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

Intermittent issues occur when using page.waitForNavigation() after element.click() #557

Open
Tracked by #1138
mdcruz opened this issue Sep 30, 2022 · 0 comments
Open
Tracked by #1138
Labels
bug Something isn't working next Might be eligible for the next planning (not guaranteed!)

Comments

@mdcruz
Copy link
Contributor

mdcruz commented Sep 30, 2022

In one of our examples, we have:

// In the following Promise.all the tails locator clicks
  // on the tails button by using the locator's selector.
  // Since clicking on each button causes page navigation,
  // waitForNavigation is needed -- this is because the page
  // won't be ready until the navigation completes.
  // Setting up the waitForNavigation first before the click
  // is important to avoid race conditions.
  Promise.all([
    page.waitForNavigation(),
    tails.click(),

Promise.all concurrently runs the above promises so tails.click() can be written first before page.waitForNavigation().

However, I noticed if I pass in the slowMo option to chromium.launch(), the test fails with the following error depending on the value passed to slowMo.

ERRO[0030] communicating with browser: websocket: close 1006 (abnormal closure): unexpected EOF  category=cdp elapsed="0 ms" goroutine=85

ERRO[0033] Uncaught (in promise) getting inner text of "//p[starts-with(text(),'Your bet: ')]": getting new document handle: getting document element handle: sending a message to browser: websocket: close 1006 (abnormal closure): unexpected EOF  executor=per-vu-iterations scenario=default

If the value of slowMo is set to 100ms, the test passes but if it's >120ms, then the test fails with the above error. It seems that there is a race condition somewhere that we need to address.

@inancgumus inancgumus added bug Something isn't working evaluate labels Sep 30, 2022
@inancgumus inancgumus added this to the v0.7.0 milestone Nov 9, 2022
@andrewslotin andrewslotin modified the milestones: v0.7.0, v0.8.0 Jan 3, 2023
@ankur22 ankur22 assigned ankur22 and unassigned ankur22 Jan 24, 2023
@inancgumus inancgumus removed this from the v0.8.0 milestone Feb 7, 2023
@inancgumus inancgumus added the user request Requested by the community label Mar 31, 2023
@inancgumus inancgumus added next Might be eligible for the next planning (not guaranteed!) and removed user request Requested by the community labels Nov 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working next Might be eligible for the next planning (not guaranteed!)
Projects
None yet
Development

No branches or pull requests

4 participants