Skip to content

overrideDebug reports do not render Errors correctly, just {} #2908

@michaelfig

Description

@michaelfig

Describe the bug

The overrideDebug reports no longer output error messages and stack traces. This makes debugging code with many modules impossible to find where something trips over the override mistake.

Steps to reproduce

  1. Go to the top of the endo checkout
  2. yarn install
  3. Run sh ./repro.sh, whose contents are:
#! /bin/sh
DEBUG_LOCKDOWN_OPTIONS='{"errorTaming":"unsafe","stackFiltering":"verbose","overrideTaming":"severe","overrideDebug":["constructor"]}'

cat <<EOF > ./override-mistake.mjs
import '@endo/init';

const o = new Object();
o.constructor = 42;
EOF
LOCKDOWN_OPTIONS=$DEBUG_LOCKDOWN_OPTIONS node ./override-mistake.mjs
  1. Observe output:
$ ./repro.sh
'@endo/lockdown' sniffed and found a 'LOCKDOWN_OPTIONS' environment variable

SES Enabling property overrides
  {}
$

Note that the Error, whose stack trace would have given valuable debugging information, is rendered just as {}.

Expected behavior

Render an error indicating the constructor override mistake instead of just {}.

Platform environment

  • What OS are you using? macOS Sequoia 15.5
  • What version of Node.js? v20.18.3
  • Is there anything special/unusual about your platform? No, not really.
  • What version of Endo are you using? @endo/[email protected]

Additional context

n/a

Screenshots

Console output as above, not pretty pictures.

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingecosystem-compatibilityTracks a compatibility issue in a third-party package or packages.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions