Xlib: extension "RANDR" missing on display ":21". - Trying to run headless Google Chrome

Google ChromeXvfb

Google Chrome Problem Overview


I'm trying to run some Webdriver Maven tests on a headless server via xvfb using Chrome (Firefox also didn't work) but I'm getting this error message:

Xlib:  extension "RANDR" missing on display ":21".

What more information should I provide and what could the problem/solution be?

Google Chrome Solutions


Solution 1 - Google Chrome

Try this:

Xvfb :21 -screen 0 1024x768x24 +extension RANDR &

Xvfb --help

+extension name Enable extension -extension name Disable extension

Solution 2 - Google Chrome

Jeue's answer didn't help me. After hours I finally found the solution for my system and I think this will help other people too. I had to set the LD_LIBRARY_PATH like this:

   export LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu/

After that, everything worked very well, even without any "-extension RANDR" switch.

Solution 3 - Google Chrome

It seems that when this error appears it is an indication that the selenium-java plugin for maven is out-of-date.

Changing the version in the pom.xml should fix the problem

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionKaloyan RoussevView Question on Stackoverflow
Solution 1 - Google ChromejeueView Answer on Stackoverflow
Solution 2 - Google ChromeKICView Answer on Stackoverflow
Solution 3 - Google Chromecw24View Answer on Stackoverflow