Select to view content in your preferred language

Portal for ArcGIS JS API init.js baseURL overwritten

01-30-2020 09:51 AM
Regular Contributor

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, 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?


0 Kudos
2 Replies
Occasional Contributor II

Hi, did you find a solution for this?  We seem to have had this creep up on us, since a migration to a new operating system.

0 Kudos
Regular Contributor

I forget at this point but I think the fix had something to do with re registering the web adaptor....

0 Kudos