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

Issue running on latest AWS Linux 2023 Instance #512

Closed
5 of 9 tasks
mikehuebner opened this issue Dec 10, 2024 · 2 comments
Closed
5 of 9 tasks

Issue running on latest AWS Linux 2023 Instance #512

mikehuebner opened this issue Dec 10, 2024 · 2 comments

Comments

@mikehuebner
Copy link

mikehuebner commented Dec 10, 2024

Is Your Question Already Answered?

Personal Diagnostics

Please answer the following questions:

JavaScript includes a setTimeout function:

  • Yes
  • No

Functions are a type of primitive value in JavaScript:

  • Yes
  • No

Objects can be shared between isolates:

  • Yes
  • No
  • Also don't really work with isolates

The Code

  • This code will parse and evaluate if I put it into a file called main.mjs and then run node main.mjs.
// Replace this code with the code which demonstrates what you are asking about
import ivm from "isolated-vm";
const isolate = new ivm.Isolate();
const context = await isolate.createContext();
console.log(await context.eval('"hello world"'));

Hey y'all, been trying to get isolated-vm 5.0.2 running with our Amazon Linux 2023 distro and keep coming across the same issue when we deploy to Elastic Beanstalk.

Error:

⨯ Error: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.30' not found (required by /var/app/current/node_modules/isolated-vm/out/isolated_vm.node)
   at Module._extensions..node (node:internal/modules/cjs/loader:1715:18)
   at Module.load (node:internal/modules/cjs/loader:1318:32)
   at Module._load (node:internal/modules/cjs/loader:1128:12)
   at TracingChannel.traceSync (node:diagnostics_channel:315:14)
   at wrapModuleLoad (node:internal/modules/cjs/loader:218:24)
   at Module.require (node:internal/modules/cjs/loader:1340:12)
   at mod.require (/var/app/current/node_modules/next/dist/server/require-hook.js:65:28)
   at Module.T (/var/app/current/dist/apps/public-app/.next/server/instrumentation.js:23:139328)
   at _require.i.require (/var/app/current/dist/apps/public-app/.next/server/instrumentation.js:23:140664)
   at require (node:internal/modules/helpers:141:16) {
 code: 'ERR_DLOPEN_FAILED'
}

Details

Distro:

Node.js 22 running on 64bit Amazon Linux 2023/6.4.0

Packages:

  • isolated-vm > 5.0.2
  • builder.io/sdk > 3.0.0
  • nextjs > 14.2.18
  • nodejs > 22.0.0

Things I've tried:

  1. Adding a .ebextension config to force install a newer version of gcc (gcc-12) -- fails due to not being able to be found
  • Tried doing dnf and yum for the installs, just reports back that the package cannot be found
  • Logged out the GLIBCXX versions and I get all the way to 3.4.29, but not 30 😞
  1. Redeploy the distribution multiple times -- thought maybe with 5.0.2 and another issue reporting that they rebuild it using gcc-11 that would fix it, but no difference
  2. Try to rebuild the isolated-vm project with gcc-11 instead of the default -- came across a ton of build errors just trying to get it compiled to the out directory. That is just my naivety with node-gyp, I kept getting syntax errors and that is why I just opened an issue as I didn't see another report of this with this linux distribution on AWS

Please let me know any details or other items I provide! ❤️

This is only other issue I saw with this with an update from a few weeks ago: #509

If you feel this is a dupe, I'll just thread into that one.

laverdet added a commit that referenced this issue Dec 10, 2024
@mikehuebner
Copy link
Author

@kaceycleveland seems to have figured out a workaround and its using the .platform/hooks/prebuild option with elastic beanstalk.

.platform/hooks/prebuild

apt-get update -y
apt-get install -y g++ libstdc++6

@laverdet
Copy link
Owner

Precompiled binaries in v5.0.3 should work on this platform now. I tested it personally via the amazonlinux:2023.6.20241010.0 docker image but let me know if it does not work.

garymathews pushed a commit to garymathews/isolated-vm that referenced this issue Jan 1, 2025
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

2 participants