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

Chrome headless lost WebGL support on MacOS #263

Open
elalish opened this issue Feb 17, 2023 · 7 comments · May be fixed by #269 or #272
Open

Chrome headless lost WebGL support on MacOS #263

elalish opened this issue Feb 17, 2023 · 7 comments · May be fixed by #269 or #272

Comments

@elalish
Copy link

elalish commented Feb 17, 2023

Starting with Chrome 109, WebGL contexts can no longer be created in my Karma tests, meaning I can no longer run my tests locally. It appears to be because Chrome no longer supports software rendering on Arm-based macbooks, so the work-around is to enable the GPU instead: https://bugs.chromium.org/p/chromium/issues/detail?id=1407025#c9

I tried adding the indicated flags, but it's still not working because the launcher is also adding --disable-gpu:

'--disable-gpu',

Is there a reason the GPU should be disabled in headless mode? Is there a workaround for this, or can we remove this flag?

@dollysingh3192
Copy link

Getting Same Error. Can we expect the fix asap?

@elalish elalish linked a pull request Apr 21, 2023 that will close this issue
@jritzi jritzi linked a pull request May 2, 2023 that will close this issue
@HarelM
Copy link

HarelM commented May 23, 2023

Do you guys have a workaround? maybe patch-package? How did you solve this, I ran into this problem just now...

@elalish
Copy link
Author

elalish commented May 23, 2023

Karma got deprecated since I opened this, so I ended up switching to the modern web test runner instead. It's working great! My PR looks huge, but that was mostly other cleanup; you can see the new config here.

@HarelM
Copy link

HarelM commented May 24, 2023

So you switched from karma to playwright? Can you link to the karma deprecation article? Or are you saying that only this plugin got deprecated?

@HarelM
Copy link

HarelM commented May 26, 2023

THANKS!!

@PabloAlexis611
Copy link

If you don't have a hard requirement for Chrome Headless, using regular Chrome will not have the WebGL issue.

I just did that (granted it uses more memory, but at least I can run my unit tests without switching unit test frameworks or manually patching a file inside node_modules/)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants