Skip to content

Update ivar name in send_fail_response#435

Merged
ko1 merged 1 commit intoruby:masterfrom
st0012:fix-cdp-error-response
Dec 15, 2021
Merged

Update ivar name in send_fail_response#435
ko1 merged 1 commit intoruby:masterfrom
st0012:fix-cdp-error-response

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

@st0012 st0012 force-pushed the fix-cdp-error-response branch from d90f043 to 3595964 Compare December 15, 2021 15:56
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants