Join 34,000+ subscribers and receive articles from our blog about software quality, testing, QA and security.
 

PDF versions of the reports


#10

Since our error is a 404 error on the GET for the report I would bet it does need to be created as part of the report creation and that folder should not be empty.


#11

I’ve the same problem. Report is completely new, not scheduled. Server version, PHP 7.
I sent a bug report so support


#12

Same for the 404 on PDF reports. And we have some troubles about reports, some of them are not complete.


#13

I am facing the same issue. My company’s just started using TestRail (we’re on v 5.5.0.3727 the only version that’s been installed), so all reports are new. Every time I try to export PDF report I am getting 404.


#14

i guess these issues never get resolved! too bad!


#15

Hi all - these issues are gradually being resolved. Most of them via individual support tickets, which is why you haven’t seen updates to this thread. If anyone on the thread is still struggling with the problem then please feel free to reach out via contact@gurock.com, and we’ll be happy to work with you to remedy the problem for your specific installation context.

Our current understanding is that the issue is being caused on a small number of server installations where file permissions for PhantomJS are not being set correctly, which means the PDF files fail to generate. The fix, in most cases, is for the server administrator to update the permissions for the PhantomJS executable so that it can be run by the same server user as the TestRail installation.

For some Windows server installations, it may be necessary to check the file properties to ensure the PhantomJS executable is not “blocked”.

Kiéran, reports not completing sounds like a different issue than the one I’ve addressed above. Please provide some additional details (preferably on a separate thread) or reach out via the contact@gurock.com email, and we can look into it for you.

Cheers,
Simon


#16

For me, the issue wasn’t permissions on the executable, as I checked those. It was the absence of the libfontconfig1 package, which is a dependency of PhantomJS on Ubuntu:

root@9fe786d9a862:/var/www/html# bin/phantomjs_x86_64 
bin/phantomjs_x86_64: error while loading shared libraries: libfontconfig.so.1: cannot open shared object file: No such file or directory

Once I installed that package, I was able to run PhantomJS:

root@c1de377c77e1:/var/www/html# bin/phantomjs_x86_64 
phantomjs>

#17

For Centos 7, you need to install fontconfig.x86_64 and/or fontconfig-devel.x86_64 .
@sjpknight kindly include this in docs when you get a chance?


#18

@csbogdan & @drewhemm appreciate the additional insights! I will certainly update our documentation regarding same.


#19

Seems to be fixed so far to me, yet some of my coworkers still facing it. Sometimes they actually get the file downloaded as pdf but it refuses to open with viewers, so you need to process it via editing tool (we using this one as an example but it’s a paid one https://edit-pdf.pdffiller.com/) and save as a new file. Long story short, something is quite wrong about it


#20

Reports are generated properly but UI complains file not found!

---
Details: <missing>
File: /var/www/html/testrail/sys/helpers/ex.php
Line: 25
Status Code: 404
Host: testrail.localhost
Uri: /testrail/index.php?/reports/render/19 (GET)
---
Browser: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/11.1.2 Safari/605.1.15
PHP: 5.4.16
Server: Linux 3.10.0-862.11.6.el7.x86_64 #1 SMP Tue Aug 14 21:49:04 UTC 2018 x86_64
---
Trace:
at ex::raise (ex.php:77)
at ex::raiset (reports.php:399)
at Reports_controller->_stream_file (reports.php:350)
at Reports_controller->render (<unknown>:<unknown>)
at call_user_func_array (controller.php:257)
at Controller->_invoke_web_call (controller.php:168)
at Controller->_invoke_web (controller.php:120)
at Controller->_invoke (gizmo.php:107)
at require_once (index.php:106)```

#21

It has been confirmed to me (by Gurock) that there is something else that is still an issue preventing PDF reports from being created in the PDF folder.


#22

Any updates on this topic?
I just started evaluating the tool before purchase and found this PDF issue.

Version info:

About TestRail

TestRail version 5.5.1.3746 (up-to-date)
Built on 7/5/2018
Database version 188

I’ll contact the support via email.


#23

For the issue we found we have not gotten anything back from Gurock and we don’t really know what the issue is. for my work it is apparently not a permissions issue.


#24

This is my error log, replying to myself.

Report file or resource not found


Details: <missing>

File: /var/www/testrail/sys/helpers/ex.php

Line: 25

Status Code: 404

Host: testrail.intra.qt.io

Uri: /testrail/index.php?/reports/get_pdf/7/1 (GET)


Browser: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36

PHP: 7.0.32-2+ubuntu18.04.1+deb.sury.org+1

Server: Linux 4.15.0-36-generic #39-Ubuntu SMP Mon Sep 24 16:19:09 UTC 2018 x86_64


Trace:

at ex::raise (ex.php:77)

at ex::raiset (reports.php:398)

at Reports_controller->_stream_file (reports.php:460)

at Reports_controller->get_pdf (controller.php:257)

at Controller->_invoke_web_call (controller.php:168)

at Controller->_invoke_web (controller.php:120)

at Controller->_invoke (gizmo.php:107)

at require_once (index.php:106)


Version: 5.5.1.3746

Any thoughts by anyone?


#25

It is not creating the file in the PDF folder… It looks like they take the HTML report file and do a conversion to create the PDF file and file into the PDF folder.


#26

Hi @Asmo,

@BGanger is correct TestRail takes the HTML report and pipes this through PhantomJS to create a PDF version. Although the exact reason for this failure appears to vary, here are the top 3 solutions.

  1. Ensure PhantomJS has the proper permission to run. This solution is more common on Linux as sometimes the TestRail files are extracted using sudo and thus results in files down by root with permissions 700. In this case recursively modify the permissions of the /testtail/bin directory to 755.

  2. Another case which is more rare is because PhantomJS relies on zlib to perform the compression the module could be missing from the PHP installation. This can be verified by executing php -i or a info.php page. If missing, install it.

  3. Lastly, as a final option, install PhantomJS to ensure all dependencies are in place. Also to bypass the bundled phantomJS and hopefully any issues it carries. The procedure for this is well documented on the web and varies by hosting environment.

I hope one of the above can resolve your PDF issue and look forward to any feedback you might have.


#27

Hi,

Thanks for the advice. Here is the feedback from my colleague:

Key phrase: install PhantomJS to ensure all dependencies are in place. It’s not enough just to install phantomjs like apt-get install phantomjs

After installing libfontconfig and fontconfig packages, you are able to run it like: /var/www/testrail/bin/phantomjs_x86_64 -v

But pdf reports still don’t work.

It’s needed to install other packages, below there is full list:

apt-get install build-essential chrpath libssl-dev libxft-dev libfreetype6 libfreetype6-dev libfontconfig fontconfig libfontconfig1-dev libfontconfig1

it starts working after that.

Now I can confirm that this works. Maybe others find these tips useful. :smiley:


#28

We had already done #1 and 2 and my internal support person did #3 today and still no dice for us. We already have a support case open and I believe that case # is 181858


#29

Thank you @Asmo for that information! I sure this will help others as well.

@BGanger thanks for the ticket number. I’ll be taking a look at it shortly.