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

Caesium Tests using headless chrome fail on MacOS due to disabled WebGL in deprecated karma launcher #10042

Open
fkellner opened this issue Mar 7, 2024 · 0 comments
Labels

Comments

@fkellner
Copy link
Contributor

fkellner commented Mar 7, 2024

Description

Running the test suite with npm test on a MacBook (with Apple Silicon, but I don't know if this is really relevant here)
results in a lot of errors, which are not present when running them on Windows, e.g.:

Cesium MeasurementSupport
    ✖ should render with default values
      Chrome Headless 122.0.6261.111 (Mac OS 10.15.7)
    The browser supports WebGL, but initialization failed.

This is a known issue with karma-chrome-launcher and will not be fixed due to the karma test runner being deprecated.

How to reproduce

Check out master on a MacBook and run npm run test. More specifically, you can run a test from web/client/components/map/cesium/__tests__/DrawGeometrySupport-test.jsx e.g. from your IDE if you do not want
to wait that long.

Expected Result

The tests to run through.

Current Result

Errors complaining that WebGL is supported, but initialization fails.

Browser info (use this site: https://www.whatsmybrowser.org/ for non expert users)
Browser Affected Version
Internet Explorer
Edge
Chrome Headless 122.0.6261.111
Firefox
Safari

Other useful information

Workaround

A possible workaround is to go to node_modules/karma-chrome-launcher/index.js and manually change the following:

image

I.e, removing the --disable-gpu flag that is added per default and cannot be overridden, and adding the --use-angle=gl flag. Only removing the --disable-gpu flag did not work.

@fkellner fkellner added the bug label Mar 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant