Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unknown error: an X display is required for keycode conversions

I am trying to run a mobile web test using appium on Centos 6 headless linux but I am keep getting this error:

"info: [CHROMEDRIVER STDERR] No protocol specified

info: Responding to client with error: {"status":13,"value":{"message":"An unknown server-side error occurred while processing the command.","origValue":"**unknown error: an X display is required for keycode conversions, consider using Xvfb\n**  (Session info: chrome=webview)\n  (Driver info:chromedriver=2.9.248316,platform=Linux 2.6.32-042stab088.4x86_64)"},"sessionId":"8563fbe5972f3ba87673c7a082d49d22"}
POST /wd/hub/session/8563fbe5972f3ba87673c7a082d49d22/element/0.06753459526225924-1/value 500 1927ms - 395b

debug: Appium request initiated at /wd/hub/session/8563fbe5972f3ba87673c7a082d49d22

debug: Request received with params: {}

info: Shutting down appium session..."

It opens up the chrome browser and navigates to the given url. After that it tries sendKeys to the username field and then it fails.

like image 861
Gnawk Avatar asked Jan 01 '26 08:01

Gnawk


1 Answers

Please find a possible solution here: http://www.installationpage.com/selenium/how-to-run-selenium-headless-firefox-in-ubuntu/

It works for me on Ubuntu, maybe similar solution works on CentOS. For some reson I had to start Xvfb with bigger framebuffer

sudo Xvfb :10 -ac -screen 0 4000x2000x8
like image 199
sztanyoo Avatar answered Jan 05 '26 20:01

sztanyoo



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!