Weird 400 error with PrintTask

Discussion created by evtguy on Oct 9, 2013
Latest reply on Jan 28, 2014 by evtguy
So recently I began getting a weird error in an application I've been developing when using the Export Web Map Task. My application will reside within our network but here's a link to a public facing version:


So, in the application, the various points and lines represent projects. When the user clicks on one, a popup appears and within the popup is an option to run a summary report. The code for the summary report by census tract also includes a section which creates a JPEG "vicinity map" and inserts the output JPEG into the report generated (this is created on the fly with HTML in a new browser window). [Note: Most of the report is generated immediately but the JPEG map & the section immediately preceeding it might have a slight day before appearing]

If I run the summary report by census tract on a line based project, everything works fine. If I run it on a point based project, the Export Web Map Task throws an error:
{"error":{"code":400,"message":"Unable to complete operation.","details":["Error executing tool.: Layer \"map_graphics\": �?\nFailed to execute (Export Web Map).\nFailed to execute (Export Web Map Task)."]}}

By playing around, I've figured out that the selected feature graphic for point features is what's choking the export. If I type "map.graphics.clear()" in the console before clicking the report button in my popup, the report (and export process) works correctly.

I'm mystified as to why this is happening, especially since this was working fine a few months ago (I haven't touched the code in the linked version since the ESRI UC).