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

Single executable application: setting disableExperimentalSEAWarning has no effect #50547

Closed
subfuzion opened this issue Nov 4, 2023 · 6 comments

Comments

@subfuzion
Copy link

subfuzion commented Nov 4, 2023

Version

20.1.0

Platform

Darwin odin 23.1.0 Darwin Kernel Version 23.1.0: Mon Oct 9 21:28:45 PDT 2023; root:xnu-10002.41.9~6/RELEASE_ARM64_T6020 arm64

Subsystem

Single executable applications

What steps will reproduce the bug?

The same steps from the documentation for creating a single executable application, with the addition of setting the disableExperimentalSEAWarning flag.

echo 'console.log(`Hello, ${process.argv[2]}!`);' > hello.js
echo '{ "main": "hello.js", "output": "sea-prep.blob", "disableExperimentalSEAWarning": true }' > sea-config.json
node --experimental-sea-config  sea-config.json
cp $(command -v node) hello
codesign --remove-signature hello
npx postject hello NODE_SEA_BLOB sea-prep.blob \
    --sentinel-fuse NODE_SEA_FUSE_fce680ab2cc467b6e072b8b5df1996b2 \
    --macho-segment-name NODE_SEA
codesign --sign - hello

How often does it reproduce? Is there a required condition?

Every time.

What is the expected behavior? Why is that the expected behavior?

According to documentation here, the experimental warning when running the executable can be suppressed with configuration:

sea-config.json

{
  "main": "bundle.js",
  "output": "app.blob",
  "disableExperimentalSEAWarning": true
}

What do you see instead?

$ ./hello sea
Hello, sea!
(node:54533) ExperimentalWarning: Single executable application is an experimental feature and might change at any time
(Use `hello --trace-warnings ...` to show where the warning was created)

Additional information

Using the following environment variables to suppress the warning does work:

  • NODE_NO_WARNINGS=1 ./hello
  • NODE_OPTIONS=--no-warnings ./hello

However, I'd like the configuration to work for suppressing the warning.

@RaisinTen
Copy link
Contributor

I pasted the list of commands you shared on my terminal and ran ./hello sea and it did not print the experimental warning, so I'm not able to reproduce this issue. I tried this on both my Intel and Arm64 Macs.

@bnoordhuis
Copy link
Member

20.1.0

Please test with the latest v20.

@subfuzion
Copy link
Author

subfuzion commented Nov 4, 2023

@bnoordhuis Great suggestion, I should have thought to check myself.

  • I just confirmed it works with 20.9.0 lts and 21.1.0 current.
  • Also confirmed that it worked on my larger real-world project that uses webpack for bundling.

This resolves the issue for me. Thanks!

@climba03003
Copy link
Contributor

I just confirmed it works with 21.1.0, and reconfirmed it fails with 20.1.0.

The latest version for 20.x is 20.9.0

@subfuzion
Copy link
Author

@climba03003 Yes, thanks, I updated my comment. For my purposes, this issue is resolved as long as it works with current, but to clarify, it also works with lts.

@RaisinTen
Copy link
Contributor

The PR for disableExperimentalSEAWarning has been released in v20.2.0, so this is not expected to work in earlier versions. Closing.

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

4 participants