<?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 Custom Widget error: net::ERR_ABORTED 404 (Not Found), when deployed to ArcGIS Portal in ArcGIS Web AppBuilder Questions</title>
    <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/custom-widget-error-net-err-aborted-404-not-found/m-p/1358821#M23310</link>
    <description>&lt;P&gt;Hey community, have a good day&lt;/P&gt;&lt;P&gt;I am struggling trying to run a deployed custom widget in ArcGIS Portal, getting 404 Error when running it in the viewer.&lt;/P&gt;&lt;P&gt;In development env it works fine, no error and runs perfectly, but it seems something with path references to a custom .js file when move it to portal server.&lt;/P&gt;&lt;P&gt;Here is my widget directory/file structure in development:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="dsanchez80_0-1702077111075.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/88561i4E5DA62CB0483923/image-size/medium?v=v2&amp;amp;px=400" role="button" title="dsanchez80_0-1702077111075.png" alt="dsanchez80_0-1702077111075.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;CustomDrawSymbolChooser.js is a copy from&amp;nbsp;jimu.js\dijit\SymbolChooser.js and customized according to some requirements. I put this file into my custom widget's directory root (as you can see)&lt;/P&gt;&lt;P&gt;CustomDrawSymbolChooser.html is a copy from jimu.js\dijit\templatesSymbolChooser.html and customized same way. Put it also in the widget root directory.&lt;/P&gt;&lt;P&gt;Following is the way how I reference both in Widget.html and Widget.js&lt;/P&gt;&lt;P&gt;Widget.html:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="dsanchez80_1-1702077415195.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/88562iF114B8AD693C3A68/image-size/medium?v=v2&amp;amp;px=400" role="button" title="dsanchez80_1-1702077415195.png" alt="dsanchez80_1-1702077415195.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Widget.js:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="dsanchez80_2-1702077466302.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/88563i3A1F3791965616BC/image-size/medium?v=v2&amp;amp;px=400" role="button" title="dsanchez80_2-1702077466302.png" alt="dsanchez80_2-1702077466302.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Besides that, I define the CustomDrawSymbolChooser.html template in CustomDrawSymbolChooser.js this way (and also the config.json file i require):&lt;/P&gt;&lt;P&gt;CustomDrawSymbolChooser.js:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="dsanchez80_3-1702077621801.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/88564i369EC156D56EAE39/image-size/medium?v=v2&amp;amp;px=400" role="button" title="dsanchez80_3-1702077621801.png" alt="dsanchez80_3-1702077621801.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The development and the widget runs perfectly fine in my local environment, no issues or errors. But when I deploy it in arcgis portal and run it in Viewer, there is an error 404&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="dsanchez80_4-1702078126589.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/88565iA43F754B8FB0EEB8/image-size/medium?v=v2&amp;amp;px=400" role="button" title="dsanchez80_4-1702078126589.png" alt="dsanchez80_4-1702078126589.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;After some error search I found it might be a path reference problem but I have changed every possible invoke path in Widget.html to the CustomDrawSymbolChooser.js file:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="dsanchez80_5-1702078256504.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/88566i5126CC748F908770/image-size/medium?v=v2&amp;amp;px=400" role="button" title="dsanchez80_5-1702078256504.png" alt="dsanchez80_5-1702078256504.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;data-dojo-type="Draw/CustomDrawSymbolChooser"&lt;/P&gt;&lt;P&gt;data-dojo-type="./Draw/CustomDrawSymbolChooser"&lt;/P&gt;&lt;P&gt;data-dojo-type="./CustomDrawSymbolChooser"&lt;/P&gt;&lt;P&gt;But none of them working. Always "tries" to readdress to ../portal/jsapi/jsapi/dojo/... directory and it doesnt have anything to do with my widget development, I dont know why I tries to call that path.&lt;/P&gt;&lt;P&gt;Please, appreciate any help as you will understand it goes beyond the development and I dont what else to do at this point.&lt;/P&gt;&lt;P&gt;PS: My custom widget is deployed in C:\inetpub\wwwroot and then add it via Portal without issues. It is when running the widget that the error shows up.&lt;/P&gt;&lt;P&gt;Thank you guys!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 08 Dec 2023 23:35:56 GMT</pubDate>
    <dc:creator>dsanchez80</dc:creator>
    <dc:date>2023-12-08T23:35:56Z</dc:date>
    <item>
      <title>Custom Widget error: net::ERR_ABORTED 404 (Not Found), when deployed to ArcGIS Portal</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/custom-widget-error-net-err-aborted-404-not-found/m-p/1358821#M23310</link>
      <description>&lt;P&gt;Hey community, have a good day&lt;/P&gt;&lt;P&gt;I am struggling trying to run a deployed custom widget in ArcGIS Portal, getting 404 Error when running it in the viewer.&lt;/P&gt;&lt;P&gt;In development env it works fine, no error and runs perfectly, but it seems something with path references to a custom .js file when move it to portal server.&lt;/P&gt;&lt;P&gt;Here is my widget directory/file structure in development:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="dsanchez80_0-1702077111075.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/88561i4E5DA62CB0483923/image-size/medium?v=v2&amp;amp;px=400" role="button" title="dsanchez80_0-1702077111075.png" alt="dsanchez80_0-1702077111075.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;CustomDrawSymbolChooser.js is a copy from&amp;nbsp;jimu.js\dijit\SymbolChooser.js and customized according to some requirements. I put this file into my custom widget's directory root (as you can see)&lt;/P&gt;&lt;P&gt;CustomDrawSymbolChooser.html is a copy from jimu.js\dijit\templatesSymbolChooser.html and customized same way. Put it also in the widget root directory.&lt;/P&gt;&lt;P&gt;Following is the way how I reference both in Widget.html and Widget.js&lt;/P&gt;&lt;P&gt;Widget.html:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="dsanchez80_1-1702077415195.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/88562iF114B8AD693C3A68/image-size/medium?v=v2&amp;amp;px=400" role="button" title="dsanchez80_1-1702077415195.png" alt="dsanchez80_1-1702077415195.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Widget.js:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="dsanchez80_2-1702077466302.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/88563i3A1F3791965616BC/image-size/medium?v=v2&amp;amp;px=400" role="button" title="dsanchez80_2-1702077466302.png" alt="dsanchez80_2-1702077466302.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Besides that, I define the CustomDrawSymbolChooser.html template in CustomDrawSymbolChooser.js this way (and also the config.json file i require):&lt;/P&gt;&lt;P&gt;CustomDrawSymbolChooser.js:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="dsanchez80_3-1702077621801.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/88564i369EC156D56EAE39/image-size/medium?v=v2&amp;amp;px=400" role="button" title="dsanchez80_3-1702077621801.png" alt="dsanchez80_3-1702077621801.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The development and the widget runs perfectly fine in my local environment, no issues or errors. But when I deploy it in arcgis portal and run it in Viewer, there is an error 404&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="dsanchez80_4-1702078126589.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/88565iA43F754B8FB0EEB8/image-size/medium?v=v2&amp;amp;px=400" role="button" title="dsanchez80_4-1702078126589.png" alt="dsanchez80_4-1702078126589.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;After some error search I found it might be a path reference problem but I have changed every possible invoke path in Widget.html to the CustomDrawSymbolChooser.js file:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="dsanchez80_5-1702078256504.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/88566i5126CC748F908770/image-size/medium?v=v2&amp;amp;px=400" role="button" title="dsanchez80_5-1702078256504.png" alt="dsanchez80_5-1702078256504.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;data-dojo-type="Draw/CustomDrawSymbolChooser"&lt;/P&gt;&lt;P&gt;data-dojo-type="./Draw/CustomDrawSymbolChooser"&lt;/P&gt;&lt;P&gt;data-dojo-type="./CustomDrawSymbolChooser"&lt;/P&gt;&lt;P&gt;But none of them working. Always "tries" to readdress to ../portal/jsapi/jsapi/dojo/... directory and it doesnt have anything to do with my widget development, I dont know why I tries to call that path.&lt;/P&gt;&lt;P&gt;Please, appreciate any help as you will understand it goes beyond the development and I dont what else to do at this point.&lt;/P&gt;&lt;P&gt;PS: My custom widget is deployed in C:\inetpub\wwwroot and then add it via Portal without issues. It is when running the widget that the error shows up.&lt;/P&gt;&lt;P&gt;Thank you guys!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Dec 2023 23:35:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/custom-widget-error-net-err-aborted-404-not-found/m-p/1358821#M23310</guid>
      <dc:creator>dsanchez80</dc:creator>
      <dc:date>2023-12-08T23:35:56Z</dc:date>
    </item>
  </channel>
</rss>

