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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update ivar name in send_fail_response #435

Merged
merged 1 commit into from
Dec 15, 2021

Conversation

st0012
Copy link
Member

@st0012 st0012 commented Dec 15, 2021

There's no @web_sock anymore. So when sending error response it'll cause:

❯ exe/rdbg --open=chrome target.rb
DEBUGGER: Debugger can attach via TCP/IP (127.0.0.1:49402)
DEBUGGER: wait for debugger connection...
DEBUGGER: Connected.
#<Thread:0x00007f8bfd23a4c0@DEBUGGER__::SESSION@server /Users/st0012/projects/debug/lib/debug/session.rb:148 run> terminated with exception (report_on_exception is true):
Traceback (most recent call last):
        6: from /Users/st0012/projects/debug/lib/debug/session.rb:168:in `block in activate'
        5: from /Users/st0012/projects/debug/lib/debug/session.rb:198:in `session_server_main'
        4: from /Users/st0012/projects/debug/lib/debug/session.rb:295:in `process_event'
        3: from /Users/st0012/projects/debug/lib/debug/server_cdp.rb:590:in `cdp_event'
        2: from /Users/st0012/projects/debug/lib/debug/server_cdp.rb:509:in `fail_response'
        1: from /Users/st0012/projects/debug/lib/debug/server_cdp.rb:486:in `respond_fail'
/Users/st0012/projects/debug/lib/debug/server_cdp.rb:247:in `send_fail_response': {:id=>63, :error=>"Error: Can not evaluate: \\"bar\\""} is not a symbol nor a string (TypeError)

The error is confusing as it essentially calls nil.send, so it expects the argument to be a symbol.

@st0012
Copy link
Member Author

st0012 commented Dec 15, 2021

@ono-max can you give this a look? thx

Copy link
Member

@ono-max ono-max left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch.
Thank you!

@ko1 ko1 merged commit 1f18dc5 into ruby:master Dec 15, 2021
@st0012 st0012 deleted the fix-cdp-error-response branch December 15, 2021 22:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants