<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: An error occurred when starting a widget embedded within InfoWindow: Cannot read property '1' of null in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/an-error-occurred-when-starting-a-widget-embedded/m-p/626496#M58461</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Im not sure if your JSON code is bad or you pasted part of the code you have. Your closing bracket is in the wrong position. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//geometry removed&lt;/P&gt;&lt;P&gt;} ]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;}&amp;nbsp; -- This is closing the top of the code.. you have it inside the results declaration. Move it and see if you still get the error.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 04 Nov 2015 23:52:30 GMT</pubDate>
    <dc:creator>FrankJohnson</dc:creator>
    <dc:date>2015-11-04T23:52:30Z</dc:date>
    <item>
      <title>An error occurred when starting a widget embedded within InfoWindow: Cannot read property '1' of null</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/an-error-occurred-when-starting-a-widget-embedded/m-p/626495#M58460</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am getting the above error (init.js:919 API v3.14) identifying a feature in a javascript map viewer, when calling `infoWindow.setFeatures(featureSet);`. The problem is caused by a map service having field aliases with trailing colons in them. The following is part of the json returned from the map service query (geometry removed).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can see the problem, but not sure how to go about fixing it? Is it caused by the json deserialization, serialization by the REST API (10.3.1 server), or a bug in the javascript API?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I only choose outfields that have no trailing colon, it works. I have no control over the offending map service. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;CODE style="font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 11.9px; background: transparent;"&gt;&amp;nbsp; {&lt;BR /&gt;"results":[{&lt;BR /&gt;&amp;nbsp; "layerId":37,&lt;BR /&gt;&amp;nbsp; "layerName":"Waste Water Lateral",&lt;BR /&gt;&amp;nbsp; "displayFieldName":"Unit ID:",&lt;BR /&gt;&amp;nbsp; "value":"NP-MANGO0131SL/1",&lt;BR /&gt;&amp;nbsp; "attributes":{&lt;BR /&gt;&amp;nbsp; "OBJECTID":"2474425",&lt;BR /&gt;&amp;nbsp; "Depth":"0.6",&lt;BR /&gt;&amp;nbsp; "SHAPE":"Polyline",&lt;BR /&gt;&amp;nbsp; "Install":"Null",&lt;BR /&gt;&amp;nbsp; "Unit ID:":"NP-MANGO0131SL/1",&lt;BR /&gt;&amp;nbsp; "Owner:":"W&amp;amp;W",&lt;BR /&gt;&amp;nbsp; "Asset ID:":"115807",&lt;BR /&gt;&amp;nbsp; "Comments:":"Null",&lt;BR /&gt;&amp;nbsp; "NPDC_VECTOR_SDEADMIN_SVEW_WWLATERAL_area":"NP",&lt;BR /&gt;&amp;nbsp; "SHAPE_Length":"8.117518"&lt;BR /&gt;&amp;nbsp; },&lt;BR /&gt;&amp;nbsp; "geometryType":"esriGeometryPolyline"&lt;/CODE&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;CODE style="font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 11.9px; background: transparent;"&gt;// geometry removed &lt;BR /&gt;&amp;nbsp; }&lt;BR /&gt;}]&lt;/CODE&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Nov 2015 21:39:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/an-error-occurred-when-starting-a-widget-embedded/m-p/626495#M58460</guid>
      <dc:creator>TrevorMasters</dc:creator>
      <dc:date>2015-11-04T21:39:15Z</dc:date>
    </item>
    <item>
      <title>Re: An error occurred when starting a widget embedded within InfoWindow: Cannot read property '1' of null</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/an-error-occurred-when-starting-a-widget-embedded/m-p/626496#M58461</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Im not sure if your JSON code is bad or you pasted part of the code you have. Your closing bracket is in the wrong position. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//geometry removed&lt;/P&gt;&lt;P&gt;} ]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;}&amp;nbsp; -- This is closing the top of the code.. you have it inside the results declaration. Move it and see if you still get the error.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Nov 2015 23:52:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/an-error-occurred-when-starting-a-widget-embedded/m-p/626496#M58461</guid>
      <dc:creator>FrankJohnson</dc:creator>
      <dc:date>2015-11-04T23:52:30Z</dc:date>
    </item>
    <item>
      <title>Re: An error occurred when starting a widget embedded within InfoWindow: Cannot read property '1' of null</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/an-error-occurred-when-starting-a-widget-embedded/m-p/626497#M58462</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: arial, helvetica, sans-serif;"&gt;Sorry, It is my copy/paste that is incorrect - I tried to simplify the example by removing lines, and adding newlines. The key thing is the trailing colon (:) in any field name. The response Json looks correct (e.g. "Comments:":"Null") but this gets interpreted as "Comments"::"Null". &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Nov 2015 00:10:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/an-error-occurred-when-starting-a-widget-embedded/m-p/626497#M58462</guid>
      <dc:creator>TrevorMasters</dc:creator>
      <dc:date>2015-11-05T00:10:43Z</dc:date>
    </item>
  </channel>
</rss>

