Comments (4)
Looks like this might be the issue. Read on 🎉
This transpiled JS doesn't work (https://gist.githubusercontent.com/jrafanie/96475c6f34a55269e1add042bded92b0/raw/919de4331b9befa5ff3a1a22479b2a792d6b9a90/source_map_path_2.8.1.js)
And this one does (https://gist.githubusercontent.com/jkeam/141bb30cc0fdb5c42e21fd15c41b908d/raw/84ac502ad1bd3af7eb2bd42fbbc0b07bce78dda2/test_write.js)
The only difference between the two is that in the working version, we commented out this line:
delete this.setTimeout;
What it looks like based on our debugging session is that DynaTrace is trying to call the setTimeout
method, but in the broken version that method does not exist and an error is thrown and the script returns a non-zero exit status code.
While not exactly the same issue, @radikaled found this issue #64 which has similar odd behavior of DynaTrace.
from execjs.
Note that we believed this was because the failing environment was FIPS enabled, but we've tried on other FIPS enabled envs and we can't duplicate it.
from execjs.
As @jkeam said one thing we noticed was DynaTrace was installed on the openshift cluster - we are trying to evaluate whether that is actually what causes the issue, but it is looking likely suspect. We see the following stack trace which includes dynatrace, and separately we saw setTimeout
removal involved.
sh-4.4$ node --trace-exit --trace-uncaught test281
["ok"](node:225) WARNING: Exited the environment with code 1
at exit (internal/process/per_thread.js:173:13)
at n (/opt/dynatrace/oneagent/agent/bin/1.219.162.20210726-100948/any/nodejs/nodejsagent.js:15740:49)
at emit (events.js:314:20)
at internal/process/execution.js:165:25
and
sh-4.4$ node --abort-on-uncaught-exception test281
["ok"]Uncaught ReferenceError: setTimeout is not defined
FROM
Illegal instruction (core dumped)
I see in the FAQ, that it talks about setTimeout, but what I can't understand from the README is why. That is not clear from the README, leading me to question why these methods are removed.
from execjs.
It looks like one way to get around this issue is to use execjs 2.8.1 with uglifier 4.2.0+ since it defers the context
call asset compilation so it doesn't happen on Uglifier.new
which happens when specifying the assets.js_compressor
in the rails application configuration. With uglifier 4.2.0 and execjs 2.8.1, we can pre-compile the assets in an environment without dynatrace, then at runtime we can avoid shelling out to nodejs, which was conflicting with dynatrace.
I'll update the issue if this doesn't work.
from execjs.
Related Issues (20)
- Version 2.8.0 may require ES6 syntax HOT 2
- v2.8.0 changelog? HOT 4
- Rails 4.2 + v2.8.1 == TypeError: Cannot read property 'version' of undefined HOT 1
- ExecJS::RuntimeUnavailable in el7
- Can't use runtime because `File.executable?` returns false HOT 5
- What is better? V8 or node.js? HOT 1
- An example in the README doesn't work HOT 1
- Setup bun.sh runtime HOT 3
- Popen的encoding参数要改成utf8才能正常运行,但我不想修改subprocess.py的源码,有什么方式可以解决吗 HOT 1
- bun.sh as runtime HOT 4
- How to debug ExecJS::RuntimeError: SyntaxError: Invalid or unexpected token HOT 1
- Syntax error with new HEREDOC syntax HOT 3
- required_ruby_version is incorrect HOT 1
- Bun runtime fails if there's an `.env` file in the working directory HOT 2
- Changelog HOT 2
- `rails server` fails using Dockerfile generated by `rails new`, bun and execjs HOT 1
- Can't call a function with "NaN" input when using MiniRacer HOT 2
- External runtimes broken on Ruby 3.0 HOT 6
- Version 2.8.0 raises ExecJS::ProgramError: TypeError: Cannot read property 'version' of undefined HOT 44
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from execjs.