So, today ... an automation I built just stopped working. More accurately, the render.xmlToPdf function throws a classic unexpected error. (Line 221 is the render.xmlToPdf call)
{"type":"error.SuiteScriptError","name":"UNEXPE CTE D_ERROR","message":null,"stack":["renderXmlToPdf(N/render)","<anonymous>(/SuiteScripts/DH/DH_GeneratePDF.js:211)"],"cause":{"type":"internal error","code":"UNEXPECTED_ERROR","details":null,"u serEvent":null,"stackTrace":["renderXmlToPdf(N/render)","<anonymous>(/SuiteScripts/DH/DH_GeneratePDF.js:211)"],"notifyOff":false},"id":"","notifyOff":false}
This has been working for more than a quarter, so why fail now?
Here's the xmlString I'm passing into the function. The xml itself passes all validations and has no bad characters. And 3 image references resolve fine.
&lt;?xml version="1.0"?&gt; <span style="color:'#000000'">&lt;!DOCTYPE pdf PUBLIC "-//big.faceless.org//report" "report-1.1.dtd"&gt;</span> <span style="color:'#000000'">&lt;pdf&gt;</span> &lt;head&gt; &lt;meta name="author" value="Diply Inc." /&gt; &lt;meta name="title" value="Report 1" /&gt; &lt;meta name="subject" value="Report 1" /&gt; &lt;meta name="layout" value="single-page" /&gt; &lt;link name="myCalibri" type="font" subtype="TrueType" src="https://system.na1.netsuite.com/core/media/media.nl?id=8187&c=4145004&h=9363dc62b5d32496d2d1" /&gt; &lt;style type="text/css"&gt; body {font-family:myCalibri;color:rgb(56,56,56);} &lt;/style&gt; &lt;macrolist&gt; &lt;macro id="diplyBanner"&gt; &lt;img align="center" width="9.7in" height="0.55in" src="https://system.na1.netsuite.com/core/media/media.nl?id=8187&c=4145004&h=9363dc62b5d32496d2d1" /&gt; &lt;/macro&gt; &lt;/macrolist&gt; &lt;/head&gt; &lt;body size="Letter-landscape" header="diplyBanner" footer="diplyBanner" footer-height="0.55in" header-height="0.55in"&gt; &lt;div style="border:0px;width:9.8in;height:6.2in;left:0.12in;top:0.1in;"&gt; &lt;table width="100%"&gt; &lt;tr&gt; &lt;td font-size="28pt"&gt;Vendor Report&lt;/td&gt; &lt;td align="right"&gt; &lt;img width="70" height="36" src="https://system.na1.netsuite.com/core/media/media.nl?id=8188&c=4145004&h=75cfd0f28b57499acaf3" /&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td colspan="2"&gt; &lt;p font-size="22pt"&gt;Batdad - batdad&lt;/p&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td colspan="2"&gt;2016-10-1 - 2016-10-31&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td colspan="2"&gt; &lt;table width="100%" border="1"&gt; &lt;tr&gt; &lt;td align="center"&gt; &lt;p font-size="22pt"&gt;Traffic Summary&lt;/p&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt; &lt;areagraph width="100%" height="200" xaxis-rotate="135" yaxis-formatter="simple(###,###,###,###)" xaxis-formatter="date()" keybox-border-color="white" draw-segments="false"&gt; &lt;datacurve name="Entrances" color="rgb(80,145,207)"&gt; &lt;sample x="2016-10-1" y="203140" /&gt; &lt;sample x="2016-10-2" y="230008" /&gt; &lt;sample x="2016-10-3" y="270984" /&gt; &lt;sample x="2016-10-4" y="269265" /&gt; &lt;sample x="2016-10-5" y="242557" /&gt; &lt;sample x="2016-10-6" y="240892" /&gt; &lt;sample x="2016-10-7" y="278218" /&gt; &lt;sample x="2016-10-8" y="193905" /&gt; &lt;sample x="2016-10-9" y="189003" /&gt; &lt;sample x="2016-10-10" y="296184" /&gt; &lt;sample x="2016-10-11" y="294680" /&gt; &lt;sample x="2016-10-12" y="273244" /&gt; &lt;sample x="2016-10-13" y="273629" /&gt; &lt;sample x="2016-10-14" y="315921" /&gt; &lt;sample x="2016-10-15" y="325897" /&gt; &lt;sample x="2016-10-16" y="384168" /&gt; &lt;sample x="2016-10-17" y="419707" /&gt; &lt;sample x="2016-10-18" y="270235" /&gt; &lt;sample x="2016-10-19" y="242704" /&gt; &lt;sample x="2016-10-20" y="210555" /&gt; &lt;sample x="2016-10-21" y="310148" /&gt; &lt;sample x="2016-10-22" y="387105" /&gt; &lt;sample x="2016-10-23" y="268218" /&gt; &lt;sample x="2016-10-24" y="214173" /&gt; &lt;sample x="2016-10-25" y="229044" /&gt; &lt;sample x="2016-10-26" y="310700" /&gt; &lt;sample x="2016-10-27" y="318402" /&gt; &lt;sample x="2016-10-28" y="266275" /&gt; &lt;sample x="2016-10-29" y="285646" /&gt; &lt;sample x="2016-10-30" y="214990" /&gt; &lt;sample x="2016-10-31" y="276756" /&gt; &lt;/datacurve&gt; &lt;datacurve name="PageViews" color="rgb(234,113,43)"&gt; &lt;sample x="2016-10-1" y="911766" /&gt; &lt;sample x="2016-10-2" y="796145" /&gt; &lt;sample x="2016-10-3" y="876867" /&gt; &lt;sample x="2016-10-4" y="893255" /&gt; &lt;sample x="2016-10-5" y="1100652" /&gt; &lt;sample x="2016-10-6" y="1063183" /&gt; &lt;sample x="2016-10-7" y="1110515" /&gt; &lt;sample x="2016-10-8" y="771230" /&gt; &lt;sample x="2016-10-9" y="576867" /&gt; &lt;sample x="2016-10-10" y="1184135" /&gt; &lt;sample x="2016-10-11" y="1106750" /&gt; &lt;sample x="2016-10-12" y="947991" /&gt; &lt;sample x="2016-10-13" y="958310" /&gt; &lt;sample x="2016-10-14" y="1147443" /&gt; &lt;sample x="2016-10-15" y="1491282" /&gt; &lt;sample x="2016-10-16" y="1527383" /&gt; &lt;sample x="2016-10-17" y="1688459" /&gt; &lt;sample x="2016-10-18" y="971854" /&gt; &lt;sample x="2016-10-19" y="904257" /&gt; &lt;sample x="2016-10-20" y="921247" /&gt; &lt;sample x="2016-10-21" y="1276388" /&gt; &lt;sample x="2016-10-22" y="1677587" /&gt; &lt;sample x="2016-10-23" y="969554" /&gt; &lt;sample x="2016-10-24" y="765527" /&gt; &lt;sample x="2016-10-25" y="967649" /&gt; &lt;sample x="2016-10-26" y="1229230" /&gt; &lt;sample x="2016-10-27" y="1124628" /&gt; &lt;sample x="2016-10-28" y="898410" /&gt; &lt;sample x="2016-10-29" y="1038927" /&gt; &lt;sample x="2016-10-30" y="783552" /&gt; &lt;sample x="2016-10-31" y="914921" /&gt; &lt;/datacurve&gt; &lt;/areagraph&gt; &lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td colspan="2"&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td align="center"&gt; &lt;table cellpadding="2" width="200"&gt; &lt;tr background-color="rgb(254,216,111)"&gt; &lt;td&gt;Total Earnings&lt;/td&gt; &lt;td align="right"&gt;So, today ... an automation I built just stopped working. More accurately, the render.xmlToPdf function throws a classic unexpected error. (Line 221 is the render.xmlToPdf call)