#58592 closed defect (bug) (fixed)
E2E tests: Investigate inconsistent navigation timeouts
| Reported by: | joemcgill | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | 6.4 |
| Component: | Build/Test Tools | Version: | |
| Severity: | normal | Keywords: | has-patch has-unit-tests |
| Cc: | Focuses: |
Description
Recently, our automated end-to-end (E2E) tests have been failing inconsistently due to a Navigation Timeout error:
TimeoutError: Navigation timeout of 30000 ms exceeded
You can see an example of this type of error in a recent run of the workflow against on a PR to update the About Page, which should not have any affect on E2E tests.
The full list of runs where you can see this happening inconsistently, but frequently, is here: https://github.com/WordPress/wordpress-develop/actions/workflows/end-to-end-tests.yml
Often rerunning these failing jobs fixes the issue, but we should investigate why this is happening and try to reduce the frequency if possible since it leads to a poor experience and unnecessary overhead to rerun these failing jobs.
Change History (29)
This ticket was mentioned in Slack in #core by joedolson. View the logs.
3 years ago
This ticket was mentioned in Slack in #core by mukeshpanchal27. View the logs.
3 years ago
#4
@
3 years ago
These failures happen on tests using visitAdminPage(), sometimes even after multiple attempts.
It looks like the tests already increase the timeout to 30 seconds from the default 5 seconds. Perhaps GitHub is sometimes low on resources, and in that case increasing the timeout a bit further might help.
This ticket was mentioned in Slack in #core by nosolosw. View the logs.
3 years ago
#6
@
3 years ago
Gutenberg puppeteer e2e tests also started failing at some point. A similar timeout issue.
After bisecting, it seems to be this commit that's causing the issue:
https://github.com/WordPress/wordpress-develop/commit/8d702842ce2c7dbb457624b8d66fe0536e1a8b48
(this is the associated pull request, which has links to the trac tickets - https://github.com/WordPress/wordpress-develop/pull/4570)
I noticed that if I change page.waitForNavigation( { waitUntil: 'networkidle0' } ), to page.waitForNavigation(), in the e2e test, then the test will pass, so possibly the change in the PR interferes with how Puppeteer detects network idle? I'm not entirely sure.
edit: I haven't made any progress on this, though I've narrowed it down to no-store that causes the failing tests. waitUntil: 'networkidle0' means the test should wait until there are no active network requests, and that it fails indicates there is still an active network request. I haven't been able to spot any active ones when testing manually, so it is unusual.
This ticket was mentioned in Slack in #core-editor by talldanwp. View the logs.
3 years ago
#8
@
3 years ago
A PR was merged in Gutenberg that removes no-store for the test environment - https://github.com/WordPress/gutenberg/pull/51826.
Core could probably use a similar approach. I'm not sure if it's a long term fix, but it may help get things moving at this important time.
Having said that, I also notice that core failures started a little earlier than the cache control changes, so it could be that there's more going on.
This ticket was mentioned in Slack in #core by ocean90. View the logs.
3 years ago
This ticket was mentioned in PR #4729 on WordPress/wordpress-develop by @Clorith.
3 years ago
#10
- Keywords has-patch has-unit-tests added
This is a WIP (Work In Progress) PR for the E2E tests that have been failing recently, created to allow tests to run and check that enhancements work within the action runners, as well as locally.
Trac ticket: https://core.trac.wordpress.org/ticket/58592
#14
@
3 years ago
There is a PR for the e2e-test-utils package (still waiting for approval at the moment) that aims to fix a race condition within the login procedure and hopefully resolve these timeout issues.
This ticket was mentioned in Slack in #core by nekojonez. View the logs.
3 years ago
This ticket was mentioned in PR #4877 on WordPress/wordpress-develop by @SergeyBiryukov.
3 years ago
#16
Trac ticket: https://core.trac.wordpress.org/ticket/58592
This ticket was mentioned in Slack in #core by sergey. View the logs.
3 years ago
This ticket was mentioned in Slack in #core by sergey. View the logs.
3 years ago
#22
in reply to: ↑ 21
@
3 years ago
Replying to desrosj:
While I was updating the PR associated with #56658 leading up to [56378], I realized I didn't receive a single E2E workflow failure. It's possible that this is now resolved as a result of those changes.
It appears that Performance tests still fail with the same timeouts, as well as the tests on PR 4877.
This ticket was mentioned in Slack in #core by sergey. View the logs.
3 years ago
This ticket was mentioned in PR #13942 on WordPress/wordpress-develop by @lancewillett.
5 weeks ago
#25
WordPress 6.3’s delayed login autofocus can clear a typed password. Required-field validation then blocks submission, so the legacy E2E helper times out waiting for navigation.
Use the existing enable_login_autofocus filter in a temporary must-use plugin, following Gutenberg #6129. The runner respects LOCAL_DIR, preserves existing plugins, and removes its own fixture after completion or interruption.
Trac ticket: #58592, as a 6.3 follow-up to the timeout investigation closed after 6.4 moved to Playwright.
Validation:
- Production build, explicit JavaScript lint, PHP syntax, and WordPress style checks passed. The branch’s Core-specific PHP rules remain for CI.
- Quick Draft and Cache Control: 4/4 tests passed with SCRIPT_DEBUG enabled and 4/4 disabled, using Node 14 and Chromium revision 982053.
- Ten runner lifecycle checks passed. Live HTTP checks confirmed autofocus was restored afterward and required-field validation stayed enabled.
Hosted CI is pending. Assertions, timeouts, and retries remain unchanged.
AI assistance: Codex assisted with investigation, implementation, review, and local validation.
@lancewillett commented on PR #13942:
5 weeks ago
#26
Fixed all five review items and pushed commit 0ad6d50fcb
- Cleanup tolerates missing fixtures.
- Repeated Ctrl+C reaches the test child.
- Fixture copying is simplified.
- Documentation moved into the plugin docblock.
@lucatume ready for re-review
@lancewillett commented on PR #13942:
4 weeks ago
#28
PR #13942 landed in https://core.trac.wordpress.org/changeset/64259
@lancewillett commented on PR #4877:
7 days ago
#29
Closing as superseded. Trunk now uses @wordpress/e2e-test-utils-playwright and no longer depends on @wordpress/e2e-test-utils, so this version bump no longer applies.
<sub>AI review · <code>gpt-6</code></sub>
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
#58591 was marked as a duplicate.