I created a secure map in Portal, shared it, made a Web Mapping Application using the Story Map Journal template, and downloaded the template. I extracted the files on a different web server and made the necessary config changes for Portal. I registered the app in Portal. When I try to view the app in the browser, it prompts for my login information using the ESRI authentication form as expected.
When I submit my login info, it shows this on the page and never displays the story map:
The JavaScript console shows the following error:
TypeError: Cannot read property '0' of undefined
at http://myserver.com/myapp/app/viewer-min.js?v=1.1:1:162579
at c (http://js.arcgis.com/3.11/init.js:76:221)
at d (http://js.arcgis.com/3.11/init.js:76:10)
at b.Deferred.resolve.callback (http://js.arcgis.com/3.11/init.js:77:350)
...
I suspect it may have to do with the DEFAULT_SHARING_URL. I had to guess at this value because I'm not an admin, but the one used in the code at least sees the Map Journal on the server (because other examples I tried immediately errored out), and it prompts me for my login. However, when I try to hit the DEFAULT_SHARING_URL in my web browser, it gives me an error "Invalid URL Error: 400". So it partially works. Is there a permission or port that needs to be changed? Or is something else going on?
Solved! Go to Solution.
I had tried the appid in index.html and in the URL, and neither worked.
I just downloaded the GitHub application and made the necessary config changes, and it is now working. I originally downloaded the code from within Portal, so there must have been an issue there.
Thank you for your help.
Yes it looks like your sharing URL is not valid.
If your Portal for ArcGIS can be accessed at myserver.com/portal, the sharing url should be //myserver.com/portal/sharing/content/items
If you access it at myserver.com it should be //myserver.com/sharing/content/items
Thank you for the response. The URL I am using does use that pattern (i.e., //myserver.com/portal/sharing/content/items and I access on //myserver.com/portal), but I get the error "Invalid URL Error: 400". Any ideas?
If you go to https://myserver.com/portal/sharing/ do you get to a valid page?
Yes. See below. ".../portal/sharing/content/" works as well, but not "..../content/items/".
Your sharing URL configuration must be fine then, it has to be something else.
have you configured the appid in index.html? or Are you putting it in the URL parameter?
If you are using the URL parameter, have you configured the authorizedOwner property (index.html line 45?)
I had tried the appid in index.html and in the URL, and neither worked.
I just downloaded the GitHub application and made the necessary config changes, and it is now working. I originally downloaded the code from within Portal, so there must have been an issue there.
Thank you for your help.
Glad to hear, sorry about this.