-
-
Notifications
You must be signed in to change notification settings - Fork 8.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
::TimeoutError is deprecated #6122
Comments
Because you're calling a method which is meta-programming in the error. Can you provide a bit more of a stacktrace. I'll happily fix this up. But need a bit more knowledge to confirm you're triggering this in the way I think. |
Apparently |
@luke-hill - Here's how's it's being used which ultimately triggers the deprecation warning: https://github.com/ninp0/csi/blob/master/lib/csi/plugins/owasp_zap.rb#L445-L465 Here's how the this_browser_obj in the code above is created: https://github.com/ninp0/csi/blob/master/lib/csi/plugins/transparent_browser.rb#L35-L73 |
@ninp0 What I was interested in was the 2nd / 3rd lines of the stacktrace. Not the source. As discussed above, something is generating the string |
@luke-hill no stack trace - just a warning (see csi[v0.3.16]:005):
The warning is produced when the CSI::Plugins::OwaspZap.request method is called: https://github.com/ninp0/csi/blob/master/lib/csi/plugins/owasp_zap.rb#L434-L465 which should always return through the Timeout::Error block (ultimately we're making a non-blocking request so we can proceed w/ execution and intercept/tamper with the request in zap...is there an easier way to do a non-blocking request besides rescuing Timeout::Error?): the rescue in the Timeout::Error block returns a string object: I notice on the selenium side https://github.com/SeleniumHQ/selenium/blob/master/rb/lib/selenium/webdriver/common/error.rb#L35 is executed when the code variable is a String class. Is this being triggered due to returning a string once Timeout::Error is rescued? One last thing to note is that watir is being used to instantiate browser_obj (see csi[v0.3.16]:003), which may be the source of this: https://github.com/watir/watir/blob/fd7820baff3e56d79b06bec1507034d68a9de6e6/lib/watir/wait.rb#L49 I hope that helps! |
I've never used that plugin and I'm not quite sure looking at the code stack what the heck is happening (It is a bit manic) Whilst I understand where the error code is being generated it's a bit much to just change that error code as that is a breaking change. Qu) Are you able to remove those rescues? Because the error being generated by selenium is If we had a stacktrace that showed where that string was coming from it would be a lot easier. |
ok, added a full dump of the stack trace in the rescue:
|
Looks like this was broken in - ee29dab#diff-1828458d7e816f8e53b81cf1952df377 - when the |
#6137 should fix this |
Please try 3.14.0 - it should be fixed there. |
Meta -
OS:
OSX & Linux
Selenium Version:
selenium-webdriver 3.13.0
Browser:
Firefox
/usr/local/rvm/gems/ruby-2.5.1@csi/gems/selenium-webdriver-3.12.0/lib/selenium/webdriver/common/error.rb:35: warning: constant ::TimeoutError is deprecated
Please change to Timeout::Error to avoid deprecation warnings.
The text was updated successfully, but these errors were encountered: