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.

NullPointerException when serving allure report

See original GitHub issue

I’m submitting a …

  • bug report
  • feature request
  • support request => Please do not submit support request here, see note at the top of this template.

What is the current behavior?

allure serve & allure generate returns Exception in thread "main" java.lang.NullPointerException

Note: on local machine works well

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem

PS C:> allure serve C:\Users\Administrator\bamboo-home\xml-data\build-dir\projectname\AllureResults\

What is the expected behavior?

should works well =)

Please tell us about your environment:

Allure version 2.6.0
Test framework NUnit 2.6.4
Generate report using allure-console
OS Windows Server 16

Other information

full stack trace:

PS C:\> allure serve C:\Users\Administrator\bamboo-home\xml-data\build-dir\projectname\AllureResults\
Generating report to temp directory...
Exception in thread "main" java.lang.NullPointerException
        at sun.nio.fs.WindowsPathParser.parse(Unknown Source)
        at sun.nio.fs.WindowsPathParser.parse(Unknown Source)
        at sun.nio.fs.WindowsPath.parse(Unknown Source)
        at sun.nio.fs.WindowsFileSystem.getPath(Unknown Source)
        at sun.nio.fs.AbstractPath.resolve(Unknown Source)
        at io.qameta.allure.allure1.Allure1Plugin.convert(Allure1Plugin.java:297)
        at io.qameta.allure.allure1.Allure1Plugin.lambda$convert$5(Allure1Plugin.java:199)
        at java.util.stream.ReferencePipeline$3$1.accept(Unknown Source)
        at java.util.stream.ReferencePipeline$2$1.accept(Unknown Source)
        at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(Unknown Source)
        at java.util.stream.AbstractPipeline.copyInto(Unknown Source)
        at java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source)
        at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(Unknown Source)
        at java.util.stream.AbstractPipeline.evaluate(Unknown Source)
        at java.util.stream.ReferencePipeline.collect(Unknown Source)
        at io.qameta.allure.allure1.Allure1Plugin.convert(Allure1Plugin.java:255)
        at io.qameta.allure.allure1.Allure1Plugin.convert(Allure1Plugin.java:246)
        at io.qameta.allure.allure1.Allure1Plugin.convert(Allure1Plugin.java:199)
        at io.qameta.allure.allure1.Allure1Plugin.lambda$null$1(Allure1Plugin.java:116)
        at java.util.ArrayList.forEach(Unknown Source)
        at io.qameta.allure.allure1.Allure1Plugin.lambda$readResults$2(Allure1Plugin.java:115)
        at java.util.stream.ReferencePipeline$3$1.accept(Unknown Source)
        at java.util.stream.ReferencePipeline$2$1.accept(Unknown Source)
        at java.util.stream.ReferencePipeline$3$1.accept(Unknown Source)
        at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(Unknown Source)
        at java.util.stream.AbstractPipeline.copyInto(Unknown Source)
        at java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source)
        at java.util.stream.StreamSpliterators$WrappingSpliterator.forEachRemaining(Unknown Source)
        at java.util.stream.Streams$ConcatSpliterator.forEachRemaining(Unknown Source)
        at java.util.stream.ReferencePipeline$Head.forEach(Unknown Source)
        at io.qameta.allure.allure1.Allure1Plugin.readResults(Allure1Plugin.java:114)
        at io.qameta.allure.ReportGenerator.lambda$readResults$0(ReportGenerator.java:32)
        at java.util.ArrayList.forEach(Unknown Source)
        at io.qameta.allure.ReportGenerator.readResults(ReportGenerator.java:32)
        at java.util.stream.ReferencePipeline$3$1.accept(Unknown Source)
        at java.util.stream.ReferencePipeline$2$1.accept(Unknown Source)
        at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(Unknown Source)
        at java.util.stream.AbstractPipeline.copyInto(Unknown Source)
        at java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source)
        at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(Unknown Source)
        at java.util.stream.AbstractPipeline.evaluate(Unknown Source)
        at java.util.stream.ReferencePipeline.collect(Unknown Source)
        at io.qameta.allure.ReportGenerator.generate(ReportGenerator.java:54)
        at io.qameta.allure.ReportGenerator.generate(ReportGenerator.java:43)
        at io.qameta.allure.Commands.generate(Commands.java:89)
        at io.qameta.allure.Commands.serve(Commands.java:114)
        at io.qameta.allure.CommandLine.run(CommandLine.java:136)
        at java.util.Optional.orElseGet(Unknown Source)
        at io.qameta.allure.CommandLine.main(CommandLine.java:72)

Issue Analytics

  • State:open
  • Created 5 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
baevcommented, May 22, 2018

Lets keep this open and fix anyway

0reactions
ElimYuancommented, Jan 8, 2020

I’m having the same issue. When I run all the tests in my local machine everything works great but whenever I run them in Jenkins and try to generate the report 9 out of 10 times I end up getting a nullPointerException from Allure when trying to generate the report.

I’m guessing it’s the same issue but I can’t access the report files from the build machine when it fails to generate it so I can’t confirm.

The same test suite using allure 1 didn’t have any issues generating the report… any idea about how to fix this? Either a work around or pointing me to where the problem is so I can try to fix it and submit a PR.

//Edit: Just in case, I’m using TestNG as the test framework.

@nreymundo I 'm having the same issue. Have you resolve this issue? It is OK when running in my local, but it occurs NullPointerException error when run them in Jenkins.

java.lang.RuntimeException: java.lang.NullPointerException at org.testng.internal.MethodInvocationHelper.invokeDataProvider(MethodInvocationHelper.java:162) at org.testng.internal.Parameters.handleParameters(Parameters.java:441) at org.testng.internal.Invoker.handleParameters(Invoker.java:1300) at org.testng.internal.Invoker.createParameters(Invoker.java:1015) at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1104) at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:125) at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:108) at org.testng.TestRunner.privateRun(TestRunner.java:771) at org.testng.TestRunner.run(TestRunner.java:621) at org.testng.SuiteRunner.runTest(SuiteRunner.java:357) at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:352) at org.testng.SuiteRunner.privateRun(SuiteRunner.java:310) at org.testng.SuiteRunner.run(SuiteRunner.java:259) at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52) at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86) at org.testng.TestNG.runSuitesSequentially(TestNG.java:1199) at org.testng.TestNG.runSuitesLocally(TestNG.java:1124) at org.testng.TestNG.run(TestNG.java:1032) at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:283) at org.apache.maven.surefire.testng.TestNGXmlTestSuite.execute(TestNGXmlTestSuite.java:75) at org.apache.maven.surefire.testng.TestNGProvider.invoke(TestNGProvider.java:120) 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) Caused by: java.lang.NullPointerException at com.dsc.qa.gts.dataprovider.DriverDataProvider.<init>(DriverDataProvider.java:28) at com.dsc.qa.gts.dataprovider.DataDriver.getDataProvider(DataDriver.java:71) at com.dsc.qa.gts.dataprovider.DataDriver.getDataProvider(DataDriver.java:29) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:85) at org.testng.internal.MethodInvocationHelper.invokeDataProvider(MethodInvocationHelper.java:154) … 24 more

Read more comments on GitHub >

github_iconTop Results From Across the Web

java.lang.NullPointerException when trying to generate Allure ...
When I run the command-line report tool, it creates the directory but its empty. the allure-results directory has a valid test in it....
Read more >
allure-framework/allure-core - Gitter
Hi, I am using allure maven-testng using Java. We are using Jenkins job that generates allure report on random server... How i can...
Read more >
Allure Report unknown NaN%-Java - appsloveworld.com
You have not added the allure-maven dependency under your dependencies section.I think that's why you are getting this NaN% error. Nikita Bakshi 103....
Read more >
Allure Framework
allure serve /home/path/to/project/target/surefire-reports/. Which generates a report in temporary folder from the data found in the ...
Read more >
[JENKINS-70095] Active Directory - LDAP error
JENKINS-68748NullPointerException when using "Test LDAP settings" button ... JENKINS-67410Matrix Authorization 3.0 reports "Group not found" ...
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