247
Views
20
Comments
Solved
[Ultimate PDF] An error occurred while generating the PDF in non-prod enviroenment
Question
ultimate-pdf
Reactive icon
Forge asset by Leonardo Fernandes
Application Type
Reactive

My UltimatePDF-PrinTtoPDF is working in the dev environment, but when deployed to the UAT/Test Environment I get an error "An error occurred while generating the PDF"

Error Logs in service center:

MessageAn error occurred while generating the pdf for https://scotp-tst.outsystemsenterprise.com/BARISTA/ApplicationForm/ApplicationForm: Could not find browser required manifest file

Environment InformationeSpaceVer: Id=986, PubId=0, CompiledWith=11.18.1.37828RequestUrl: https://scotp-tst.outsystemsenterprise.com/BARISTA/screenservices/BARISTA/MainFlow/Dashboard/ActionPrintToPDF (Method: POST)AppDomain: /LM/W3SVC/1/ROOT/BARISTA-398-133259735199372806FilePath: D:\OutSystems\Platform Server\running\BARISTA.219468045\ClientIp: 10.200.2.203 X-Forwarded-For: 161.49.195.39Locale: en-USDateFormat: yyyy-MM-ddPID: 3852 ('w3wp', Started='3/16/2023 6:17:30 PM', Priv=1364Mb, Virt=2110986Mb)TID: 96Thread Name:.NET: 4.0.30319.42000

StackAn error occurred while generating the pdf for https://scotp-tst.outsystemsenterprise.com/BARISTA/ApplicationForm/ApplicationForm: Could not find browser required manifest file   at ssUltimatePDF.Actions.ActionPrintPDF_Proxy(HeContext heContext, String inParamURL, String inParamTemporaryFolder, String inParamProduct, String inParamRevision, RCViewportRecord inParamViewport, STUserEnvironmentStructure inParamEnvironment, RCPaperRecord inParamPaper, Byte[]& outParamPDF)   at ssUltimatePDF.Actions.ActionPrintToPDF_Advanced(HeContext heContext, String inParamURL, STUserEnvironmentStructure inParamEnvironment, String inParamPaperSize, String inParamMarginSize, Byte[]& outParamPDF)

Please Help as we are currently deploying this into production by tomorrow.

Thank you

2019-07-08 11-04-35
Leonardo Fernandes
 
MVP
Solution


Hi Samuel. I was able to reproduce this scenario, and improved the recovery in version 9.0.2.

The issue happens whenever the revision files are attempted to be deleted while the browser process is still active. Some files can still be deleted even though the process is running, resulting in an unhealthy revision which could not be recovered because a process was still executing.

2019-07-08 11-04-35
Leonardo Fernandes
 
MVP

Hi Jayson.

Are you still facing this error? I believe the system can recover from it if you retry generating another PDF.

The issue is probably caused by some cleanup task deleting files in the temporary folder of the operating system. However Ultimate PDF will detect that files are missing and will download the browser revision again.

2019-07-08 11-04-35
Leonardo Fernandes
 
MVP

Hi Jayson. The version 9.0.0 should fix this error.

UserImage.jpg
Samuel Gustin

We are using the new version 9.0.0 and experience a lot of inconsistencies. We get the error message "Could not find browser required manifest file" in service center. On the screen you get the same as above "An error occurred while generating the pdf" message. This happens when trying to make a PDF of a screen. It does not happen all the time sometimes it works great for one user a couple of times and after that this error message appears and sometimes for another user this error message happens almost right away. @Leonardo Fernandes Do you know if it something that we on our side can do to solve this. We currently have this issue deployed to our production enviroment. 





 

2019-07-08 11-04-35
Leonardo Fernandes
 
MVP

Hi Samuel Gustin.

This error happens because some of the files of the browser were deleted from the temporary folder. I believe OutSystems cloud environments have an automated cleanup task to delete everything in the temporary folder, and sometimes when it can't delete everything it causes this error.

Version 9.0.0 was supposed to fix this by deleting the browser files and then re-downloading the browser again.

If you're still seeing this error, then I published version 9.0.1 which might fix your issue, even though I couldn't replicate it. Please try updating to 9.0.1 and let me know the results.

Thank you.

UserImage.jpg
Samuel Gustin

Hi Leonardo.

Thank you for the quick response!

I downloaded the management tool yesterday and saw that the broswer revisions where not "healthy". I killed all active processes, browser revisions and deleted all temporary folders. After that we could not replicate the issue. I saw another "unhealthy" revision though  before I downloaded the new version. After I downloaded the new version and the "unhealthy" revision dissapered by itself. As things are now I can not replicate the issue.

Thank you again!


2019-07-08 11-04-35
Leonardo Fernandes
 
MVP
Solution


Hi Samuel. I was able to reproduce this scenario, and improved the recovery in version 9.0.2.

The issue happens whenever the revision files are attempted to be deleted while the browser process is still active. Some files can still be deleted even though the process is running, resulting in an unhealthy revision which could not be recovered because a process was still executing.

UserImage.jpg
Noury Kraaikamp

Hi leonardo, I am experiencing the exact same problem as Jayson. 

Currently running on 10.0.3

Dev environment works fine, but after publishing to test(QA) environment we get the 500 server error.

2019-07-08 11-04-35
Leonardo Fernandes
 
MVP


Hi Noury.

Please share the error logs from service center, including the stack trace. If you have multiple error logs for the same occurrence, please share all of them.

UserImage.jpg
Noury Kraaikamp

Hi Leonardo, 

I got 4 errors, 2 from UltimatePDF, and 2 from UltimatePDF_Service.

Hope this helps.

2019-07-08 11-04-35
Leonardo Fernandes
 
MVP


What is the value of the site property PreventAutomaticDownloads (module UltimatePDF)?

UserImage.jpg
Noury Kraaikamp

Should be default. Didn't change it.

Default value is nothing looking at the module itself.

2019-07-08 11-04-35
Leonardo Fernandes
 
MVP


If you haven't changed that site property, then Ultimate PDF should have recovered from that error automatically by downloading the browser again.

The error is caused by a cleanup task that deletes temporary files regularly. So they only way to recover is to download the browser again.


Are you still receiving the same error? If so, can I ask you to install Ultimate PDF Management, and then download the environment information zip file? This will download a large zip file, but I only need you to share the Revisions.txt and Settings.txt found inside of it.

UserImage.jpg
Noury Kraaikamp

Yes thanks for the support! Still experiencing the same issue.

Here are the files requested, had some issues with getting the management tool to work but after deleting the usetimout server action it worked fine. Hope it doesn't effect the results.

Revisions.txt
Settings.txt
2019-07-08 11-04-35
Leonardo Fernandes
 
MVP


Hi Noury. The error message you mentioned (could not find browser required manifest file) happens when there's no manifest file in the google chrome revision folder. However, in the Revisions.txt file you last attached, we can clearly see that there's a manifest file: 110.0.5478.0.manifest

So you should no longer have this error. Please confirm if that is the case.

If you're still having this error, can I ask if the error happens with every PDF? Or just a specific PDF? Since you have Ultimate PDF Management installed, there's a Test PDF button, does that work?

And could you update to version 10.0.4? I've added more details to the error message.

UserImage.jpg
Noury Kraaikamp

Hi Leonardo,

Error is still acurring.

Send the files from the wrong environment. I've attached the correct ones. Don't know if there is a difference in them but thought i should share the right ones non the less.   

Will update to the latest version.

Revisions.txt
Settings.txt
2019-07-08 11-04-35
Leonardo Fernandes
 
MVP


Hi Noury. Now it makes more sense, the new Revisions.txt file doesn't include any manifest file.

Can I ask you to download the UltimatePDF_Service module from that environment and share it here?

Thank you.

UserImage.jpg
Noury Kraaikamp

Hi Leonardo,

Thanks for the quick response, I downloaded the service module. you can find it in the attachments.


UltimatePDF_Service_v1.oml
2019-07-08 11-04-35
Leonardo Fernandes
 
MVP


Noury, your version of Ultimate PDF is quite old. As I mentioned in the solution of this post, the version 9.0.2 solves this issue. It includes this call in the PrintPDF service action, which will download Google Chrome binaries again if it detects any files are missing.


I suggest you upgrade to 9.0.2 at least, but you might as well upgrade to the latest version (10.0.4).

UserImage.jpg
Noury Kraaikamp

Hi Leonardo,

Thanks, upgrading to 10.0.4 fixed the problem. I thought i was on the latsest version already but apperantly not. Thanks for the amazing support!

2020-02-07 09-04-54
Liesbeth

Hi, I am currently having the same issue. The issue is only occuring in production, not in test or development. I checked the version but we are working with version 11. I will make a new post for this

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.