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

Upgrade puppeteer, fix intermittent CI issues #1193

Merged
merged 6 commits into from
Aug 15, 2024
Merged

Conversation

stalgiag
Copy link
Contributor

@stalgiag stalgiag commented Aug 13, 2024

This PR attempts to fix the intermittent "Protocol error" issues when e2e testing on GH. The most specific issue this resolves is the one that outputs this error:

 TargetCloseError: Waiting for selector `button ::-p-text(Run Test Setup)` failed: Protocol error (Runtime.evaluate): Session closed. Most likely the page has been closed.

This also appears to resolve the issues that appeared as though they were occurring during yarn install

Note that the tests have ran on CI for this a total of 10x times without failing.

Comment on lines 31 to 35
await page.waitForNetworkIdle();

// Allow additional time for popup to open
const popupPage = await popupTarget.page();
const pages = await global.browser.pages();
const popupPage = pages[pages.length - 1];
Copy link
Contributor

@howard-e howard-e Aug 14, 2024

Choose a reason for hiding this comment

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

Interesting! Should the same be done for the similar TestRun.e2e test?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point! It wasn't creating issues so I didn't remember to change it but yes, best to keep consistency. It is changed now.

Copy link
Contributor

@howard-e howard-e left a comment

Choose a reason for hiding this comment

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

Looks good! Thanks as well for keeping the puppeteer package up to date. Took a look through their CHANGELOG to see if anything affects this work but that is already reflected in your changes. Being that createIncognitoBrowserContext is now createBrowserContext with the rename happening in v22.

@howard-e howard-e merged commit 5f2de7a into development Aug 15, 2024
2 checks passed
@howard-e howard-e deleted the fix-CI-issues branch August 15, 2024 13:15
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