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

Docker image / SW WebGL support #2116

Closed
sommcz opened this issue Feb 11, 2018 · 6 comments
Closed

Docker image / SW WebGL support #2116

sommcz opened this issue Feb 11, 2018 · 6 comments
Labels
AREA: docker TYPE: enhancement The accepted proposal for future implementation.
Milestone

Comments

@sommcz
Copy link

sommcz commented Feb 11, 2018

Are you requesting a feature or reporting a bug?

bug?

What is the current behavior?

WebGL is disabled by default (in chromium and firefox browsers in testcafe docker)

What is the expected behavior?

WebGL is enabled by default or there is possibility to enable/disable it

How would you reproduce the current behavior (if this is a bug)?

Run following test with docker command:
docker run -v c:\MyPath\Tests:/tests -it testcafe/testcafe "chromium --no-sandbox" /tests/test1.ts -S -s /tests/screenshots

fixture(`Getting Started`)
		.page(`https://browserleaks.com/webgl`);

test('My first test', async t => {
	await t.takeScreenshot();
});

See created screenshot:
image

I tried real app with WebGL component (mapbox-gl) also and it fails with WebGL init js error.

As there is not chrome://settings etc. available within testcafe fixtures, there is no posibility to control webgl settings.

Thank you for any help.

Specify your

  • operating system: Windows 10 + Docker version 17.12.0-ce, build c97c6d6
  • testcafe version: 0.18.6
  • node.js version: used from testcafes docker container
@sommcz
Copy link
Author

sommcz commented Feb 12, 2018

After some experiments, there is no sw gl renderers in the docker image (osmesa or swiftshader).

WebGL works with osmesa installed!
image

Simple step to install osmesa in dockerfile:

RUN apk --no-cache add mesa-osmesa && \
  ln -s /usr/lib/libOSMesa.so.8 /usr/lib/chromium/libosmesa.so

After that, following command run testcafe with WebGL support:
/opt/testcafe/docker/testcafe-docker.sh 'chromium --no-sandbox --use-gl=osmesa' /tests/test1.ts

Please add official support for sw renderers to docker image.
Thank you

@sommcz sommcz changed the title Docker image / WebGL disabled Docker image / SW WebGL support Feb 12, 2018
@AndreyBelym
Copy link
Contributor

Hi @sommcz! Thank you for your research! I've found a way to enable WebGL in Firefox. I'll update Dockerfile and dev build on Docker Hub.

@sommcz
Copy link
Author

sommcz commented Feb 12, 2018

I didn't test it, but it will be nice to add support for swiftshader too. So developers can choose which one to use.

Alpine package: https://pkgs.alpinelinux.org/contents?branch=edge&name=mesa-gles&arch=x86_64&repo=main

Library: /usr/lib/libGLESv2.so.2
Link path for Chromium: /usr/lib/chromium/swiftshader/libGLESv2.so

usage: --use-gl=swiftshader

@AlexanderMoskovkin AlexanderMoskovkin added AREA: docker TYPE: enhancement The accepted proposal for future implementation. labels Feb 14, 2018
@AlexanderMoskovkin AlexanderMoskovkin added this to the Sprint #11 milestone Feb 20, 2018
@AndreyBelym AndreyBelym added this to Integrations in Enhancements processing Mar 1, 2019
@tombh
Copy link

tombh commented Jul 1, 2019

I've also found that testcafe 'chrome --headless --use-gl=swiftshader' test.js works out of the box without any .so linking.

@need-response-app need-response-app bot added the STATE: Need response An issue that requires a response or attention from the team. label Jul 1, 2019
@LavrovArtem LavrovArtem removed the STATE: Need response An issue that requires a response or attention from the team. label Jul 2, 2019
@mhoennig
Copy link

This issues seems to be fixed at least from the Testcafe Docker image 1.8.6 on. It worked out of the box for us after upgrading from 1.7.0. Important: I am talking about the Docker image, not just the Testcafe version.

@need-response-app need-response-app bot added the STATE: Need response An issue that requires a response or attention from the team. label Sep 23, 2020
@arubtsov
Copy link
Contributor

@mhoennig Thank you for pointing this out.

Enhancements processing automation moved this from Docker to Closed Sep 24, 2020
@need-response-app need-response-app bot removed the STATE: Need response An issue that requires a response or attention from the team. label Sep 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
AREA: docker TYPE: enhancement The accepted proposal for future implementation.
Projects
No open projects
Development

No branches or pull requests

7 participants