'UnknownError',message: 'An unknown server-side error occurred while processing the command.',orgStatusMessage: 'connection refused with webdriver.io

╄→尐↘猪︶ㄣ 提交于 2020-01-30 09:20:06

问题


I am following this guide: http://webdriver.io/guide.html and firefox version I am using 62.0

I followed following steps:

  1. I downloaded latest selenium-standalone-server version 3.14.
  2. I have downloaded latest gecko driver version 0.22.0 and extracted it in project folder
  3. Ran selenium standalone version using command java -jar -Dwebdriver.gecko.driver=./geckodriver selenium-server-standalone-3.5.3.jar

  4. Then run the command npm install webdriverio

  5. Created a test file test.js with code
var webdriverio = require('webdriverio');
var options = {
    desiredCapabilities: {
        browserName: 'firefox'
    }
};

webdriverio
    .remote(options)
    .init()
    .url('http://www.google.com')
    .getTitle().then(function(title) {
        console.log('Title was: ' + title);
    })
    .end()
    .catch(function(err) {
        console.log(err);
    });
  1. node test.js

instead of getting output "Title was: Google" i get error

{ Error: An unknown server-side error occurred while processing the command.
    at end() - test.js:15:6
  details: undefined,
  message: 'connection refused\nBuild info: version: \'3.4.0\', revision: \'unknown\', time: \'unknown\'\nSystem info: host: \'RITESHs-MacBook-Pro.local\', ip: \'192.168.1.2\', os.name: \'Mac OS X\', os.arch: \'x86_64\', os.version: \'10.13.6\', java.version: \'1.8.0_171\'\nDriver info: driver.version: FirefoxDriver\nremote stacktrace: stack backtrace:\n   0:        0x10b43d49e - backtrace::backtrace::trace::h3ab5720c483fe461\n   1:        0x10b43d4dc - backtrace::capture::Backtrace::new::h096accf58447e0d5\n   2:        0x10b376534 - webdriver::error::WebDriverError::new::hc0958d01acda7bfc\n   3:        0x10b37d300 - geckodriver::marionette::MarionetteHandler::create_connection::h59a68c8dfef48e54\n   4:        0x10b35cd3c - _$LT$webdriver..server..Dispatcher$LT$T$C$$u20$U$GT$$GT$::run::h5a26ba0bb4fdb139\n   5:        0x10b3350c5 - std::sys_common::backtrace::__rust_begin_short_backtrace::h3f868f7a1a12bdcc\n   6:        0x10b33fd2d - std::panicking::try::do_call::hfce1ad2a948c3632\n   7:        0x10b4e9a5c - __rust_maybe_catch_panic\n   8:      0x10b352eb5 - _$LT$F$u20$as$u20$alloc..boxed..FnBox$LT$A$GT$$GT$::call_box::h651dedb755194a8c\n   9:        0x10b4e5c4b - std::sys::imp::thread::Thread::new::thread_start::h48c72bb09587cbc3\n  10:     0x7fff515f0660 - _pthread_body\n  11:     0x7fff515f050c- _pthread_start',
  type: 'RuntimeError',
  seleniumStack:
   { type: 'UnknownError',
     message: 'An unknown server-side error occurred while processing the command.',
     orgStatusMessage: 'connection refused\nBuild info: version: \'3.4.0\', revision: \'unknown\', time: \'unknown\'\nSystem info: host: \'RITESHs-MacBook-Pro.local\', ip: \'192.168.1.2\', os.name: \'Mac OS X\', os.arch: \'x86_64\', os.version: \'10.13.6\', java.version: \'1.8.0_171\'\nDriver info: driver.version: FirefoxDriver\nremote stacktrace: stack backtrace:\n   0:        0x10b43d49e - backtrace::backtrace::trace::h3ab5720c483fe461\n   1:        0x10b43d4dc - backtrace::capture::Backtrace::new::h096accf58447e0d5\n2:        0x10b376534 - webdriver::error::WebDriverError::new::hc0958d01acda7bfc\n   3:        0x10b37d300 - geckodriver::marionette::MarionetteHandler::create_connection::h59a68c8dfef48e54\n   4:        0x10b35cd3c - _$LT$webdriver..server..Dispatcher$LT$T$C$$u20$U$GT$$GT$::run::h5a26ba0bb4fdb139\n   5:        0x10b3350c5 - std::sys_common::backtrace::__rust_begin_short_backtrace::h3f868f7a1a12bdcc\n   6:        0x10b33fd2d - std::panicking::try::do_call::hfce1ad2a948c3632\n   7:        0x10b4e9a5c - __rust_maybe_catch_panic\n   8:        0x10b352eb5 - _$LT$F$u20$as$u20$alloc..boxed..FnBox$LT$A$GT$$GT$::call_box::h651dedb755194a8c\n   9:        0x10b4e5c4b - std::sys::imp::thread::Thread::new::thread_start::h48c72bb09587cbc3\n  10:     0x7fff515f0660 - _pthread_body\n  11:     0x7fff515f050c - _pthread_start' } }

can anyone please guideline how to resolve this error ??


回答1:


Seems there is a bit of messup. You have mentioned:

  • Downloaded latest selenium-standalone-server version 3.14
  • Command

    java -jar -Dwebdriver.gecko.driver=./geckodriver selenium-server-standalone-3.5.3.jar
                                observe the versioning ^^^ info
    
  • Log messages reflect:

    Build info: version: \'3.4.0\'
    

Solution

  • Upgrade Selenium to current levels Version 3.14.0.
  • Upgrade GeckoDriver to GeckoDriver v0.22.0 level.
  • Upgrade Firefox version to Firefox v62.0 levels.
  • Execute your test


来源:https://stackoverflow.com/questions/52571698/unknownerror-message-an-unknown-server-side-error-occurred-while-processing

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!