AnsweredAssumed Answered

Portal for ArcGIS JS API init.js baseURL overwritten

Question asked by jay.gregory on Jan 30, 2020
Latest reply on Jul 13, 2020 by jtessier

Mysterious issue - wondering what the community's thoughts are - 

Suddenly, some Web Apps on my portal (StoryMaps primarily) stopped loading, and I was unable to create new ones - turned out the js and css that the apps were trying to load were referencing the server name on which I have Portal installed instead of by the Web Adaptor - 

For instance, it should have been trying to load https://myportal.domain.com/webadaptorcontext/jsapi/jsapi/esri/css/esri.css, however it was actually trying to load https://myservername.domain.local:7443/arcgis/jsapi/jsapi/esri/css/esri.css which was failing.  It was doing this for multiple css and js resources.  

 

On my portal machine, I looked at C:\Program Files\ArcGIS\Portal\framework\jsapi\jsapi\init.js and saw that the baseUrl was https://myservername.domain.local:7443/arcgis/jsapi/jsapi/dojo.  In addition, when I looked at C:\Program Files\ArcGIS\Portal\apps\MapJournal\index.html, I also saw that app.pathJSAPI was set to https://myservername.domain.local:7443/arcgis/jsapi/jsapi/.  When I changed both of these references back to my web adaptor url, those apps started working.  However, I can't check every app on the system - there is too many. 

 

So, my questions are: 

1. What could have caused this?

2. Since I don't know what other app template might have been changed, is there any way to ensure (via changing some config setting or something else - I already tried rebooting my Portal and it didn't work) that all these app templates and init.js files for the different api version (version 4, compact, etc.) have the correct references in them without going in an manually changing every one?

 

Thanks!

Outcomes