Struggling with migration of an existing ArcGIS Server custom print service (GP Service). Basically this used the steps here to publish some custom layouts via the ExportWebMap/GetLayouttemplates server tools, as explained here.
This is working in 10.6 but not in my new 10.8 environment. I thought the issue was on the publishing end. But even after upgrading Pro to match AGE 10.8, creating new Layout files (PAGX) and republishing, the problem persists.
Here is what I'm seeing when sending webmap JSON to service from a custom Print widget in WAB ('custom' does not imply Wild West - I made some tweaks to the Print widget and this has worked just fine in 10.6).
The REST endpoint URL for the custom print service is hardcoded into the Print widget's in the WAB app's folder:
apps\my_app\configs\Print\config_widgets_Print_Widget_NaN.json
Even before submitting print job, Dev Tools informs me when opening Print widget:
Get Layout Templates Info Error Error: Invalid URL
at Object.B.f.load (init.js:957)
at init.js:88
at c (init.js:104)
at e (init.js:104)
at b.Deferred.resolve.callback (init.js:105)
at c (init.js:105)
at e (init.js:104)
at b.Deferred.resolve.callback (init.js:105)
at init.js:93
at m (init.js:108)
After submitting, job fails:
Error: esriJobFailed
at Object._handler (PrintTask.js:7)
at init.js:64
at b (PrintTask.js:13)
at Object._successHandler (init.js:2371)
at Object._jobUpdateHandler (Geoprocessor.js:11)
at init.js:64
at Object.load (Geoprocessor.js:11)
at init.js:973
at c (init.js:104)
at e (init.js:104)
The 'Geoprocessor' line goes back to '_getJobStatus' when trying to go a jobs folder.
Similary, in my AGS log file, I see an issue with getting to a PDF file ...
<?xml version="1.0" encoding="utf-8" ?>
<Msg time='2021-04-30T15:35:38,218' type='SEVERE' code='20010' target='customPrinting/my_failing.GPServer' methodName='GPServerSync.CheckMessages' machine='<my_server>' process='8608' thread='12016' user='null' requestId='7dd6ba0a-ea9a-4ce1-aba8-c657f4ef8999'>Error executing tool.
Export Web Map Job ID: j715e45d677d6477ab46a9f72a68c15b5 : error raised...
E:\arcgisserver\directories\arcgisjobs\customprinting\my_failing_gpserver\j715e45d677d6477ab46a9f72a68c15b5\scratch\9e42231a-a9f3-11eb-9e8f-005056a6efee.pdf
E:\arcgisserver\directories\arcgisjobs\customprinting\my_failing_gpserver\j715e45d677d6477ab46a9f72a68c15b5\scratch\9e42231a-a9f3-11eb-9e8f-005056a6efee.pdf
Failed to execute (Export Web Map).
Failed to execute (Export Web Map).
</Msg>
My suspicion was that service is trying to write a PDF and lacks permissions (for whatever reason). But even granting AGS account full control over the 'directories' folder , it fails.
Any suggestions what else I can check? I'm not sure if it's an issue with getting to the templates - I see the template files in the service directory on the AGS machine after publishing - or with creating a PDF output file, or both.
This is published as 'Asynchronous'.