Circleci node browser image provides low resolution and max upto 1280x1024

We are using circleci/node:11-browsers image for executing UI tests and it works fine but container/image resolution is very low (max upto 1280x1024). Due to that reason, we have to customize some of the automation tests and now issues are increasing gradually. We would like to have support upto 1920x1080 and default as this probably.

Below command doesn’t allow to go beyond 1280x1024 with VNC too:

x0vncserver -geometry 1920x1080 -passwordfile $HOME/repo/.vnc/passwd -display :12

I tried to increase resolution through xrandr but it doesn’t allow probably due to limit. It throws error:

xrandr: Failed to get size of gamma for output default

I applied xrandr related solutions but it doesn’t go beyond 1280x1024 anyway, probably due to not having core UI in circleci-browsers image?

Please go through https://circleci.com/docs/2.0/browser-testing/#interacting-with-the-browser-over-vnc. Web application renders like tablet UI due to low width and height of the screen. I also tried to put workaround by setting display but only VNC session is fine, actual CircleCI tests running session just opens upto 1280x1024. Can you increase the resolution in base browsers image to unblock the users?

What is preventing you from increasing the resolution? Do you get an error?

It seems like you supplied the link to the documentation to explain the reason why “it doesn’t allow”, but I could not immediately see anything in those docs related to this restriction.

Thanks, i have added error detail especially for xrandr but i suspect circleci-browser image doesn’t have core UI? I had tried by adding xfce UI but no luck where CircleCI opens display session to run the tests.

OK, this sounds like a general testing/CI bug. I would suggest searching for that error to see the common causes. It might be that your build container has run out of memory - are there any logs?

Are you a paying customer? If so, you could talk to Tech Support to increase your RAM limits. You will have 4G by default.

Yes paid customer. There is no memory issue for increasing resolution in base circleci/node:11-browsers image, like i have mentioned this image seems very restricted.

How do you know that your problem is not related to running out of memory? A bitmap of 1920x1080 at four-bytes/pixel takes up 7.91M (I just calculated it). Unless VNC does some on-the-fly compression, it cannot fit that bitmap in a 4M build container.

I suggest you bump up the container size and see if that helps. Good luck! :+1:

Good question. That’s because I had tried by installing TigerVNC and used 1920x1020 resolution on same container. It was launching UI very fine (xfce) using high resolution. Unfortunately I couldn’t use same display which circleci/node:11-browsers image used. Later i tried to increase resolution which circleci used (https://circleci.com/docs/2.0/browser-testing/#x11-forwarding-over-ssh) but no luck :slight_smile:

For e.g.

# Environment variables
ENVIRONMENT=/etc/environment
echo DISPLAY=:10.0 | sudo tee -a $ENVIRONMENT
echo TERM=xterm | sudo tee -a $ENVIRONMENT
echo VNC_PORT=5901 | sudo tee -a $ENVIRONMENT
echo NO_VNC_PORT=6901 | sudo tee -a $ENVIRONMENT
echo VNC_COL_DEPTH=24 | sudo tee -a $ENVIRONMENT
echo VNC_RESOLUTION=1920x1080 | sudo tee -a $ENVIRONMENT
echo VNC_PASSWORD_PATH=$HOME/repo/.vnc/passwd | sudo tee -a $ENVIRONMENT

sudo x0vncserver -display $DISPLAY -geometry $VNC_RESOLUTION -passwordfile $VNC_PASSWORD_PATH

Also tried $DISPLAY as :10.0 which container uses but couldn’t attach using VNC session.