INFO: HTTP Status: '404' -> incorrect JSON status mapping for 'unknown error' with GeckoDriver, Firefox and Selenium through Java

http status code 404
http status code 403
http status codes cheat sheet
http code 200
http response code
http-status-codes npm
error code list
http 201 vs 200

when I run selenium WebDriver driver = new FirefoxDriver () shows error, it imports all the libraries it requires but it still reproduces the error

 package prueba;

    import org.openqa.selenium.WebDriver;

    import org.openqa.selenium.firefox.FirefoxDriver;

    public class Prueba {

        public static void main(String[] args) {
        WebDriver driver= new FirefoxDriver();
        driver.get("https://www.google.com/");
    }

}

when I run with Firefox driver () it shows the following error

1541445238209   Marionette  DEBUG   Remote service is active
1541445238216   Marionette  DEBUG   Accepted connection 0 from 127.0.0.1:51066
1541445238238   Marionette  TRACE   0 -> [0,1,"newSession",{"acceptInsecureCerts":true,"browserName":"firefox","capabilities":{"desiredCapabilities":{"acceptInsecureCerts":true,"browserName":"firefox"}}}]
1541445238238   Marionette  TRACE   0 <- [1,1,{"error":"unknown command","message":"newSession","stacktrace":"WebDriverError@chrome://marionette/content/error.js:178: ... et@chrome://marionette/content/server.js:245:8\n_onJSONObjectReady/<@chrome://marionette/content/transport.js:490:9\n"},null]
Nov 05, 2018 3:13:58 PM org.openqa.selenium.remote.ErrorCodes toStatus
INFO: HTTP Status: '404' -> incorrect JSON status mapping for 'unknown error' (500 expected)
Exception in thread "main" org.openqa.selenium.WebDriverException: newSession
Build info: version: '3.8.1', revision: '6e95a6684b', time: '2017-12-01T19:05:14.666Z'
System info: host: 'Mac-mini-QE-Gustavo.local', ip: '192.168.1.73', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.13.6', java.version: '1.8.0_131'
Driver info: driver.version: FirefoxDriver
remote stacktrace: stack backtrace:
   0:        0x10a952f64 - backtrace::backtrace::trace::h381bd5461b44fdf8
   1:        0x10a95331e - backtrace::capture::Backtrace::new::hbc1a12654c8fdba8
   2:        0x10a87f2ad - webdriver::error::WebDriverError::new::h482125abced50b28
   3:        0x10a88b11f - geckodriver::marionette::MarionetteSession::response::hc90b9b3424fb8183
   4:        0x10a89828b - geckodriver::marionette::MarionetteConnection::send_command::he82b7344fb11a670
   5:        0x10a889d38 - _$LT$geckodriver..marionette..MarionetteHandler$u20$as$u20$webdriver..server..WebDriverHandler$LT$geckodriver..marionette..GeckoExtensionRoute$GT$$GT$::handle_command::hf2128d0e5b79de64
   6:        0x10a829be8 - _$LT$webdriver..server..Dispatcher$LT$T$C$$u20$U$GT$$GT$::run::h03cbe31ad3bffc79
   7:        0x10a88004a - webdriver::server::start::_$u7b$$u7b$closure$u7d$$u7d$::h39b3aa32dda07c86
   8:        0x10a87434a - _$LT$std..panic..AssertUnwindSafe$LT$F$GT$$u20$as$u20$core..ops..FnOnce$LT$$LP$$RP$$GT$$GT$::call_once::hdf61d260d4895572
   9:        0x10a7b8399 - std::panicking::try::do_call::h7b2d8948e219fc68
  10:        0x10ade901a - __rust_maybe_catch_panic
  11:        0x10a7b7eac - std::panicking::try::h91913aec898bbfef
  12:        0x10a7b53c5 - std::panic::catch_unwind::h3ab5cba0644d3617
  13:        0x10a7b717c - std::thread::Builder::spawn::_$u7b$$u7b$closure$u7d$$u7d$::h27cd13f9efbf7439
  14:        0x10a812686 - _$LT$F$u20$as$u20$alloc..boxed..FnBox$LT$A$GT$$GT$::call_box::hc399e39818c3f4d8
  15:        0x10ade51e4 - std::sys::imp::thread::Thread::new::thread_start::h36f6d218784ec55f
  16:     0x7fff58dfa660 - _pthread_body
  17:     0x7fff58dfa50c - _pthread_start
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
    at (RemoteWebDriver.java:142)
    at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:120)
    at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:98)
    at prueba.Prueba.main(Prueba.java:23)
/Users/macminidev2/Library/Caches/NetBeans/8.2/executor-snippets/run.xml:53: Java returned: 1
BUILD FAILED (total time: 4 seconds)

could you help me with this problem please :D

List of HTTP status codes, HTTP Status Code directory, with definitions, details and helpful code references. HTTP response status codes indicate whether a specific HTTPrequest has been successfully completed. Responses are grouped in five classes: Informational responses (100–199), Successful responses (200–299), Redirects (300–399), Client errors (400–499), and Server errors (500–599).

I think you are missing the following:

System.setProperty("webdriver.gecko.driver", firefox driver path);

HTTP Status Codes, The information returned with the response is dependent on the method used in the request, for example: GET an entity corresponding to the requested resource​  In the case of the HTTP status 200 OK, the web server processed the request successfully and transmitted content to the browser. Most HTTP requests result in this status. Users rarely see this code on the screen as web browsers usually only show codes when there is some problem.

I fixed this by downloading the latest version geckodriver-v0.26.0-win64\geckodriver.exe

HTTP Status Codes, The data sections of messages Error, Forward and redirection responses may be used to contain human-readable diagnostic information. Success 2xx. These  Since HTTP/1.0 did not define any 1xx status codes, servers MUST NOT send a 1xx response to an HTTP/1.0 client except under experimental conditions. A client MUST be prepared to accept one or more 1xx status responses prior to a regular response, even if the client does not expect a 100 (Continue) status message.

HTTP/1.1: Status Code Definitions, HTTP - Status Codes - The Status-Code element in a server response, is a 203 Non-authoritative Information, The information in the entity header is from a  Welcome to Epic Games Public's home for real-time and historical data on system performance.

Status codes in HTTP, Hypertext Transfer Protocol (HTTP) Status Code Registry. Last Updated 203, Non-Authoritative Information, [RFC7231, Section 6.3.4]. We are issuing tax return refunds and helping taxpayers with available staff. Filing electronically along with Direct Deposit is the fastest and most secure way to get your refund. Find "stimulus" payment information at Economic Impact Payments. See also the latest updates about coronavirus tax

HTTP - Status Codes, The status code provides information about the status of the request. It also helps to identify the cause of the problem when a web page or other resource does not​  The IMEI.info offers also some advanced services (it is available for some manufacturers) for example: Find My iPhone Status, iCloud Status, Blacklist Status, Seller Information, Network & Simlock checks, Phone Blacklist, Carrier Check, Warranty Checks, Unlocking Simlock.

Comments
  • Did You register Your drivers in this case Firefox?
  • @Hülya Please don't add <blockquotes> to the error trace log. Else the trace logs gets wrapped up and debugging the trace logs becomes difficult.
  • @DebanjanB Thanks, I haven't thought about this.