PDF Generation runs indefinitely sometimes and works some other time

0
Hi all,   I have a problem with the PDF Document Generation Module from Mendix.   Sometimes the pdf generation works and sometimes it just loads indefinitely or stops and throws an error.   The logs suggest that it is caused by a timeout:   However when I call the page with a button it shows up instantly. And in the local environment (localhost) the document gets generated immediately.   Does anybody know why this happens? It also seems to work less and less by every day I try it again (it didn't work a single time today, worked most of the time a week ago)   Thanks
asked
3 answers
0

Hello! 

 

Did you update the module to the latest version? This could maybe solve the problem.

 

I expect that you pass an object to the page where the PDF is generated?! Make sure to validate that the object isn't empty. Maybe in some scenarios this could be the issue.

 

answered
0

Could anything else be using that object? I wonder if there is a lock on it so your action can't complete and times out.

answered
0

While testing, I got the same problem as you. I pulled back the registration of the module in backend and created a new API key. 

 

What I noticed with this is that an API Key had to be used before, and now it has to be a Personal Access Tokens (PAT). 

 

From the documentation:

For registering your app environment(s), we now require a personal access token (PAT) instead of your developer API key. The PAT can be created in your Developer Settings in the Mendix Developer portal. For the scope, select 'mx:deployment:read' of the applicable deployment type. Existing app environment registrations stay valid after the module update, you do not need to re-register your app.

 

After changing this and upgrading to v1.5.0, it worked for me.

answered