<?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 Failed to load map in ArcGIS Experience Builder Questions</title>
    <link>https://community.esri.com/t5/arcgis-experience-builder-questions/failed-to-load-map/m-p/1260391#M6258</link>
    <description>&lt;P&gt;Hello!&lt;/P&gt;&lt;P&gt;Our customer sometimes experiences error "Failed to load map" in ExB app. See the attached file. The&amp;nbsp;&lt;SPAN&gt;application&lt;/SPAN&gt; is created at&amp;nbsp;ArcGIS&amp;nbsp;&lt;SPAN&gt;Experience Builder Developer Edition v1.9 and deployed&amp;nbsp;to an IIS. Following&amp;nbsp;&lt;A href="https://community.esri.com/t5/arcgis-experience-builder-questions/failed-to-load-map/m-p/1202577#M5100" target="_blank" rel="noopener"&gt;this advice&lt;/A&gt;&amp;nbsp;I'd added "jimu-arcgis" dependency&amp;nbsp;to all custom widgets, but it didn't help. It happens to all&amp;nbsp;deployed applications, and we haven't been able to find a pattern to cause the error. It seems to happen randomly.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Here are the errors from DevTools:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;CacheFirst.js?7526:84&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;Uncaught (in promise) no-response: The strategy could not generate a response for '&lt;A href="https://js.arcgis.com/4.24/init.js" target="_blank" rel="noopener"&gt;https://js.arcgis.com/4.24/init.js&lt;/A&gt;'. The underlying error is TypeError: Failed to fetch.&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;at CacheFirst._handle (webpack-internal:///./node_modules/workbox-strategies/CacheFirst.js:95:19)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;at async CacheFirst._getResponse (webpack-internal:///./node_modules/workbox-strategies/Strategy.js:155:24)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;_handle @ CacheFirst.js?7526:84&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;—&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;Load module error. TypeError: window.require is not a function&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;at (index):296:12&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;at new Promise (&amp;lt;anonymous&amp;gt;)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;at SystemJS.constructor.instantiate ((index):295:11)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;at init.js:1:27896&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;—&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;Create datasource error. dataSource_5 TypeError: Cannot read properties of undefined (reading 'setLocale')&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;at ye.&amp;lt;anonymous&amp;gt; (index.js:1:61009)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;at Generator.next (&amp;lt;anonymous&amp;gt;)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;at n (index.js:1:59653)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;— &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'findOAuthInfo')&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;at ye.registOAuthInfo (index.js:1:63010)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;at ye.&amp;lt;anonymous&amp;gt; (index.js:1:62699)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;at Generator.next (&amp;lt;anonymous&amp;gt;)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;at index.js:1:59851&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;at new Promise (&amp;lt;anonymous&amp;gt;)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;at te (index.js:1:59596)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;at ye.initToRegistOAuthForMainPortalAndAGOL (index.js:1:62536)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;at ye.&amp;lt;anonymous&amp;gt; (index.js:1:60917)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;at Generator.next (&amp;lt;anonymous&amp;gt;)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;at n (index.js:1:59653)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;at ye.initToRegistOAuthForMainPortalAndAGOL (index.js:1:62536)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;at ye.&amp;lt;anonymous&amp;gt; (index.js:1:60917)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;at Generator.next (&amp;lt;anonymous&amp;gt;)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;at n (index.js:1:59653)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;Any idea what could cause this error? Something in custom widget maybe?&lt;/P&gt;&lt;P&gt;Thanks, Matěj.&lt;/P&gt;</description>
    <pubDate>Wed, 22 Feb 2023 09:24:48 GMT</pubDate>
    <dc:creator>MatejKutik</dc:creator>
    <dc:date>2023-02-22T09:24:48Z</dc:date>
    <item>
      <title>Failed to load map</title>
      <link>https://community.esri.com/t5/arcgis-experience-builder-questions/failed-to-load-map/m-p/1260391#M6258</link>
      <description>&lt;P&gt;Hello!&lt;/P&gt;&lt;P&gt;Our customer sometimes experiences error "Failed to load map" in ExB app. See the attached file. The&amp;nbsp;&lt;SPAN&gt;application&lt;/SPAN&gt; is created at&amp;nbsp;ArcGIS&amp;nbsp;&lt;SPAN&gt;Experience Builder Developer Edition v1.9 and deployed&amp;nbsp;to an IIS. Following&amp;nbsp;&lt;A href="https://community.esri.com/t5/arcgis-experience-builder-questions/failed-to-load-map/m-p/1202577#M5100" target="_blank" rel="noopener"&gt;this advice&lt;/A&gt;&amp;nbsp;I'd added "jimu-arcgis" dependency&amp;nbsp;to all custom widgets, but it didn't help. It happens to all&amp;nbsp;deployed applications, and we haven't been able to find a pattern to cause the error. It seems to happen randomly.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Here are the errors from DevTools:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;CacheFirst.js?7526:84&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;Uncaught (in promise) no-response: The strategy could not generate a response for '&lt;A href="https://js.arcgis.com/4.24/init.js" target="_blank" rel="noopener"&gt;https://js.arcgis.com/4.24/init.js&lt;/A&gt;'. The underlying error is TypeError: Failed to fetch.&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;at CacheFirst._handle (webpack-internal:///./node_modules/workbox-strategies/CacheFirst.js:95:19)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;at async CacheFirst._getResponse (webpack-internal:///./node_modules/workbox-strategies/Strategy.js:155:24)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;_handle @ CacheFirst.js?7526:84&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;—&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;Load module error. TypeError: window.require is not a function&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;at (index):296:12&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;at new Promise (&amp;lt;anonymous&amp;gt;)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;at SystemJS.constructor.instantiate ((index):295:11)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;at init.js:1:27896&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;—&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;Create datasource error. dataSource_5 TypeError: Cannot read properties of undefined (reading 'setLocale')&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;at ye.&amp;lt;anonymous&amp;gt; (index.js:1:61009)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;at Generator.next (&amp;lt;anonymous&amp;gt;)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;at n (index.js:1:59653)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;— &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'findOAuthInfo')&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;at ye.registOAuthInfo (index.js:1:63010)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;at ye.&amp;lt;anonymous&amp;gt; (index.js:1:62699)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;at Generator.next (&amp;lt;anonymous&amp;gt;)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;at index.js:1:59851&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;at new Promise (&amp;lt;anonymous&amp;gt;)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;at te (index.js:1:59596)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;at ye.initToRegistOAuthForMainPortalAndAGOL (index.js:1:62536)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;at ye.&amp;lt;anonymous&amp;gt; (index.js:1:60917)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;at Generator.next (&amp;lt;anonymous&amp;gt;)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;at n (index.js:1:59653)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;at ye.initToRegistOAuthForMainPortalAndAGOL (index.js:1:62536)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;at ye.&amp;lt;anonymous&amp;gt; (index.js:1:60917)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;at Generator.next (&amp;lt;anonymous&amp;gt;)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;at n (index.js:1:59653)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;Any idea what could cause this error? Something in custom widget maybe?&lt;/P&gt;&lt;P&gt;Thanks, Matěj.&lt;/P&gt;</description>
      <pubDate>Wed, 22 Feb 2023 09:24:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-experience-builder-questions/failed-to-load-map/m-p/1260391#M6258</guid>
      <dc:creator>MatejKutik</dc:creator>
      <dc:date>2023-02-22T09:24:48Z</dc:date>
    </item>
    <item>
      <title>Re: Failed to load map</title>
      <link>https://community.esri.com/t5/arcgis-experience-builder-questions/failed-to-load-map/m-p/1512595#M13951</link>
      <description>&lt;P&gt;Was this ever resolved? I am receiving this error with several of my experiences as well. It leaves a very poor impression on our end customers when the map fails to load...&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jul 2024 20:06:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-experience-builder-questions/failed-to-load-map/m-p/1512595#M13951</guid>
      <dc:creator>jhahn_owa</dc:creator>
      <dc:date>2024-07-30T20:06:43Z</dc:date>
    </item>
    <item>
      <title>Re: Failed to load map</title>
      <link>https://community.esri.com/t5/arcgis-experience-builder-questions/failed-to-load-map/m-p/1512749#M13965</link>
      <description>&lt;P&gt;I was forced to develop a custom widget that detect fail of map load and refreshes the page when this happens. Maybe the bug has been fixed in a newer version, thought.&lt;/P&gt;</description>
      <pubDate>Wed, 31 Jul 2024 05:46:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-experience-builder-questions/failed-to-load-map/m-p/1512749#M13965</guid>
      <dc:creator>MatejKutik</dc:creator>
      <dc:date>2024-07-31T05:46:22Z</dc:date>
    </item>
    <item>
      <title>Re: Failed to load map</title>
      <link>https://community.esri.com/t5/arcgis-experience-builder-questions/failed-to-load-map/m-p/1512796#M13966</link>
      <description>Would you be willing to share that widget by chance? I was starting to&lt;BR /&gt;develop the same thing but have not made much progress yet. It is rather&lt;BR /&gt;frustrating that the key feature of Esri's product, the MAP, doesn't load&lt;BR /&gt;correctly.&lt;BR /&gt;</description>
      <pubDate>Wed, 31 Jul 2024 06:56:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-experience-builder-questions/failed-to-load-map/m-p/1512796#M13966</guid>
      <dc:creator>jhahn_owa</dc:creator>
      <dc:date>2024-07-31T06:56:52Z</dc:date>
    </item>
    <item>
      <title>Re: Failed to load map</title>
      <link>https://community.esri.com/t5/arcgis-experience-builder-questions/failed-to-load-map/m-p/1512807#M13967</link>
      <description>&lt;P&gt;My employer wouldn't be happy if I shared the whole widget. Try to get inspired by this code, it should satisfy your requirements.&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;import { type JimuMapView, JimuMapViewComponent } from "jimu-arcgis";
import { React, type AllWidgetProps, JimuMapViewStatus } from "jimu-core";

export default function(props: AllWidgetProps&amp;lt;{}&amp;gt;) {
    return &amp;lt;JimuMapViewComponent
        useMapWidgetId={props.useMapWidgetIds?.[0]}
        onActiveViewChange={onActiveViewChange}
    /&amp;gt;;
}

function onActiveViewChange(newJimuMapView: JimuMapView) {
    if (newJimuMapView.status === JimuMapViewStatus.Failed) {
        window.location.reload();
    }
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 31 Jul 2024 07:59:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-experience-builder-questions/failed-to-load-map/m-p/1512807#M13967</guid>
      <dc:creator>MatejKutik</dc:creator>
      <dc:date>2024-07-31T07:59:53Z</dc:date>
    </item>
  </channel>
</rss>

