Skip to content

create_session attempt to throw non-existent error type Appium::Core::Error::WebDriverError #66

Description

@sehrgut

This is a

  • Bug report
  • Question
  • Feature Request

Summary

When appium server returns no session ID, instead of reporting this error, appium_lib_core throws the following exception:

NameError: uninitialized constant Appium::Core::Error::WebDriverError
Did you mean?  Appium::Core::Error::ServerError
    /Users/xxxx/.rvm/gems/ruby-2.5.0/gems/appium_lib_core-1.3.3/lib/appium_lib_core/common/base/bridge.rb:108:in `create_session'
    /Users/xxxx/.rvm/gems/ruby-2.5.0/gems/appium_lib_core-1.3.3/lib/appium_lib_core/common/base/bridge.rb:31:in `handshake'
    /Users/xxxx/.rvm/gems/ruby-2.5.0/gems/appium_lib_core-1.3.3/lib/appium_lib_core/common/base/driver.rb:18:in `initialize'
    /Users/xxxx/.rvm/gems/ruby-2.5.0/gems/appium_lib_core-1.3.3/lib/appium_lib_core/driver.rb:168:in `new'
    /Users/xxxx/.rvm/gems/ruby-2.5.0/gems/appium_lib_core-1.3.3/lib/appium_lib_core/driver.rb:168:in `start_driver'
    /Users/xxxx/.rvm/gems/ruby-2.5.0/gems/appium_lib-9.10.0/lib/appium_lib/driver.rb:506:in `start_driver'

This appears to be a Selenium Webdriver error incorrectly namespaced?

https://github.com/appium/ruby_lib_core/blob/master/lib/appium_lib_core/common/base/bridge.rb#L108
https://github.com/SeleniumHQ/selenium/blob/master/rb/lib/selenium/webdriver/common/error.rb#L41

Environment

  • ruby_lib_core version: 1.3.3
  • Mobile platform/version/device under test: iOS/9.3.2/iPhone 5c

Actual behaviour and steps to reproduce

  1. Set capabilities such that target appium server won't return a session ID (or mock such a response by mitm: this occurs in an obscure production situation that I haven't fully debugged, so I don't know how to trigger this directly.)
  2. Create and start driver with those capabilities.
  3. Observe the attempt to report "no sessionId in returned payload" from create_session fails because the type Appium::Core::Error::WebDriverError does not exist.

Expected behaviour

Error with message "no sessionId in returned payload" should be thrown.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions