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.
I’ve the same problem. Report is completely new, not scheduled. Server version, PHP 7.
I sent a bug report so support
Same for the 404 on PDF reports. And we have some troubles about reports, some of them are not complete.
I am facing the same issue. My company’s just started using TestRail (we’re on v 22.214.171.12427 the only version that’s been installed), so all reports are new. Every time I try to export PDF report I am getting 404.
i guess these issues never get resolved! too bad!
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 firstname.lastname@example.org, 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 email@example.com email, and we can look into it for you.
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>
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?
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
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)```
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.
Any updates on this topic?
I just started evaluating the tool before purchase and found this PDF issue.
TestRail version 126.96.36.19946 (up-to-date) Built on 7/5/2018 Database version 188
I’ll contact the support via email.
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.
This is my error log, replying to myself.
Report file or resource not found
Status Code: 404
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
Server: Linux 4.15.0-36-generic #39-Ubuntu SMP Mon Sep 24 16:19:09 UTC 2018 x86_64
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)
Any thoughts by anyone?
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.
@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.
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.
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.
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.
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.
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