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

3

60

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?

Bar answered 30/7, 2013 at 10:14 Comment(1)
@kowalski I am facing similar issue, and none of the solution suggested here works for me, were you able to run chromedriver on remote box ?Shawnee
M
15

Try this:

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

+extension name        Enable extension
-extension name        Disable extension
Multifid answered 8/8, 2013 at 8:6 Comment(2)
Whats with the + or - used? What's the difference?Charlatanism
From the usage: +extension name Enable extension -extension name Disable extensionFaris
M
5

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.

Melba answered 11/10, 2013 at 7:42 Comment(2)
Wow! great saved me after two days of debuggingEndstopped
Seems not needed on my system, because it is already written in /etc/ld.so.conf.d/x86_64-linux-gnu.conf which is loaded from /etc/ld.so.confSilvasilvain
T
2

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

Tillo answered 3/9, 2014 at 8:11 Comment(1)
it was never obvious to me, thanks alot :) , I installed the latest jar and everything seems to be working perfectly now !!Windowpane

© 2022 - 2024 — McMap. All rights reserved.