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

[IDEA] Upgrade rhino engine to version 1.7.13 #4600

Closed
ejfn opened this issue Jun 16, 2021 · 4 comments
Closed

[IDEA] Upgrade rhino engine to version 1.7.13 #4600

ejfn opened this issue Jun 16, 2021 · 4 comments
Labels
enhancement New feature or request Fix-Commited Issue fixed and will be available in milestone Internal-Issue-Created An issue has been created in NextGen's internal issue tracker RS-6424 triaged
Milestone

Comments

@ejfn
Copy link

ejfn commented Jun 16, 2021

Is your feature request related to a problem? Please describe.
I have a js bundle only works when I set rhino.languageversion=1.7. It fails on 1.8 or es6. But I have tested it works with rhino-1.7.13 with the latest language version (es6 or 200).

Describe the solution you'd like
Upgrade the rhino to 1.7.13

Describe alternatives you've considered
I have to set languageversion=1.7 as a workaround

@ejfn ejfn added the enhancement New feature or request label Jun 16, 2021
@cturczynskyj
Copy link
Collaborator

The RHINO library included in Connect 3.11.0 is version 1.7.12 which should support language versions 1.8+. Are you saying that there's an issue with the version of the library where 1.8 isn't fully supported and version 1.7.13 fixes that?

Also, do you have a specific test we could run locally to reproduce the issue to ensure we can fix the problem?

@ejfn
Copy link
Author

ejfn commented Jun 19, 2021

@cturczynskyj,

I believe it's something fixed in 1.7.13, one of the listed item below:
https://github.com/mozilla/rhino/releases/tag/Rhino1_7_13_Release

I do have a js bundle works in: java -jar rhino-1.7.13.jar -debug -version 200 test.js
but not: java -jar rhino-1.7.12.jar -debug -version 200 test.js

Unfortunately, it's from the workplace I couldn't share. It's a quite big bundle and I couldn't narrow down the specific issue.

here is the error I got when run it in 1.7.12:

Exception in thread "main" java.lang.NullPointerException: Cannot invoke "org.mozilla.javascript.Scriptable.get(String, org.mozilla.javascript.Scriptable)" because "obj" is null
	at org.mozilla.javascript.ScriptableObject.getProperty(ScriptableObject.java:2320)
	at org.mozilla.javascript.NativeArray.getLengthProperty(NativeArray.java:858)
	at org.mozilla.javascript.NativeArray.js_join(NativeArray.java:1038)
	at org.mozilla.javascript.NativeArray.execIdCall(NativeArray.java:319)
	at org.mozilla.javascript.IdFunctionObject.call(IdFunctionObject.java:100)
	at org.mozilla.javascript.ScriptRuntime.applyOrCall(ScriptRuntime.java:2741)
	at org.mozilla.javascript.BaseFunction.execIdCall(BaseFunction.java:287)
	at org.mozilla.javascript.IdFunctionObject.call(IdFunctionObject.java:100)
	at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:1669)
	at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:1009)
	at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:109)
	at org.mozilla.javascript.NativeArray.iterativeMethod(NativeArray.java:1931)
	at org.mozilla.javascript.NativeArray.execIdCall(NativeArray.java:370)
	at org.mozilla.javascript.IdFunctionObject.call(IdFunctionObject.java:100)
	at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:1669)
	at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:1009)
	at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:109)
	at org.mozilla.javascript.NativeArray.iterativeMethod(NativeArray.java:1931)
	at org.mozilla.javascript.NativeArray.execIdCall(NativeArray.java:370)
	at org.mozilla.javascript.IdFunctionObject.call(IdFunctionObject.java:100)
	at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:1669)
	at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:1009)
	at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:109)
	at org.mozilla.javascript.NativeArray.iterativeMethod(NativeArray.java:1931)
	at org.mozilla.javascript.NativeArray.execIdCall(NativeArray.java:370)
	at org.mozilla.javascript.IdFunctionObject.call(IdFunctionObject.java:100)
	at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:1669)
	at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:1009)
	at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:109)
	at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:412)
	at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3545)
	at org.mozilla.javascript.InterpretedFunction.exec(InterpretedFunction.java:121)
	at org.mozilla.javascript.tools.shell.Main.processFileSecure(Main.java:600)
	at org.mozilla.javascript.tools.shell.Main.processFile(Main.java:559)
	at org.mozilla.javascript.tools.shell.Main.processSource(Main.java:530)
	at org.mozilla.javascript.tools.shell.Main.processFiles(Main.java:181)
	at org.mozilla.javascript.tools.shell.Main$IProxy.run(Main.java:101)
	at org.mozilla.javascript.Context.call(Context.java:559)
	at org.mozilla.javascript.ContextFactory.call(ContextFactory.java:522)
	at org.mozilla.javascript.tools.shell.Main.exec(Main.java:163)
	at org.mozilla.javascript.tools.shell.Main.main(Main.java:138)

@pladesma
Copy link
Collaborator

Can you try replacing rhino-1.7.12.jar in your server-lib folder with rhino-1.7.13.jar and verify if that fixes the issue?

@ejfn
Copy link
Author

ejfn commented Jun 22, 2021

@pladesma , yes it works if I replace it with rhino-1.7.13.jar

@pladesma pladesma added Internal-Issue-Created An issue has been created in NextGen's internal issue tracker RS-6424 triaged labels Jun 28, 2021
@lmillergithub lmillergithub added this to the 4.0.0 milestone Mar 22, 2022
@pladesma pladesma added the Fix-Commited Issue fixed and will be available in milestone label Mar 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Fix-Commited Issue fixed and will be available in milestone Internal-Issue-Created An issue has been created in NextGen's internal issue tracker RS-6424 triaged
Projects
None yet
Development

No branches or pull requests

4 participants