<?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 Analysis widget failing on creation to generate valid token - error 498 in Developers Questions</title>
    <link>https://community.esri.com/t5/developers-questions/analysis-widget-failing-on-creation-to-generate/m-p/1031836#M5774</link>
    <description>&lt;P&gt;I'm trying to develop my own widget for a web map, based on the Analysis widget.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I create a new web 2D web app from the ArcGIS Web AppBuilder menu.&lt;/P&gt;&lt;P&gt;I try and add a widget to the screen based on the 'Analysis' widget, selecting the 'Find Nearest' tool within the widget.&amp;nbsp; I have ticked every config box within the tool to be checked.&lt;/P&gt;&lt;P&gt;The widget is now added to the map.&lt;/P&gt;&lt;P&gt;If I click the widget, the tool opens, with all the selection layers empty (as expected as I have not added any map layers).&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, the network console in developer tools shows a never ending loop of communication going on at this point.&lt;/P&gt;&lt;P&gt;Calls to&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A target="_blank" rel="noopener"&gt;https://www.arcgis.com/sharing/generateToken?request=getToken&amp;amp;serverUrl=https%3A%2F%2Fanalysis3.arcgis.com%2Farcgis%2Frest%2Fservices%2Ftasks%2FGPServer&amp;amp;token=&amp;lt;snip&amp;gt;&amp;amp;referer=localhost%3A3344&amp;amp;f=json&lt;/A&gt;&lt;/P&gt;&lt;P&gt;are then followed by&lt;/P&gt;&lt;P&gt;&lt;A target="_blank" rel="noopener"&gt;https://analysis3.arcgis.com/arcgis/rest/services/tasks/GPServer?f=json&amp;amp;token=&amp;lt;snip&amp;gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;and repeat.&amp;nbsp; From adding some console.log messages, and looking at the responses, I can see that the calls for a Token are successful, but the calls to the GPServer always return&lt;/P&gt;&lt;P&gt;{"error":{"code":498,"message":"Invalid token.","details":[]}}&lt;/P&gt;&lt;P&gt;I've tried with maps with layers in - the first two selection boxes are completed but not the third one.&amp;nbsp; I've tried adding&amp;nbsp;&lt;A href="https://analysis3.arcgis.com/arcgis/rest/services/tasks/GPServer" target="_blank" rel="noopener"&gt;https://analysis3.arcgis.com/arcgis/rest/services/tasks/GPServer&lt;/A&gt;&amp;nbsp;as a GeoProcessing layer but that just times out validating.&lt;/P&gt;&lt;P&gt;I have been looking at this for a while now without success.&amp;nbsp; Any clues?&lt;/P&gt;&lt;P&gt;For clarity, I haven't written any of this code - it is all OOTB esri code, so I am assuming that it is a configuration issue, but I can't see what I am missing.&lt;/P&gt;&lt;P&gt;I've used the routing widget successfully (obviously I had to configure the routing service that the widget would use, but that validated nicely - there is no such configuration immediately obvious for the Analysis widget, and the documentation is quite vague regarding the geoprocessing service, saying only that I should have permission to use it, which as far as I can tell, I have).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 02 Mar 2021 11:45:57 GMT</pubDate>
    <dc:creator>RobBoothIBM</dc:creator>
    <dc:date>2021-03-02T11:45:57Z</dc:date>
    <item>
      <title>Analysis widget failing on creation to generate valid token - error 498</title>
      <link>https://community.esri.com/t5/developers-questions/analysis-widget-failing-on-creation-to-generate/m-p/1031836#M5774</link>
      <description>&lt;P&gt;I'm trying to develop my own widget for a web map, based on the Analysis widget.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I create a new web 2D web app from the ArcGIS Web AppBuilder menu.&lt;/P&gt;&lt;P&gt;I try and add a widget to the screen based on the 'Analysis' widget, selecting the 'Find Nearest' tool within the widget.&amp;nbsp; I have ticked every config box within the tool to be checked.&lt;/P&gt;&lt;P&gt;The widget is now added to the map.&lt;/P&gt;&lt;P&gt;If I click the widget, the tool opens, with all the selection layers empty (as expected as I have not added any map layers).&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, the network console in developer tools shows a never ending loop of communication going on at this point.&lt;/P&gt;&lt;P&gt;Calls to&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A target="_blank" rel="noopener"&gt;https://www.arcgis.com/sharing/generateToken?request=getToken&amp;amp;serverUrl=https%3A%2F%2Fanalysis3.arcgis.com%2Farcgis%2Frest%2Fservices%2Ftasks%2FGPServer&amp;amp;token=&amp;lt;snip&amp;gt;&amp;amp;referer=localhost%3A3344&amp;amp;f=json&lt;/A&gt;&lt;/P&gt;&lt;P&gt;are then followed by&lt;/P&gt;&lt;P&gt;&lt;A target="_blank" rel="noopener"&gt;https://analysis3.arcgis.com/arcgis/rest/services/tasks/GPServer?f=json&amp;amp;token=&amp;lt;snip&amp;gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;and repeat.&amp;nbsp; From adding some console.log messages, and looking at the responses, I can see that the calls for a Token are successful, but the calls to the GPServer always return&lt;/P&gt;&lt;P&gt;{"error":{"code":498,"message":"Invalid token.","details":[]}}&lt;/P&gt;&lt;P&gt;I've tried with maps with layers in - the first two selection boxes are completed but not the third one.&amp;nbsp; I've tried adding&amp;nbsp;&lt;A href="https://analysis3.arcgis.com/arcgis/rest/services/tasks/GPServer" target="_blank" rel="noopener"&gt;https://analysis3.arcgis.com/arcgis/rest/services/tasks/GPServer&lt;/A&gt;&amp;nbsp;as a GeoProcessing layer but that just times out validating.&lt;/P&gt;&lt;P&gt;I have been looking at this for a while now without success.&amp;nbsp; Any clues?&lt;/P&gt;&lt;P&gt;For clarity, I haven't written any of this code - it is all OOTB esri code, so I am assuming that it is a configuration issue, but I can't see what I am missing.&lt;/P&gt;&lt;P&gt;I've used the routing widget successfully (obviously I had to configure the routing service that the widget would use, but that validated nicely - there is no such configuration immediately obvious for the Analysis widget, and the documentation is quite vague regarding the geoprocessing service, saying only that I should have permission to use it, which as far as I can tell, I have).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Mar 2021 11:45:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/analysis-widget-failing-on-creation-to-generate/m-p/1031836#M5774</guid>
      <dc:creator>RobBoothIBM</dc:creator>
      <dc:date>2021-03-02T11:45:57Z</dc:date>
    </item>
    <item>
      <title>Re: Analysis widget failing on creation to generate valid token - error 498</title>
      <link>https://community.esri.com/t5/developers-questions/analysis-widget-failing-on-creation-to-generate/m-p/1040172#M5803</link>
      <description>&lt;P&gt;Turns out I didn't have permissions to run the analysis widget on the server.&lt;/P&gt;</description>
      <pubDate>Wed, 24 Mar 2021 13:37:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/analysis-widget-failing-on-creation-to-generate/m-p/1040172#M5803</guid>
      <dc:creator>RobBoothIBM</dc:creator>
      <dc:date>2021-03-24T13:37:44Z</dc:date>
    </item>
  </channel>
</rss>

