Skip to content

debugger: fix TypeError of list command in inspector repl - #42776

Merged
aduh95 merged 5 commits into
nodejs:masterfrom
cola119:fix-cannot-read-props-of-null-error
May 22, 2022
Merged

debugger: fix TypeError of list command in inspector repl#42776
aduh95 merged 5 commits into
nodejs:masterfrom
cola119:fix-cannot-read-props-of-null-error

Conversation

@cola119

@cola119cola119 commented Apr 18, 2022

Copy link
Copy Markdown
Member

Currently list command throws TypeError after the inspector is disconnected.
This PR fixed to throw ERR_DEBUGGER_ERROR instead of TypeError.

Fixes: #42775

@nodejs-github-botnodejs-github-bot added debugger Issues and PRs related to the debugger subsystem. needs-ci PRs that need a full CI run. labels Apr 18, 2022
Comment threadtest/sequential/test-debugger-list.js Outdated
@cola119
cola119 requested a review from aduh95April 20, 2022 01:46
@meixg

Copy link
Copy Markdown
Member

There is a ci failure that seems related to the change : https://github.com/nodejs/node/runs/6070093179?check_suite_focus=true

@cola119
cola119force-pushed the fix-cannot-read-props-of-null-error branch from ae6defd to cd64887CompareApril 20, 2022 03:16
@cola119

Copy link
Copy Markdown
MemberAuthor

@meixg Thank you. I fixed. (but test/parallel/test-cluster-primary-kill.js failed 🥲

@meixgmeixg added the request-ci Add this label to start a Jenkins CI on a PR. label Apr 20, 2022
@github-actionsgithub-actionsBot removed the request-ci Add this label to start a Jenkins CI on a PR. label Apr 20, 2022
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@aduh95

aduh95 commented Apr 20, 2022

Copy link
Copy Markdown
Contributor

Based on the CI failures, it looks like this is quite flaky on some configurations 🤔 Any idea what might be causing this?

@cola119

Copy link
Copy Markdown
MemberAuthor

@aduh95 It seems to be fixed by 2206bd0fb908491a21ae16f5db4beeee72a038bb

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can this be refactored into an async function with awaits rather than a long then chain?

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

@jasnell done fea46820e4dc50e74340bc58e10c898bebfe7ed2

@cola119
cola119 requested a review from jasnellApril 21, 2022 02:58
@aduh95aduh95 added the request-ci Add this label to start a Jenkins CI on a PR. label Apr 21, 2022
@github-actionsgithub-actionsBot removed the request-ci Add this label to start a Jenkins CI on a PR. label Apr 21, 2022
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@aduh95

Copy link
Copy Markdown
Contributor

There seems to be some related CI failures

node:internal/process/promises:288
triggerUncaughtException(err, true /* fromPromise */);
^
AssertionError [ERR_ASSERTION]: The input did not match the regular expression /Uncaught Error \[ERR_DEBUGGER_ERROR\]: Requires execution to be paused/. Input:
'debug> '
at /home/iojs/build/workspace/node-test-commit-linux/test/sequential/test-debugger-list.js:26:10
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
generatedMessage: true,
code: 'ERR_ASSERTION',
actual: 'debug> ',
expected: /Uncaught Error \[ERR_DEBUGGER_ERROR\]: Requires execution to be paused/,
operator: 'match'
}
Node.js v19.0.0-pre

@cola119
cola119force-pushed the fix-cannot-read-props-of-null-error branch from fea4682 to 88f48e0CompareApril 22, 2022 03:59
@aduh95aduh95 added the request-ci Add this label to start a Jenkins CI on a PR. label Apr 22, 2022
@github-actionsgithub-actionsBot removed the request-ci Add this label to start a Jenkins CI on a PR. label Apr 22, 2022
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@aduh95aduh95 added commit-queue Add this label to land a pull request using GitHub Actions. commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. and removed commit-queue Add this label to land a pull request using GitHub Actions. labels May 22, 2022
@aduh95
aduh95 merged commit cbb92b0 into nodejs:masterMay 22, 2022
@aduh95

Copy link
Copy Markdown
Contributor

Landed in cbb92b0

bengl pushed a commit that referenced this pull request May 30, 2022
PR-URL: #42776Fixes: #42775
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
@benglbengl mentioned this pull request May 31, 2022
juanarbol pushed a commit that referenced this pull request May 31, 2022
PR-URL: #42776Fixes: #42775
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
@danielleadams

Copy link
Copy Markdown
Contributor

@cola119 This breaks the test suite when trying to land in v16.x. Do you mind opening up a backport PR to v16.x-staging? (docs) Thank you.

cola119 added a commit to cola119/node that referenced this pull request Jun 28, 2022
PR-URL: nodejs#42776Fixes: nodejs#42775
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
targos pushed a commit that referenced this pull request Jul 18, 2022
PR-URL: #42776Fixes: #42775
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
targos pushed a commit that referenced this pull request Jul 31, 2022
PR-URL: #42776Fixes: #42775
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
@targostargos mentioned this pull request Aug 3, 2022
guangwong pushed a commit to noslate-project/node that referenced this pull request Oct 10, 2022
PR-URL: nodejs/node#42776Fixes: nodejs/node#42775
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author readyPRs that have at least one approval, no pending requests for changes, and a CI started.commit-queue-squashAdd this label to instruct the Commit Queue to squash all the PR commits into the first one.debuggerIssues and PRs related to the debugger subsystem.needs-ciPRs that need a full CI run.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Debugger's list command throws TypeError: Cannot read properties of null (reading 'list')

9 participants

@cola119@meixg@nodejs-github-bot@aduh95@danielleadams@jasnell@austinkelleher@watilde@targos