Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Visiting a relative URL doesn't work when server hasn't been started. #861

Closed
jnicklas opened this Issue Nov 14, 2012 · 4 comments

Comments

Projects
None yet
4 participants
Collaborator

jnicklas commented Nov 14, 2012

See this gist for an example of this issue: https://gist.github.com/a1a5fe787dfc698e05ba

This seems to occur when:

  • Capybara.app is not set or Capybara.run_server is false
  • Capybara.app_host is set
  • visit is called with a relative URL

In which case, an Exception like the following is thrown:

Selenium::WebDriver::Error::UnknownError: Component returned failure code: 0x804b000a (NS_ERROR_MALFORMED_URI) [nsIIOService.newURI]
from /Users/dev/.rvm/gems/ruby-1.9.3-p286/gems/selenium-webdriver-2.26.0/lib/selenium/webdriver/remote/response.rb:52:in `assert_ok'

pietia commented Nov 14, 2012

thx!

@jnicklas jnicklas closed this in 7da8833 Nov 14, 2012

Collaborator

jnicklas commented Nov 14, 2012

Pretty easy fix, I will hold off with a new gem release for a day or two, just in case any more issues show up.

I am running Capybara 2.0 with Turnip using Selenium web driver and getting these errors:

D:\Workplaces\Ruby\test>rspec spec
*** LOG addons.manager: Application has been upgraded
*** LOG addons.xpi: startup
*** LOG addons.xpi: Skipping unavailable install location app-system-local
*** LOG addons.xpi: Skipping unavailable install location app-system-share
*** LOG addons.xpi: checkForChanges
*** LOG addons.xpi-utils: Opening database
*** LOG addons.xpi-utils: Creating database schema
*** LOG addons.xpi: New add-on fxdriver@googlecode.com installed in app-profile
*** Blocklist::_loadBlocklistFromFile: blocklist is disabled
*** LOG addons.xpi: New add-on {972ce4c6-7e08-4474-a285-3208198ce6fd} installed
in app-global
*** LOG addons.xpi: New add-on {BBDA0591-3099-440a-AA10-41764D9DB4DB} installed
in winreg-app-global
*** LOG addons.xpi: Updating database with changes to installed add-ons
*** LOG addons.xpi-utils: Updating add-on states
*** LOG addons.xpi-utils: Writing add-ons list
*** LOG addons.manager: shutdown
*** LOG addons.xpi: shutdown
*** LOG addons.xpi-utils: shutdown
*** LOG addons.xpi-utils: Database closed
*** LOG addons.xpi: startup
*** LOG addons.xpi: Skipping unavailable install location app-system-local
*** LOG addons.xpi: Skipping unavailable install location app-system-share
*** LOG addons.xpi: checkForChanges
*** LOG addons.xpi: No changes found
*** Blocklist::_loadBlocklistFromFile: blocklist is disabled
F

Failures:

  1. Search Search text on youtube Allows searches for general terms
    Failure/Error: Unable to find matching line from backtrace
    Selenium::WebDriver::Error::UnknownError:
    Component returned failure code: 0x80520001 (NS_ERROR_FILE_UNRECOGNIZED_P
    ATH) [nsIWebNavigation.loadURI]

    C:/Ruby200/lib/ruby/gems/2.0.0/gems/selenium-webdriver-2.38.0/lib/seleniu

m/webdriver/remote/response.rb:51:in assert_ok' # C:/Ruby200/lib/ruby/gems/2.0.0/gems/selenium-webdriver-2.38.0/lib/seleniu m/webdriver/remote/response.rb:15:ininitialize'
# C:/Ruby200/lib/ruby/gems/2.0.0/gems/selenium-webdriver-2.38.0/lib/seleniu
m/webdriver/remote/http/common.rb:59:in new' # C:/Ruby200/lib/ruby/gems/2.0.0/gems/selenium-webdriver-2.38.0/lib/seleniu m/webdriver/remote/http/common.rb:59:increate_response'
# C:/Ruby200/lib/ruby/gems/2.0.0/gems/selenium-webdriver-2.38.0/lib/seleniu
m/webdriver/remote/http/default.rb:66:in request' # C:/Ruby200/lib/ruby/gems/2.0.0/gems/selenium-webdriver-2.38.0/lib/seleniu m/webdriver/remote/http/common.rb:40:incall'
# C:/Ruby200/lib/ruby/gems/2.0.0/gems/selenium-webdriver-2.38.0/lib/seleniu
m/webdriver/remote/bridge.rb:634:in raw_execute' # C:/Ruby200/lib/ruby/gems/2.0.0/gems/selenium-webdriver-2.38.0/lib/seleniu m/webdriver/remote/bridge.rb:612:inexecute'
# C:/Ruby200/lib/ruby/gems/2.0.0/gems/selenium-webdriver-2.38.0/lib/seleniu
m/webdriver/remote/bridge.rb:110:in get' # C:/Ruby200/lib/ruby/gems/2.0.0/gems/selenium-webdriver-2.38.0/lib/seleniu m/webdriver/common/navigation.rb:14:into'
# C:/Ruby200/lib/ruby/gems/2.0.0/gems/capybara-2.2.0/lib/capybara/selenium/
driver.rb:102:in reset!' # C:/Ruby200/lib/ruby/gems/2.0.0/gems/capybara-2.2.0/lib/capybara/session.r b:79:inreset!'
# C:/Ruby200/lib/ruby/gems/2.0.0/gems/capybara-2.2.0/lib/capybara.rb:255:in
block in reset_sessions!' # C:/Ruby200/lib/ruby/gems/2.0.0/gems/capybara-2.2.0/lib/capybara.rb:255:ineach'
# C:/Ruby200/lib/ruby/gems/2.0.0/gems/capybara-2.2.0/lib/capybara.rb:255:in
reset_sessions!' # C:/Ruby200/lib/ruby/gems/2.0.0/gems/capybara-2.2.0/lib/capybara/rspec.rb: 20:inblock (2 levels) in <top (required)>'
# C:/Ruby200/lib/ruby/gems/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core/exam
ple_group.rb:471:in instance_eval' # C:/Ruby200/lib/ruby/gems/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core/exam ple_group.rb:471:ininstance_eval_with_rescue'
# C:/Ruby200/lib/ruby/gems/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core/exam
ple.rb:242:in instance_eval_with_rescue' # C:/Ruby200/lib/ruby/gems/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core/hook s.rb:31:inrun'
# C:/Ruby200/lib/ruby/gems/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core/hook
s.rb:85:in block in run' # C:/Ruby200/lib/ruby/gems/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core/hook s.rb:85:ineach'
# C:/Ruby200/lib/ruby/gems/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core/hook
s.rb:85:in run' # C:/Ruby200/lib/ruby/gems/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core/hook s.rb:446:inrun_hook'
# C:/Ruby200/lib/ruby/gems/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core/exam
ple_group.rb:350:in run_after_each_hooks' # C:/Ruby200/lib/ruby/gems/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core/exam ple.rb:298:inrun_after_each'
# C:/Ruby200/lib/ruby/gems/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core/exam
ple.rb:120:in block in run' # C:/Ruby200/lib/ruby/gems/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core/exam ple.rb:254:inwith_around_each_hooks'
# C:/Ruby200/lib/ruby/gems/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core/exam
ple.rb:111:in run' # C:/Ruby200/lib/ruby/gems/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core/exam ple_group.rb:390:inblock in run_examples'
# C:/Ruby200/lib/ruby/gems/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core/exam
ple_group.rb:386:in map' # C:/Ruby200/lib/ruby/gems/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core/exam ple_group.rb:386:inrun_examples'
# C:/Ruby200/lib/ruby/gems/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core/exam
ple_group.rb:371:in run' # C:/Ruby200/lib/ruby/gems/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core/exam ple_group.rb:372:inblock in run'
# C:/Ruby200/lib/ruby/gems/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core/exam
ple_group.rb:372:in map' # C:/Ruby200/lib/ruby/gems/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core/exam ple_group.rb:372:inrun'
# C:/Ruby200/lib/ruby/gems/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core/comm
and_line.rb:28:in block (2 levels) in run' # C:/Ruby200/lib/ruby/gems/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core/comm and_line.rb:28:inmap'
# C:/Ruby200/lib/ruby/gems/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core/comm
and_line.rb:28:in block in run' # C:/Ruby200/lib/ruby/gems/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core/repo rter.rb:58:inreport'
# C:/Ruby200/lib/ruby/gems/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core/comm
and_line.rb:25:in run' # C:/Ruby200/lib/ruby/gems/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core/runn er.rb:80:inrun'
# C:/Ruby200/lib/ruby/gems/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core/runn
er.rb:17:in `block in autorun'

Finished in 17.83 seconds
1 example, 1 failure

Failed examples:

rspec ./spec/test.feature:68 # Search Search text on youtube Allows searches for
general terms
!!! error running onStopped callback: TypeError: callback is not a function
*** LOG addons.manager: shutdown
*** LOG addons.xpi: shutdown

Other things:
1.Tests are executing correctly in browser but after execution complete this error is displayed and test displayed failed.

Collaborator

twalpole commented Mar 30, 2015

@cihad Please post how to questions on the mailing list as requested in the README, rather than tacking them on to issues that have been closed for well over 2 years

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