<?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: Search Widget console errors featureResult undefined in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/search-widget-console-errors-featureresult/m-p/1270470#M80627</link>
    <description>&lt;P&gt;The location of the error is on&amp;nbsp;&lt;SPAN&gt;line 1 below. &lt;/SPAN&gt;&lt;/P&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;const queryFeatureLayer = new FeatureLayer({ params here... }&lt;BR /&gt;const queryObject = queryFeatureLayer.createQuery();&lt;BR /&gt;set the queryObject&amp;nbsp; params&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;run query&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;1. queryFeatureLayer&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;queryFeatures&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;queryObject&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;2.&amp;nbsp; &amp;nbsp;.&lt;/SPAN&gt;&lt;SPAN&gt;then&lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;layerView&lt;/SPAN&gt;&lt;SPAN&gt;) &lt;/SPAN&gt;&lt;SPAN&gt;=&amp;gt;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;{ ...&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;}&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&lt;SPAN&gt;My guess is that the server responded with zero results or did not complete the query at all. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Running the query a second time often works, so my&amp;nbsp;&lt;/SPAN&gt;workaround is to run again.&lt;/P&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&lt;SPAN&gt;if&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;error&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;message&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;indexOf&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'featureResult'&lt;/SPAN&gt;&lt;SPAN&gt;) &amp;gt; -&lt;/SPAN&gt;&lt;SPAN&gt;1&lt;/SPAN&gt;&lt;SPAN&gt;) {&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;setTimeout&lt;/SPAN&gt;&lt;SPAN&gt;(() &lt;/SPAN&gt;&lt;SPAN&gt;=&amp;gt;&lt;/SPAN&gt;&lt;SPAN&gt; {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; run the query again&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }, &lt;/SPAN&gt;&lt;SPAN&gt;350&lt;/SPAN&gt;&lt;SPAN&gt;);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;</description>
    <pubDate>Wed, 22 Mar 2023 16:18:50 GMT</pubDate>
    <dc:creator>GregoryBologna</dc:creator>
    <dc:date>2023-03-22T16:18:50Z</dc:date>
    <item>
      <title>Search Widget console errors featureResult undefined</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/search-widget-console-errors-featureresult/m-p/1247846#M79890</link>
      <description>&lt;P&gt;The Search Widget occassionally returns this error to Chrome console on&amp;nbsp;&lt;SPAN&gt;suggest-complete. Happens on first use but works as expected afterwards. This was reported in an earlier version here.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/search-widget-console-errors-showing-up-in-version/m-p/1097835#M74658" target="_self"&gt;https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/search-widget-console-errors-showing-up-in-version/m-p/1097835#M74658&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;Click in search field.&lt;/STRONG&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="GregoryBologna_1-1673559275580.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/60327i73C36BD24EF68BCA/image-size/medium?v=v2&amp;amp;px=400" role="button" title="GregoryBologna_1-1673559275580.png" alt="GregoryBologna_1-1673559275580.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;suggest-complete&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="GregoryBologna_0-1673559256119.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/60326iC0B403C7622B6B92/image-size/medium?v=v2&amp;amp;px=400" role="button" title="GregoryBologna_0-1673559256119.png" alt="GregoryBologna_0-1673559256119.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;Console message&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;[esri.widgets.Search.SearchViewModel] TypeError: Cannot read properties of undefined (reading 'featureResult')&lt;/P&gt;&lt;P&gt;at q (&lt;A href="https://js.arcgis.com/4.25/:43:249" target="_blank" rel="noopener"&gt;https://js.arcgis.com/4.25/:43:249&lt;/A&gt;) {stack: 'TypeError: Cannot read properties of undefine… at q (&lt;A href="https://js.arcgis.com/4.25/:43:249" target="_blank" rel="noopener"&gt;https://js.arcgis.com/4.25/:43:249&lt;/A&gt;)', message: 'Cannot read properties of undefined (reading 'featureResult')'}&lt;/P&gt;&lt;P&gt;arg1:&lt;BR /&gt;TypeError: Cannot read properties of undefined (reading 'featureResult')\n at a.parsePBFFeatureQuery (&lt;A href="https://js.arcgis.com/4.25/:2160:431)\" target="_blank" rel="noopener"&gt;https://js.arcgis.com/4.25/:2160:431)\&lt;/A&gt;n at Module.&amp;lt;anonymous&amp;gt; (&lt;A href="https://js.arcgis.com/4.25/:2140:466)\" target="_blank" rel="noopener"&gt;https://js.arcgis.com/4.25/:2140:466)\&lt;/A&gt;n at Generator.next (&amp;lt;anonymous&amp;gt;)\n at d (&lt;A href="https://js.arcgis.com/4.25/:38:488)\" target="_blank" rel="noopener"&gt;https://js.arcgis.com/4.25/:38:488)\&lt;/A&gt;n at q (&lt;A href="https://js.arcgis.com/4.25/:43:249" target="_blank" rel="noopener"&gt;https://js.arcgis.com/4.25/:43:249&lt;/A&gt;) {stack: 'TypeError: Cannot read properties of undefine… at q (&lt;A href="https://js.arcgis.com/4.25/:43:249" target="_blank" rel="noopener"&gt;https://js.arcgis.com/4.25/:43:249&lt;/A&gt;)', message: 'Cannot read properties of undefined (reading 'featureResult')'}&lt;BR /&gt;message:&lt;BR /&gt;'Cannot read properties of undefined (reading 'featureResult')'&lt;BR /&gt;stack:&lt;BR /&gt;'TypeError: Cannot read properties of undefined (reading 'featureResult')\n at a.parsePBFFeatureQuery (&lt;A href="https://js.arcgis.com/4.25/:2160:431)\" target="_blank" rel="noopener"&gt;https://js.arcgis.com/4.25/:2160:431)\&lt;/A&gt;n at Module.&amp;lt;anonymous&amp;gt; (&lt;A href="https://js.arcgis.com/4.25/:2140:466)\" target="_blank" rel="noopener"&gt;https://js.arcgis.com/4.25/:2140:466)\&lt;/A&gt;n at Generator.next (&amp;lt;anonymous&amp;gt;)\n at d (&lt;A href="https://js.arcgis.com/4.25/:38:488)\" target="_blank" rel="noopener"&gt;https://js.arcgis.com/4.25/:38:488)\&lt;/A&gt;n at q (&lt;A href="https://js.arcgis.com/4.25/:43:249" target="_blank" rel="noopener"&gt;https://js.arcgis.com/4.25/:43:249&lt;/A&gt;)'&lt;BR /&gt;[[Prototype]]:&lt;BR /&gt;Error&lt;BR /&gt;m._consoleWriter @ js.arcgis.com/4.25/(index):150:331&lt;/P&gt;</description>
      <pubDate>Thu, 12 Jan 2023 21:39:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/search-widget-console-errors-featureresult/m-p/1247846#M79890</guid>
      <dc:creator>GregoryBologna</dc:creator>
      <dc:date>2023-01-12T21:39:50Z</dc:date>
    </item>
    <item>
      <title>Re: Search Widget console errors featureResult undefined</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/search-widget-console-errors-featureresult/m-p/1270470#M80627</link>
      <description>&lt;P&gt;The location of the error is on&amp;nbsp;&lt;SPAN&gt;line 1 below. &lt;/SPAN&gt;&lt;/P&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;const queryFeatureLayer = new FeatureLayer({ params here... }&lt;BR /&gt;const queryObject = queryFeatureLayer.createQuery();&lt;BR /&gt;set the queryObject&amp;nbsp; params&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;run query&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;1. queryFeatureLayer&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;queryFeatures&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;queryObject&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;2.&amp;nbsp; &amp;nbsp;.&lt;/SPAN&gt;&lt;SPAN&gt;then&lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;layerView&lt;/SPAN&gt;&lt;SPAN&gt;) &lt;/SPAN&gt;&lt;SPAN&gt;=&amp;gt;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;{ ...&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;}&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&lt;SPAN&gt;My guess is that the server responded with zero results or did not complete the query at all. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Running the query a second time often works, so my&amp;nbsp;&lt;/SPAN&gt;workaround is to run again.&lt;/P&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&lt;SPAN&gt;if&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;error&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;message&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;indexOf&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'featureResult'&lt;/SPAN&gt;&lt;SPAN&gt;) &amp;gt; -&lt;/SPAN&gt;&lt;SPAN&gt;1&lt;/SPAN&gt;&lt;SPAN&gt;) {&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;setTimeout&lt;/SPAN&gt;&lt;SPAN&gt;(() &lt;/SPAN&gt;&lt;SPAN&gt;=&amp;gt;&lt;/SPAN&gt;&lt;SPAN&gt; {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; run the query again&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }, &lt;/SPAN&gt;&lt;SPAN&gt;350&lt;/SPAN&gt;&lt;SPAN&gt;);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 22 Mar 2023 16:18:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/search-widget-console-errors-featureresult/m-p/1270470#M80627</guid>
      <dc:creator>GregoryBologna</dc:creator>
      <dc:date>2023-03-22T16:18:50Z</dc:date>
    </item>
  </channel>
</rss>

