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

GraalVM PolyglotException when a runner class is used to run scenarios involving 2+ call-s before running a JS function #2047

Closed
staffier opened this issue Jun 30, 2022 · 7 comments
Assignees

Comments

@staffier
Copy link

staffier commented Jun 30, 2022

With v1.2.1.RC2, I'm running into a number of these errors:

org.graalvm.polyglot.PolyglotException: java.lang.AssertionError

  • com.oracle.truffle.js.runtime.JavaScriptRealmBoundaryRootNode.execute(JavaScriptRealmBoundaryRootNode.java:75)

It appears as though a couple things are required to expose this issue:

  1. Two (or more) call-s need to take place before any JS function is utilized
  2. The test needs to be run using a runner class

It took a while to whittle things down, but the attached project is about as bare-bones as I could make it. If you use the runner class to test things out, one Scenario will pass and the other will fail. And if you bump the version down to 1.2.0, the issue vanishes.
KarateTroubleshooting.zip

@ptrthomas
Copy link
Member

this is related to the JS engine / graal issues that needs a big push of refactoring: #2003 (comment)

@ptrthomas
Copy link
Member

@staffier for this one also can you see if the latest develop branch works

@staffier
Copy link
Author

staffier commented Aug 3, 2022

Looks like this needs to be updated in KarateLexer.java & KarateParser.java:

ANTLR Tool version 4.9.2 used for code generation does not match the current runtime version 4.10.1

@ptrthomas
Copy link
Member

@staffier that's weird, can you do a maven clean. also if you are using an ANTLR plugin in IntelliJ please disable or uninstall it first

@staffier
Copy link
Author

staffier commented Aug 3, 2022

I changed it to 4.9.2 in the karate-core pom file and everything worked -- the test in question no longer fails when I run it with my runner. Nice!

@ptrthomas
Copy link
Member

okay, I'm going to mark this as duplicate of another issue and close, thanks ! anyway we will release an RC version soon so we can double check

@ptrthomas ptrthomas self-assigned this Aug 3, 2022
@ptrthomas
Copy link
Member

this is a duplicate of #1883 which is fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants