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

Missing .stack value on node 21 #302

Open
kanongil opened this issue Oct 30, 2023 · 0 comments
Open

Missing .stack value on node 21 #302

kanongil opened this issue Oct 30, 2023 · 0 comments
Labels
bug Bug or defect

Comments

@kanongil
Copy link
Contributor

Support plan

  • is this issue currently blocking your project? (yes/no): no
  • is this issue affecting a production system? (yes/no): no

Context

  • node version: v21.1.0
  • module version with issue: 10.0.1
  • last module version without issue:
  • environment (e.g. node, browser, native): node
  • used with (e.g. hapi application, another framework, standalone, ...): standalone
  • any other relevant information:

This issue is caused by a V8 engine upgrade that changes the behaviour of Hoek.clone(). A fix is proposed in: hapijs/hoek#390

What are you trying to achieve or the steps to reproduce?

const error = new Error("fail");
const boom = Boom.badImplementation(error);

assert.equal(boom.stack, error.stack);

What was the result you got?

Uncaught AssertionError [ERR_ASSERTION]: undefined == 'Error: fail\n' +
  '    at REPL2:1:15\n' +
  '    at ContextifyScript.runInThisContext (node:vm:121:12)\n' +
  '    at REPLServer.defaultEval (node:repl:599:22)\n' +
  '    at bound (node:domain:432:15)\n' +
  '    at REPLServer.runBound [as eval] (node:domain:443:12)\n' +
  '    at REPLServer.onLine (node:repl:929:10)\n' +
  '    at REPLServer.emit (node:events:527:35)\n' +
  '    at REPLServer.emit (node:domain:488:12)\n' +
  '    at [_onLine] [as _onLine] (node:internal/readline/interface:416:12)\n' ...
    at REPL5:1:8
    at ContextifyScript.runInThisContext (node:vm:121:12)
    at REPLServer.defaultEval (node:repl:599:22)
    at bound (node:domain:432:15)
    at REPLServer.runBound [as eval] (node:domain:443:12)
    at REPLServer.onLine (node:repl:929:10)
    at REPLServer.emit (node:events:527:35)
    at REPLServer.emit (node:domain:488:12)
    at [_onLine] [as _onLine] (node:internal/readline/interface:416:12)
    at [_line] [as _line] (node:internal/readline/interface:887:18) {
  generatedMessage: true,
  code: 'ERR_ASSERTION',
  actual: undefined,
  expected: 'Error: fail\n' +
    '    at REPL2:1:15\n' +
    '    at ContextifyScript.runInThisContext (node:vm:121:12)\n' +
    '    at REPLServer.defaultEval (node:repl:599:22)\n' +
    '    at bound (node:domain:432:15)\n' +
    '    at REPLServer.runBound [as eval] (node:domain:443:12)\n' +
    '    at REPLServer.onLine (node:repl:929:10)\n' +
    '    at REPLServer.emit (node:events:527:35)\n' +
    '    at REPLServer.emit (node:domain:488:12)\n' +
    '    at [_onLine] [as _onLine] (node:internal/readline/interface:416:12)\n' +
    '...',
  operator: '=='

What result did you expect?

No assertion error, as on node v20.

@kanongil kanongil added the support Questions, discussions, and general support label Oct 30, 2023
@kanongil kanongil added bug Bug or defect and removed support Questions, discussions, and general support labels Dec 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug or defect
Projects
None yet
Development

No branches or pull requests

1 participant