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

Huge wall of text printed on uncaught exceptions in Node.js #94

Open
lastmjs opened this issue Jul 16, 2024 · 4 comments
Open

Huge wall of text printed on uncaught exceptions in Node.js #94

lastmjs opened this issue Jul 16, 2024 · 4 comments

Comments

@lastmjs
Copy link

lastmjs commented Jul 16, 2024

There is a problem that binaryen.js seems to be embodied with in Node.js where the entire minified contents of binaryen.js is printed to the terminal on uncaught exceptions. The issue has been reported in multiple places, and the root of the issue seems to be in Node.js. The Node.js issue hasn't seen any activity.

I'm hoping raising the issue here might lead to some insight, workarounds, or finally getting it fixed in Node.js.

Here are the existing issues:

@CountBleck
Copy link
Member

We're aware of this issue (which is ultimately Node's fault). --enable-source-maps used to work, but it stopped working since v16 or maybe v18 (I don't remember off the top of my head, and I don't know why this changed).

I'm pretty sure the problem would be fixed if the Wasm wasn't bundled as a large base64 string, but I don't know whether that'd break existing uses of binaryen.js.

@CountBleck
Copy link
Member

CountBleck commented Jul 16, 2024

@lastmjs after playing around with fnm, Node v15.14.0 prints out the large stack trace, but using --enable-source-maps, I get this instead:

TypeError: binaryen.createModule is not a function
    at file:///home/lordblumiere/Projects/bjstest/index.js:3:25
    at <anonymous> (<anonymous>)

This doesn't work for v16.20.2, however; --enable-source-maps does nothing to fix the issue.

@CountBleck
Copy link
Member

It seems to have broken between v16.17.1 and v16.18.0.

@kripken
Copy link
Collaborator

kripken commented Jul 18, 2024

With WebAssembly/binaryen#6764 landed, this should be fixed in the next build of binaryen.js, but please verify that and let me know if not.

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

No branches or pull requests

3 participants