Selenium grid 4.8.3 hub + node test times out on ubuntu-latest since 12 November

未关闭
#44,231 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
51/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
活跃
技术栈
github-actions, java, typescript
领域
ci-cd, testing

调研方向

Start with tests/installation/connect-to-selenium.spec.ts and the BT-100 test at tests/library/browsertype-launch-selenium.spec.ts:124; inspect how the test starts the Selenium hub and node, and how download-selenium.js selects the server version. Then review the package installation workflow's Java setup and compare runs where the node rejects --grid-url with successful attempts. Done means the intermittent timeout is explained and the test passes consistently on Ubuntu.

由索引模型根据 Issue 内容生成。

描述

The installation test connect to selenium started to need retries on the three package-installations-ubuntu-latest jobs on 12 November. The start time matches the move of ubuntu-latest to the ubuntu-26.04 image (see #44094). The cause is not confirmed.

Failing test

tests/installation/connect-to-selenium.spec.ts runs npm run test -- selenium.spec. In each failed attempt, one inner test fails:

[chromium-library] › tests/library/browsertype-launch-selenium.spec.ts:124:1 › BT-100 selenium grid 4.8.3 hub + node chromium
Test timeout of 90000ms exceeded.

The other Selenium tests pass in the same attempt, also BT-098 selenium grid 3.141.59 hub + node chromium and BT-099 selenium grid 4.8.3 standalone chromium.

Numbers

Runs on main, 12 November 18:22 UTC to 18 November, 57 runs for each job:

Job Runs with a failed first attempt Failed after all retries
package-installations-ubuntu-latest 13 1
package-installations-ubuntu-latest-node24 20 0
package-installations-ubuntu-latest-node26 11 0
  • From 22 October to 12 November the test had one failed attempt in about 200 runs for each job, with a different error.
  • The same failure occurred in 27 pull request runs after 12 November.
  • package-installations-macos-latest and package-installations-windows-latest do not show it.
What the output shows

In each failed attempt, the Selenium node process does not accept --grid-url and prints its usage text:

====== java -Dwebdriver.chrome.driver=.../chromedriver -jar .../selenium/selenium-server-4.8.3.jar node --grid-url http://127.0.0.1:15123 --port 15124
Was passed main parameter '--grid-url' but no main parameter was defined in your arg class
Usage: node [options]

Then node.waitForOutput('Node has been added') in BT-100 never resolves, and the test times out.

The hub output in the same attempts has this warning, which JDK 24 and later print:

WARNING: A terminally deprecated method in sun.misc.Unsafe has been called
WARNING: sun.misc.Unsafe::objectFieldOffset has been called by io.netty.util.internal.PlatformDependent0$4 (.../selenium-server-4.8.3.jar)

The workflow does not set a Java version, so the job uses the default Java of the runner image.

Not known
  • Why the same command passes on a retry.
  • Whether the node process prints the same message in passing attempts. The output of passing attempts is not kept.
Possible fixes
  • Set a fixed Java version for the job with actions/setup-java.
  • Update the Selenium 4 server that download-selenium.js downloads.
Example runs
主要语言
TypeScript
星标
100k
派生
6.9k
平均合并
16 小时 8 分钟
30 天内合并 PR
281

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

microsoft/playwright 的其他 Issue

查看 microsoft/playwright 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。