DOCGEN_FOR_WAIT_CONTENT_ERROR when generating PDF

0
Using DocumentGeneration I get the following error DOCGEN_FOR_WAIT_CONTENT_ERROR when generating the PDF   From the following trace it looks like the Document is generated but then I get a 560 Internal server error (this from the Client Log Node)     I'm running it on Local and have set up all the roles and rights according to the documentation as well as using the samples in the Examples folder of the module, the version of DocumentGeneration I'm running is 1.8.0, and Modeler is 9.24.21   Any help/suggestions will be much appreciated.    
asked
6 answers
0

Hi Ryan,

 

As I can see in your console, the document took 33,147 seconds to generate. 

If you check the documentation of the PDF generator, they mention there is a timeout for 30 seconds

"We use a fixed 30 second timeout for the page to finish loading and rendering. A timeout exception is thrown if the page content did not finish loading within 30 seconds."

 

If you are combining data from different parts of your application you might be able to optimize the way you retrieve your data, if you do not require the PDF to be directly available you can also opt to generate it in a task que, but do take into account the max file size of 25mb

answered
0

Hi Ryan,

 

I have got it fixed.

 

You will need to assign your Administrator account with which you are probably testing to both DocumentGeneration module roles: "Administrator" and "User".

 

image.png

answered
0

Hi Jeroen,

 

I have it set up like that, one thing I did notice is I'm not using System.User but an employee role with System.User, Document.User and my Testmodule.User assigned to the employee role, would that perhaps be an issue?

 

 

answered
0

Hi Ryan,

This could be caused by a number of reasons. Did you check the docs section here regarding document generation exception `Wait For Content Exception`?

If that was not helpful please submit a support ticket via Mendix support.

answered
0

Hi Muhammad, 

 

Checked the docs, this section,

 

image.png

 

How would I check this, I've got 94 widgets in my project, so good chance its in one of them?

 

 

answered
0

The project had a bespoke login page called index.html, which then redirected to index3.html.

 

As per the Mendix R&D team,

 

It seems that the customer has modified the  index.html page to contain a login form, and it currently breaks any deeplink into the app, whether you have a session cookie or not. The PDF Document Generation module uses deeplinks to access the requested page, and therefore does not work with their setup. The module is not able to reach the page since all deeplinks result in the login form (their index.html page) being shown, even though a session exists.

 

I fixed up the project removed the incorrect index.html and put the login logic in the login.html, and now can generate PDF's 

 

Thank you Mendix R&D team for all your help I really appreciate it.

answered