AnsweredAssumed Answered

Geoprocessing Web Tool Generates Unexpected Token '<' Error

Question asked by lcarson_RES on Jul 1, 2020

I'm running into an odd token error after running a custom geoprocessing tool that I had set up as a widget in my web application. After I run the tool in my web app, the output shows Unexpected token '<'. Any advice would be greatly appreciated as to what this error means and how I might be able to resolve it!

 

For some background information, I created a python script tool where my result will be an output group of features with a message added showing the sum of an attribute value of my group of features. I published my geoprocessing result to create a web tool in enterprise. I set the configuration of the tool to be asynchronous and I checked the box to view the output in map image layer. I also tested publishing with the output box unchecked but still got the token error. I set the message level to show "Info" thinking perhaps that would give me the sum of my attribute value.

In my web app I set up the web tool as a widget where the user can set the input feature class to be a layer in the web app (data sourced to my enterprise sde geodatabase). All the user has to do is set that layer and input a feature ID and click Execute. Unfortunately I get the Unexpected token '<' error shown below.

 

Note that I published this web tool to an internal private enterprise service that can only be accessed on our server. It is not public facing but does not need to be since it will only be used internally. Is there a setting that I need to apply in order to avoid this token error?

 

Thank you for any input you can provide!

Outcomes