Search code examples
javafirefoxmarionetteselenium-firefoxdrivergeckodriver

How to get more error info from a selenium geckodriver failure?


I'm using the headless firefox 59.x plugin on geckodriver 0.19.1 with selenium 3.5.3

Once in a while, one of my tests fails with seemingly being unable to create a geckodriver session. here is the error message:

connection refused
Build info: version: '3.5.3', revision: 'a88d25fe6b', time: '2017-08-29T12:42:44.417Z'
System info: host: '5ed435662ab', ip: '192.1.0.2', os.name: 'Linux', os.arch: 'amd64', os.version: '4.4.0-1043-aws', java.version: '1.8.0_111'
Driver info: driver.version: RemoteWebDriver
remote stacktrace: stack backtrace:
   0:           0x4edb3c - backtrace::backtrace::trace::hc4bd56a2f176de7e
   1:           0x4edb72 - backtrace::capture::Backtrace::new::he3b2a15d39027c46
   2:           0x440ac8 - webdriver::error::WebDriverError::new::ha0fbd6d1a1131b43
   3:           0x447ba9 - geckodriver::marionette::MarionetteHandler::create_connection::hf0532ddb9e159684
   4:           0x428570 - <webdriver::server::Dispatcher<T, U>>::run::h2119c674d7b88193
   5:           0x4029b9 - std::sys_common::backtrace::__rust_begin_short_backtrace::h21d98a9ff86d4c25
   6:           0x40be65 - std::panicking::try::do_call::h5cff0c9b18cfdbba
   7:           0x5e6a6c - panic_unwind::__rust_maybe_catch_panic
                        at /checkout/src/libpanic_unwind/lib.rs:99
   8:           0x41eb22 - <F as alloc::boxed::FnBox<A>>::call_box::h413eb1d9d9f1c473
   9:           0x5df13b - alloc::boxed::{{impl}}::call_once<(),()>
                        at /checkout/src/liballoc/boxed.rs:692
                         - std::sys_common::thread::start_thread
                        at /checkout/src/libstd/sys_common/thread.rs:21
                         - std::sys::imp::thread::{{impl}}::new::thread_start
                        at /checkout/src/libstd/sys/unix/thread.rs:84

Is the only info useful here "connection refused"? How can I get more info?

Note there is an issue here that has been created to stop showing the confusing rust stacktrace with the errors. Will that also show more error info?

Is there a way to configure geckodriver to get a log of these failures so i know the cause?

One time the cause was GTK3 being missing. but this time it is not.


Solution

  • The answer is it's in the geckodriver log. The information is hard to decipher but it is there.