-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Getting DynamicContext error after upgrading to Karate 1.1.0 from 1.1.0.RC4 #1711
Comments
@DeepakNaik30 I don't consider this a priority especially since you don't seem to have tried RC5 and given us the feedback. please consider using the information available to narrow down the problem or find a work around. I'm taking a little break from trying to solve this. and have you read the docs that say that mixing java code into callSingle / callonce is "at your own risk". all the best. |
@DeepakNaik30 many thanks for the simple example, the interesting thing is this has nothing to do with Java or static methods, the problem is because a JS function was returned in cc @joelpramos I have added a test to replicate and if you un-comment the lines in I'm closing this as that said, there is a good chance that a future version of the JS engine will support JS functions being passed around - and that should put an end to all these woes: oracle/graal#631 (comment) anyone is welcome to disagree and fix this in karate in the meantime. |
@DeepakNaik30 further investigation found that this is not related to |
Hi @ptrthomas Fix in Karate develop branch is working for us. We no longer see this DynamicContext error. |
Hi,
I am getting "DynamicContext could not be passed from one context to another" error message after upgrading to Karate 1.1.0 from 1.1.0.RC4.
To reproduce the issue, I have created a sample project with Karate 1.1.0 archetype and added the related code that throws the message.
From karate-config.js, I am doing karate.callSingle to utility.feature file.
![image](https://user-images.githubusercontent.com/10124854/128881441-74942bb2-16ba-4ca8-91cc-0403e59922dd.png)
utility.feature makes a call to HelloWorld.java class that has 1 static method which prints "Hello World..!!" to the console.
I changed the method to static after reading other stack overflow pages related to this Dynamic error for Karate 1.0.0
From users.feature file, I am doing callonce to another feature file in the Background.
![image](https://user-images.githubusercontent.com/10124854/128880072-75a404cd-8236-4007-b1c8-c59f346c62a7.png)
And inside Scenario, I am calling this helloWorld method, but this line 13 throws the message of ""DynamicContext could not be passed from one context to another"
If I change the Karate version to 1.1.0.RC4, scenario gets executed successfully, but throws DynamicContext message with Karate 1.1.0.RC5 and 1.1.0 versions.
Note: I tried most of the solutions I could find on stack overflow or Karate github issues pages, but not able to fix this issue.
Maybe I am missing a minor code change here.
Can someone please help ?
I have attached the zip of sample project, to reproduce the issue.
DynamicContextError.zip
The text was updated successfully, but these errors were encountered: