Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[馃悰 Bug]: Fairly meaningless backtrace information is added at the expense of backtrace locations. #13221

Open
ioquatix opened this issue Nov 30, 2023 · 4 comments 路 May be fixed by #13222
Open
Labels
C-rb help wanted Issues looking for contributions I-defect

Comments

@ioquatix
Copy link

ioquatix commented Nov 30, 2023

What happened?

This line of code here:

ex.set_backtrace(backtrace + ex.backtrace)
causes Exception#backtrace_locations to return nil.

This is problematic for test frameworks that use the detailed information in backtrace_locations to format errors more effectively.

In addition, the actual information that is added to the backtrace seems less than useful.

I understand the intention of this "feature" but I think significantly more is lost than is gained by including the backtrace from the web server. At present, this is causing my test harness to blow up as it expects backtrace_locations to at least not be nil.

How can we reproduce the issue?

Any code that triggers an error from the Chrome browser, e.g. finding an element that doesn't exist.

Relevant log output

irb(Sus::Output::Backtrace):002:0> exception.backtrace
=> 
["#0 0x555f3355f6d4 <unknown>",                                              
 "#1 0x555f33264187 <unknown>",                                              
 "#2 0x555f332a2717 <unknown>",                                              
 "#3 0x555f332cc132 <unknown>",                                              
 "#4 0x555f332a042a <unknown>",                                              
 "#5 0x555f332cc3ae <unknown>",                                              
 "#6 0x555f332e2f65 <unknown>",                                              
 "#7 0x555f332cbed3 <unknown>",                                              
 "#8 0x555f3329e420 <unknown>",                                              
 "#9 0x555f3329fa93 <unknown>",                                              
 "#10 0x555f335324c0 <unknown>",                                             
 "#11 0x555f33535780 <unknown>",                                             
 "#12 0x555f335351fa <unknown>",                                             
 "#13 0x555f33535c95 <unknown>",                                             
 "#14 0x555f3352465b <unknown>",
 "#15 0x555f33536080 <unknown>",
 "#16 0x555f3350f830 <unknown>",
 "#17 0x555f3354fee7 <unknown>",
 "#18 0x555f335500f5 <unknown>",
 "#19 0x555f3355ecce <unknown>",
 "#20 0x7fae7a6aa9eb <unknown>",
 "/home/samuel/.gem/ruby/3.2.2/gems/selenium-webdriver-4.15.0/lib/selenium/webdriver/remote/response.rb:55:in `assert_ok'",
 "/home/samuel/.gem/ruby/3.2.2/gems/selenium-webdriver-4.15.0/lib/selenium/webdriver/remote/response.rb:34:in `initialize'",
 "/home/samuel/.gem/ruby/3.2.2/gems/selenium-webdriver-4.15.0/lib/selenium/webdriver/remote/http/common.rb:83:in `new'",
 "/home/samuel/.gem/ruby/3.2.2/gems/selenium-webdriver-4.15.0/lib/selenium/webdriver/remote/http/common.rb:83:in `create_response'",
 "/home/samuel/.gem/ruby/3.2.2/gems/selenium-webdriver-4.15.0/lib/selenium/webdriver/remote/http/default.rb:103:in `request'",
 "/home/samuel/.gem/ruby/3.2.2/gems/selenium-webdriver-4.15.0/lib/selenium/webdriver/remote/http/common.rb:59:in `call'",
 "/home/samuel/.gem/ruby/3.2.2/gems/selenium-webdriver-4.15.0/lib/selenium/webdriver/remote/bridge.rb:601:in `execute'",
 "/home/samuel/.gem/ruby/3.2.2/gems/selenium-webdriver-4.15.0/lib/selenium/webdriver/remote/bridge.rb:400:in `clear_element'",
 "/home/samuel/.gem/ruby/3.2.2/gems/selenium-webdriver-4.15.0/lib/selenium/webdriver/common/element.rb:223:in `clear'",
 "/home/samuel/Projects/oriontransfer/socketry.io/fixtures/website_context.rb:96:in `fill_in'",
 "test/pages/customer.rb:30:in `block (3 levels) in <top (required)>'",
 "/home/samuel/.gem/ruby/3.2.2/gems/sus-0.23.0/lib/sus/it.rb:50:in `block in handle_skip'",
 "/home/samuel/.gem/ruby/3.2.2/gems/sus-0.23.0/lib/sus/it.rb:49:in `catch'",
 "/home/samuel/.gem/ruby/3.2.2/gems/sus-0.23.0/lib/sus/it.rb:49:in `handle_skip'",
 "/home/samuel/.gem/ruby/3.2.2/gems/sus-0.23.0/lib/sus/it.rb:43:in `block (2 levels) in call'",
 "/home/samuel/.gem/ruby/3.2.2/gems/sus-0.23.0/lib/sus/base.rb:28:in `around'",
 "/home/samuel/.gem/ruby/3.2.2/gems/sus-fixtures-async-0.1.2/lib/sus/fixtures/async/reactor_context.rb:69:in `block (2 levels) in around'",
 "/home/samuel/.gem/ruby/3.2.2/gems/sus-fixtures-async-0.1.2/lib/sus/fixtures/async/reactor_context.rb:36:in `block in run_with_timeout'",
 "/home/samuel/.gem/ruby/3.2.2/gems/async-2.6.5/lib/async/task.rb:160:in `block in run'",
 "/home/samuel/.gem/ruby/3.2.2/gems/async-2.6.5/lib/async/task.rb:330:in `block in schedule'"]
irb(Sus::Output::Backtrace):003:0> exception.backtrace_locations
=> nil

Operating System

Arch Linux

Selenium version

Ruby selenium-webdriver-4.15.0

What are the browser(s) and version(s) where you see this issue?

Chromium 119.0.6045.159 Arch Linux

What are the browser driver(s) and version(s) where you see this issue?

ChromeDriver 119.0.6045.159 (eaa767197fa7dd412133d1b84f7eb60da43409c9-refs/branch-heads/6045@{#1327})

Are you using Selenium Grid?

No response

Copy link

@ioquatix, thank you for creating this issue. We will troubleshoot it as soon as we can.


Info for maintainers

Triage this issue by using labels.

If information is missing, add a helpful comment and then I-issue-template label.

If the issue is a question, add the I-question label.

If the issue is valid but there is no time to troubleshoot it, consider adding the help wanted label.

If the issue requires changes or fixes from an external project (e.g., ChromeDriver, GeckoDriver, MSEdgeDriver, W3C), add the applicable G-* label, and it will provide the correct link and auto-close the issue.

After troubleshooting the issue, please add the R-awaiting answer label.

Thank you!

@iszambrano
Copy link

@ioquatix, thank you for creating this issue. We will troubleshoot it as soon as we can.

Info for maintainers

I would like to contribute! Are there any maintainers that would be willing to review/accept my work?

@pujagani pujagani added the C-rb label Dec 6, 2023
@pujagani
Copy link
Contributor

pujagani commented Dec 6, 2023

We are happy to receive contributions. For Ruby, @titusfortner can help review.

@titusfortner titusfortner added this to the 4.17 milestone Dec 11, 2023
@titusfortner titusfortner modified the milestones: 4.17, 4.18 Jan 20, 2024
@diemol diemol modified the milestones: 4.18, 4.19 Feb 16, 2024
@titusfortner titusfortner added help wanted Issues looking for contributions and removed R-awaiting merge labels Feb 25, 2024
@titusfortner titusfortner removed this from the 4.19 milestone Feb 25, 2024
Copy link

This issue is looking for contributors.

Please comment below or reach out to us through our IRC/Slack/Matrix channels if you are interested.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-rb help wanted Issues looking for contributions I-defect
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants