Welcome to Community Week 2025! Join us to learn, connect, and be recognized as we celebrate the spirit of Community and the power of AI. Get the details  

While Exporing Pdf showing 'An unexpected error has occurred. Please see the instance logs for more'

Pratiksha_45
Kilo Sage

Hello Community,

 

While Exporting Pdf showing following error :

Pratiksha_45_0-1703063145639.png

 

Can anyone guide me to resolve this issue?

Thanks in advanced!

 

3 REPLIES 3

Danish Bhairag2
Tera Sage

Hi @Pratiksha_45 ,

 

This seems to be a custom UI page created , did u check the logs if any error captured?

 

Thanks,

Danish

 

Amit Verma
Kilo Patron
Kilo Patron

Hi @Pratiksha_45 

 

Please check if the below support article helps :

 

https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0869194

 

Thanks & Regards

Amit Verma


Please mark this response as correct and helpful if it assisted you with your question.

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @Pratiksha_45 

 

Description

The button "Download to PDF" fails and shows popup message:
Export Failed An unexpected error has occured. Please see the instance logs for more details 

Checking the system logs, it is showing the following error:
Message - com.snc.whtp: Oauth failed to grant access token: no thrown error Source - com.glide.ui.ServletErrorListener

Cause

Related "WebKit HTML to PDF" OAuth record is missing.

It should be created from the fix script, fix_enable_oauth_access.xml, which is part of the "WebKit HTML to PDF" plugin install.

Resolution

Remove the sys_update record for the fix script execution; search by the name "fix_enable_oauth_access.xml".

Use the "Activate/Repair" link for "WebKit HTML to PDF" plugin.

After that completes the OAuth record will be present.

 

https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0863701

 

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************