Select to view content in your preferred language

Error on init.js using custom Journal template with Portal

3630
7
Jump to solution
07-08-2015 11:36 AM
PamRichmond
Deactivated User

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.

authform.JPG

When I submit my login info, it shows this on the page and never displays the story map:

mapjournal initializing.png

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?

0 Kudos
1 Solution

Accepted Solutions
PamRichmond
Deactivated User

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.

View solution in original post

0 Kudos
7 Replies
GregoryL_Azou
Deactivated User

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

0 Kudos
PamRichmond
Deactivated User

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?

0 Kudos
GregoryL_Azou
Deactivated User

If you go to https://myserver.com/portal/sharing/ do you get to a valid page?

0 Kudos
PamRichmond
Deactivated User

Yes. See below. ".../portal/sharing/content/" works as well, but not "..../content/items/".

portal-sharing.JPG

0 Kudos
GregoryL_Azou
Deactivated User

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

0 Kudos
PamRichmond
Deactivated User

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.

0 Kudos
GregoryL_Azou
Deactivated User

Glad to hear, sorry about this.

0 Kudos