Notifications

306 views

Logged users that do not exist on the sys_user table cannot print to PDF with the Webkit plugin

 

Problem
If you are logged in with a user that does not exist on the sys_user table (for example, maint), trying to use the icon to print to PDF on the homepages will fail.

 Export failed: error

Symptoms
Clicking the download PDF option, results in questions, and then when processing starts, the following error is displayed:

"Export failed: An unexpected error has occured. Please see the instance logs for more details"

The localhost contains the following message:
> Exit with code 1 due to network error: AuthenticationRequiredError

 --localhost----
2017-06-05 03:49:12 (283) glide.background.generation.73ef3423db4fba009b835fa0cf96197f SYSTEM SEVERE *** ERROR *** com.snc.whtp: An error occured on the server
2017-06-05 03:49:12 (288) glide.background.generation.73ef3423db4fba009b835fa0cf96197f SYSTEM SEVERE *** ERROR *** Loading pages (1/6)
[> ] 0%
[======> ] 10%
[==============================> ] 50%
[============================================================] 100%
Counting pages (2/6)
[============================================================] Object 1 of 1
Resolving links (4/6)
[============================================================] Object 1 of 1
Loading headers and footers (5/6)
Printing pages (6/6)
[> ] Preparing
[============================================================] Page 1 of 1
Done
Exit with code 1 due to network error: AuthenticationRequiredError
--localhost----


Reviewing the authentication tokens:
-- https://instance.service-now.com/oauth_credential_list.do

You can confirm the Authentication token was created correctly for the WebKit HTML to PDF. However, there is no user associated to it.

 token with problem

Cause
OAuth fails to bind to a user (authenticate) if the user does not exist on the sys_user table.


Resolution
Do not use a user that does not exist on the sys_user table to print to PDF from a homepage. (Note that very few users fall into this category.)

Instead, either impersonate another user to print the homepage or use the browser print-to-PDF feature if one is available.

Article Information

Last Updated:2018-12-13 22:02:25
Published:2017-06-26
2017-06-22_0805-error.png2017-06-22_0805-working.png2017-06-22_0843-token.png