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

Unable to open PDF Report after failed test is retried #42

Open
vijay-gupta opened this issue Jul 12, 2024 · 0 comments
Open

Unable to open PDF Report after failed test is retried #42

vijay-gupta opened this issue Jul 12, 2024 · 0 comments

Comments

@vijay-gupta
Copy link

vijay-gupta commented Jul 12, 2024

Hi,

I am running cucumber features using testng. When the failed feature is retried, all the other reports (Spark and HTML reports) are getting opened fine, however, when I try to open PDF file, it is not opening. It throws the error message. Please let me know if any other information is required other than dependencies and stacktrace (provided below)

image

Dependencies:

<dependency>
    <groupId>tech.grasshopper</groupId>
    <artifactId>extentreports-cucumber7-adapter</artifactId>
    <version>1.14.0</version>
</dependency>
 
<dependency>
    <groupId>io.cucumber</groupId>
    <artifactId>cucumber-core</artifactId>
    <version>7.18.0</version>
</dependency>

<dependency>
    <groupId>io.cucumber</groupId>
    <artifactId>cucumber-core</artifactId>
    <version>7.18.0</version>
</dependency>

<!-- https://mvnrepository.com/artifact/io.cucumber/cucumber-testng -->
<dependency>
    <groupId>io.cucumber</groupId>
    <artifactId>cucumber-testng</artifactId>
<version>7.18.0</version>

Stacktrace:

Jul 12, 2024 12:01:29 PM tech.grasshopper.pdf.PDFCucumberReport createReport
SEVERE: An exception occurred
java.io.IOException: The TrueType font null does not contain a 'cmap' table
	at org.apache.fontbox.ttf.TrueTypeFont.getUnicodeCmapImpl(TrueTypeFont.java:562)
	at org.apache.fontbox.ttf.TrueTypeFont.getUnicodeCmapLookup(TrueTypeFont.java:542)
	at org.apache.fontbox.ttf.TrueTypeFont.getUnicodeCmapLookup(TrueTypeFont.java:528)
	at org.apache.fontbox.ttf.TTFSubsetter.<init>(TTFSubsetter.java:90)
	at org.apache.pdfbox.pdmodel.font.TrueTypeEmbedder.subset(TrueTypeEmbedder.java:347)
	at org.apache.pdfbox.pdmodel.font.PDType0Font.subset(PDType0Font.java:263)
	at org.apache.pdfbox.pdmodel.PDDocument.save(PDDocument.java:1369)
	at org.apache.pdfbox.pdmodel.PDDocument.save(PDDocument.java:1344)
	at tech.grasshopper.pdf.PDFCucumberReport.createReport(PDFCucumberReport.java:133)
	at tech.grasshopper.pdf.extent.ExtentPDFCucumberReporter.flush(ExtentPDFCucumberReporter.java:95)
	at tech.grasshopper.pdf.extent.ExtentPDFCucumberReporter$1.onNext(ExtentPDFCucumberReporter.java:69)
	at tech.grasshopper.pdf.extent.ExtentPDFCucumberReporter$1.onNext(ExtentPDFCucumberReporter.java:62)
	at io.reactivex.rxjava3.subjects.PublishSubject$PublishDisposable.onNext(PublishSubject.java:310)
	at io.reactivex.rxjava3.subjects.PublishSubject.onNext(PublishSubject.java:226)
	at com.aventstack.extentreports.ReactiveSubject.onFlush(ReactiveSubject.java:83)
	at com.aventstack.extentreports.AbstractProcessor.onFlush(AbstractProcessor.java:85)
	at com.aventstack.extentreports.ExtentReports.flush(ExtentReports.java:279)
	at com.aventstack.extentreports.service.ExtentService.flush(ExtentService.java:47)
	at com.aventstack.extentreports.cucumber.adapter.ExtentCucumberAdapter.finishReport(ExtentCucumberAdapter.java:301)
	at com.aventstack.extentreports.cucumber.adapter.ExtentCucumberAdapter$8.receive(ExtentCucumberAdapter.java:137)
	at com.aventstack.extentreports.cucumber.adapter.ExtentCucumberAdapter$8.receive(ExtentCucumberAdapter.java:134)
	at io.cucumber.core.eventbus.AbstractEventPublisher.send(AbstractEventPublisher.java:51)
	at io.cucumber.core.eventbus.AbstractEventBus.send(AbstractEventBus.java:12)
	at io.cucumber.core.runtime.SynchronizedEventBus.send(SynchronizedEventBus.java:47)
	at io.cucumber.core.runtime.CucumberExecutionContext.emitTestRunFinished(CucumberExecutionContext.java:117)
	at io.cucumber.core.runtime.CucumberExecutionContext.finishTestRun(CucumberExecutionContext.java:104)
	at io.cucumber.testng.TestNGCucumberRunner.finish(TestNGCucumberRunner.java:145)
	at io.cucumber.testng.AbstractTestNGCucumberTests.tearDownClass(AbstractTestNGCucumberTests.java:57)
	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.testng.internal.invokers.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:141)
	at org.testng.internal.invokers.MethodInvocationHelper.invokeMethodConsideringTimeout(MethodInvocationHelper.java:71)
	at org.testng.internal.invokers.ConfigInvoker.invokeConfigurationMethod(ConfigInvoker.java:400)
	at org.testng.internal.invokers.ConfigInvoker.invokeConfigurations(ConfigInvoker.java:333)
	at org.testng.internal.invokers.TestMethodWorker.invokeAfterClassConfigurations(TestMethodWorker.java:238)
	at org.testng.internal.invokers.TestMethodWorker.invokeAfterClassMethods(TestMethodWorker.java:223)
	at org.testng.internal.invokers.TestMethodWorker.run(TestMethodWorker.java:137)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at org.testng.internal.thread.graph.TestNGFutureTask.run(TestNGFutureTask.java:22)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:834)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant