I am trying to create Extent Report in cucumber project with EventPublisher class. Basically took help from How to implement Extent report in Cucumber using EventListener and Where to find documentation for this class
But when I am running the project, I am getting below exception
java.lang.NullPointerException
at com.npc.qa.listeners.customReportListener.stepFinished(customReportListener.java:130)
at io.cucumber.core.eventbus.AbstractEventPublisher.send(AbstractEventPublisher.java:51)
at io.cucumber.core.eventbus.AbstractEventPublisher.sendAll(AbstractEventPublisher.java:36)
at io.cucumber.core.plugin.CanonicalOrderEventPublisher.handle(CanonicalOrderEventPublisher.java:18)
at io.cucumber.core.eventbus.AbstractEventPublisher.send(AbstractEventPublisher.java:44)
at io.cucumber.core.eventbus.AbstractEventBus.send(AbstractEventBus.java:12)
at io.cucumber.core.runtime.CucumberExecutionContext.emitTestRunFinished(CucumberExecutionContext.java:107)
at io.cucumber.core.runtime.CucumberExecutionContext.finishTestRun(CucumberExecutionContext.java:88)
at io.cucumber.testng.TestNGCucumberRunner.finish(TestNGCucumberRunner.java:125)
at io.cucumber.testng.AbstractTestNGCucumberTests.tearDownClass(AbstractTestNGCucumberTests.java:53)
at java.util.ArrayList.forEach(ArrayList.java:1257)
... Removed 29 stack frames