Skip to content

Fix nightly Java Grid downloads and Edge session startup#140

Merged
jsugg merged 2 commits into
masterfrom
fix/nightly-java-grid-downloads-and-edge-sandbox
Jul 13, 2026
Merged

Fix nightly Java Grid downloads and Edge session startup#140
jsugg merged 2 commits into
masterfrom
fix/nightly-java-grid-downloads-and-edge-sandbox

Conversation

@jsugg

@jsugg jsugg commented Jul 13, 2026

Copy link
Copy Markdown
Owner

Root cause analysis

Two independent regressions surfaced in the Nightly workflow (e.g. run 29229099468). Both are Java-only; TypeScript and Python nightlies are green.

1. Java Grid (chrome + edge + firefox) — DownloadTest.fileDownload NPE

java.lang.NullPointerException: Cannot invoke "java.util.List.stream()" because "files" is null
    at org.openqa.selenium.remote.RemoteWebDriver.getDownloadedFiles(RemoteWebDriver.java:729)
    at ...DownloadPage.waitForBrowserDownload(DownloadPage.java:84)

Cause: client/Grid version mismatch. The Java client is Selenium 4.45.0, but the Grid hub/nodes were pinned to 4.37.0. Selenium 4.45's getDownloadedFiles() reads the files key from the GET_DOWNLOADABLE_FILES response, whereas the 4.37 node still emits the legacy names key. value.get("files") therefore returns null and .stream() throws. This is Grid-only because local runs report isDownloadsEnabled() == false and take the filesystem path instead — which is why non-Grid chrome/firefox stayed green.

The Grid track began failing at the exact commit that revived it (63ffe7a).

Fix: align the Grid hub and node images to 4.45.0-20260606 so the download contract matches the client.

2. Java Edge (local) — every session fails to start

org.openqa.selenium.SessionNotCreatedException:
  session not created: Chrome instance exited. Examine ChromeDriver verbose log...
    at ...DriverFactory.createEdgeDriver(DriverFactory.java:82)

Edge is installed on ubuntu-24.04 (v150), so this is a launch crash, not a missing binary. Ubuntu 24.04 restricts unprivileged user namespaces via AppArmor, which crashes the Chromium sandbox on launch; Edge 150 does not survive it while Chrome happens to. This job has failed every night since at least Jul 11.

Fix: pass --no-sandbox and --disable-dev-shm-usage for local (non-Grid) Chromium browsers (chrome + edge).

Verification

No local JDK available, so validation is via CI — the Nightly workflow is dispatched against this branch and babysat to green.

@jsugg jsugg force-pushed the fix/nightly-java-grid-downloads-and-edge-sandbox branch from 77d7641 to 9ecda32 Compare July 13, 2026 10:03
jsugg added 2 commits July 13, 2026 08:16
DownloadTest.fileDownload threw NullPointerException inside
RemoteWebDriver.getDownloadedFiles because the Grid ran 4.37.0 while
the Java client is 4.45.0. The 4.45 client reads the "files" key from
GET_DOWNLOADABLE_FILES, but the 4.37 node still emits the legacy
"names" key, so the parsed list was null. Bump hub and node images to
4.45.0-20260606 to match the client contract.
Two nightly regressions on ubuntu-24.04:

- Edge sessions failed with SessionNotCreated "Chrome instance exited".
  The runner restricts unprivileged user namespaces (AppArmor), which
  crashes the Chromium sandbox at launch. Pass --no-sandbox and
  --disable-dev-shm-usage for local chrome and edge runs.

- IFrameTest.testContextSwitching raced the TinyMCE boot: the test
  reads the editor text and writeIFrameTextAreaText re-reads it, and
  the default content was injected between the two reads. Wait for the
  rendered body content in the frame before reading (the tinymce global
  lives in the parent document, not the content frame).
@jsugg jsugg force-pushed the fix/nightly-java-grid-downloads-and-edge-sandbox branch from b1db785 to 6b17a18 Compare July 13, 2026 11:16
@jsugg jsugg merged commit b32909e into master Jul 13, 2026
7 checks passed
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.

1 participant