Error running ruby script with external Appium server

Asked

Viewed 16 times

1

I’m trying to run a very basic script in Ruby. The idea is to simply validate that my appium script runs using an external appium server.

The connection to the remote phone is done normally and the Appium opens the application, but soon after that I get an error message and the script is terminated.

relevant information Appium 1.20.2 Ruby 2.6.3

error:

Traceback (most recent call last):
    10: from test.rb:26:in `<main>'
     9: from /Library/Ruby/Gems/2.6.0/gems/appium_lib-10.6.0/lib/appium_lib/driver.rb:561:in `start_driver'
     8: from /Library/Ruby/Gems/2.6.0/gems/appium_lib-10.6.0/lib/appium_lib/driver.rb:382:in `appium_server_version'
     7: from /Library/Ruby/Gems/2.6.0/gems/appium_lib_core-3.11.1/lib/appium_lib_core/driver.rb:459:in `appium_server_version'
     6: from /Library/Ruby/Gems/2.6.0/gems/selenium-webdriver-3.142.7/lib/selenium/webdriver/common/driver_extensions/has_remote_status.rb:25:in `remote_status'
     5: from /Library/Ruby/Gems/2.6.0/gems/selenium-webdriver-3.142.7/lib/selenium/webdriver/remote/w3c/bridge.rb:55:in `status'
     4: from /Library/Ruby/Gems/2.6.0/gems/selenium-webdriver-3.142.7/lib/selenium/webdriver/remote/w3c/bridge.rb:567:in `execute'
     3: from /Library/Ruby/Gems/2.6.0/gems/selenium-webdriver-3.142.7/lib/selenium/webdriver/remote/bridge.rb:167:in `execute'
     2: from /Library/Ruby/Gems/2.6.0/gems/appium_lib_core-3.11.1/lib/appium_lib_core/common/base/http_default.rb:98:in `call'
     1: from /Library/Ruby/Gems/2.6.0/gems/selenium-webdriver-3.142.7/lib/selenium/webdriver/remote/http/default.rb:114:in `request'
/Library/Ruby/Gems/2.6.0/gems/selenium-webdriver-3.142.7/lib/selenium/webdriver/remote/http/common.rb:98:in `create_response': unexpected response, code=404, content-type="text/html" (Selenium::WebDriver::Error::WebDriverError)
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Error</title>
</head>
<body>
<pre>Cannot GET /api/mobile/wd/hub/status</pre>
</body>
</html>
    3: from test.rb:26:in `<main>'
    2: from /Library/Ruby/Gems/2.6.0/gems/appium_lib-10.6.0/lib/appium_lib/driver.rb:561:in `start_driver'
    1: from /Library/Ruby/Gems/2.6.0/gems/appium_lib-10.6.0/lib/appium_lib/driver.rb:381:in `appium_server_version'
/Library/Ruby/Gems/2.6.0/gems/appium_lib-10.6.0/lib/appium_lib/driver.rb:384:in `rescue in appium_server_version': Appium::Core::Error::ServerError (Appium::Core::Error::ServerError)```
  • It doesn’t seem to be an error with your script, but that the server the script tried to access was out of order, or returned 404.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.