Skip to content

Commit 1105e55

Browse files
committed
fix(e2e): enable SwiftShader for WebGL on Linux CI
Chrome 137+ deprecated automatic SwiftShader fallback for WebGL. Without --enable-unsafe-swiftshader, WebGL context creation silently fails on GPU-less CI runners, causing black views and test timeouts. This is the same flag vtk-js uses in its CI. Also removes the manual chromedriver download step which wasn't helping — the real issue was WebGL, not chromedriver.
1 parent 3406e5b commit 1105e55

File tree

2 files changed

+2
-12
lines changed

2 files changed

+2
-12
lines changed

.github/workflows/e2e.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,6 @@ jobs:
2626
- name: Install xvfb (linux)
2727
if: matrix.os == 'ubuntu-latest'
2828
run: sudo apt-get install xvfb
29-
- name: Install matching ChromeDriver (linux)
30-
if: matrix.os == 'ubuntu-latest'
31-
run: |
32-
CHROME_MAJOR=$(google-chrome --version | grep -oP '\d+' | head -1)
33-
npx @puppeteer/browsers install chromedriver@$CHROME_MAJOR
34-
echo "CHROMEDRIVER_PATH=$(find . -path "*/chromedriver-linux64/chromedriver" -type f | head -1)" >> $GITHUB_ENV
3529
- name: Run E2E on chrome (linux)
3630
if: matrix.os == 'ubuntu-latest'
3731
run: xvfb-run --server-args="-screen 0, 1400x1000x24" --auto-servernum npm run test:e2e:chrome

wdio.chrome.conf.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ if (process.env.CI || process.env.GITHUB_ACTIONS) {
66
chromeArgs.push(
77
'--no-sandbox',
88
'--disable-dev-shm-usage',
9-
'--disable-infobars'
9+
'--disable-infobars',
10+
'--enable-unsafe-swiftshader'
1011
);
1112
}
1213

@@ -16,11 +17,6 @@ export const config = {
1617
{
1718
browserName: 'chrome',
1819
// this overrides the default chrome download directory with our temporary one
19-
...(process.env.CHROMEDRIVER_PATH && {
20-
'wdio:chromedriverOptions': {
21-
binary: process.env.CHROMEDRIVER_PATH,
22-
},
23-
}),
2420
'goog:chromeOptions': {
2521
args: chromeArgs,
2622
prefs: {

0 commit comments

Comments
 (0)