question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

After updating from 0.9.2 to 0.9.5 getting the error “java.lang.IllegalArgumentException: Illegal group reference”

See original GitHub issue

The issue is with generating Timeline.html file, Specifically in the code html = html.replaceFirst("//timeline//", sb.toString()); which is in Engine.java(L500)

When Scenario name has any special characters in it, we are getting this error.

java.lang.IllegalArgumentException: Illegal group reference at java.base/java.util.regex.Matcher.appendExpandedReplacement(Matcher.java:1068) at java.base/java.util.regex.Matcher.appendReplacement(Matcher.java:998) at java.base/java.util.regex.Matcher.replaceFirst(Matcher.java:1408) at java.base/java.lang.String.replaceFirst(String.java:2081) at com.intuit.karate.core.Engine.saveTimelineHtml(Engine.java:500) at com.intuit.karate.Runner.parallel(Runner.java:357) at com.intuit.karate.Runner$Builder.parallel(Runner.java:181) at com.pro.api.tests.features.TestRunner.testAllFeatures(TestRunner.java:56) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268) at org.junit.runners.ParentRunner.run(ParentRunner.java:363) at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:365) at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:273) at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:238) at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:159) at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:384) at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:345) at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:126) at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:418) [ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 1,181.97 s <<< FAILURE! - in com.pro.api.tests.features.TestRunner [ERROR] testAllFeatures(com.pro.api.tests.features.TestRunner) Time elapsed: 1,181.905 s <<< ERROR! java.lang.NullPointerException at com.pro.api.tests.features.TestRunner.testAllFeatures(TestRunner.java:61)

Kindly take a look into this issue. Currently I don’t have any sample minimal code to post it here, I am sorry.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

3reactions
ptrthomascommented, Mar 20, 2020

@vini46 @apparnaa-v this will be fixed in the next version and there should be a 0.9.6.RC1 released by monday. in future do follow twitter or something and help us try out new versions to avoid these surprises

1reaction
ptrthomascommented, Aug 24, 2020

0.9.6 released

Read more comments on GitHub >

github_iconTop Results From Across the Web

After updating from 0.9.2 to 0.9.5 getting the error "java.lang ...
After updating from 0.9.2 to 0.9.5 getting the error "java.lang.IllegalArgumentException: Illegal group reference".
Read more >
After updating from 0.9.2 to 0.9.5 getting the error “java.lang ...
After updating from 0.9.2 to 0.9.5 getting the error “java.lang.IllegalArgumentException: Illegal group reference” #1085.
Read more >
html - After updating from 0.9.2 to 0.9.5 getting the error "java.lang ...
TestRunner) Time elapsed: 1,295.22 s <<< ERROR! java.lang.IllegalArgumentException: Illegal group reference at com.pro.api.tests.features.TestRunner.
Read more >
javascript/jquery select all child elements inside a parent element ...
html – After updating from 0.9.2 to 0.9.5 getting the error java.lang.IllegalArgumentException: Illegal group reference ...
Read more >
Karate force scenarios inside a feature file to execute sequentially ...
After Updating From 0.9.2 To 0.9.5 Getting The Error "java.lang.IllegalArgumentException: Illegal Group Reference". My test suite was working fine until it ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found