Web AppBuilder Deploying to Website

2361
15
Jump to solution
10-04-2017 02:06 PM
NikholaiO_Hara
Occasional Contributor

I have created a Web AppBuilder through ArcGIS Online. I then log onto the Web AppBuilder for Developers and download the zipfile. I unzip the file and place the contents on my server. When I go to the URL, all i get is the loading screen that never goes away. See below.

I tried following the instructions here. Deploy your app—Web AppBuilder for ArcGIS (Developer Edition) | ArcGIS for Developers 

Step 4 is adding a proxy. Everything in my web app will be public, is it still necessary to do this?


Then it ask to register your app online. I tried to doing this, but i think im getting messed up on the URIs. I entered https://[myserver]:port &  http://[myserver]:port, but i still got the loading screen.

This is my first time hosting a web appbuilder and any help would be appreciated.

0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Esteemed Contributor

So that is the issue you can not import a WAB 2.6 (AGOL's current version) into WAB Dev with is only 2.5 currently.

View solution in original post

15 Replies
NikholaiO_Hara
Occasional Contributor

I did notice that when i Load the website and inspect it, I get the following error:

Uncaught Error: Invalid template: <div>
<div class="loading-container">
<div data-dojo-attach-point="imgDiv" class="img-div">
</div>
<p data-dojo-attach-point="textNode"></p>
</div>
</div><div id="sd40s" style="visibility: hidden; position: absolute; bottom: -1px">4oiGIFNEIEJJVCBEZXRlY3Rpb24=</div>
at Function.g.getCachedTemplate (init.js:374)
at Object.buildRendering (init.js:373)
at Object.create (init.js:350)
at Object.postscript (init.js:349)
at new <anonymous> (init.js:161)
at Object.loadConfig (ConfigManager.js?wab_dv=2.5:130)
at Object.initApp (main.js?wab_dv=2.5:223)
at init.js:206
at ia (init.js:28)
at init.js:28

Not sure what this really means or is useful in helping find the issue. 

0 Kudos
BrantCarman
Occasional Contributor

I'm getting this exact same console log when trying to load a Web AppBuilder Application that's deployed to my company's server.  Do you have any more info on how you fixed this?  

0 Kudos
RobertScheitlin__GISP
MVP Esteemed Contributor

This first part is a little confusing:

I have created a Web AppBuilder through ArcGIS Online. I then log onto the Web AppBuilder for Developers and download the zipfile.

The version of WAB that is online on AGOL is version 2.6 which the WAB Dev version is still on version 2.5 for a few more weeks so if you are saying that you downloaded the app from AGOL and are try to import it into WAB Dev then this is an issue. But if you are just downloading from AGOL and then trying to deploy to your web server then you should be good to go. As far as the proxy you will not need the proxy unless you are using secured services or you are buffering large geometries that would cause the app to send URL strings that exceed the GET string limit and need to use POST instead.

0 Kudos
NikholaiO_Hara
Occasional Contributor

To explain the first a bit more, I created the Web App through Web AppBuilder on AGOL. When i go the item details page, download wasn't an option. I then log onto Web AppBuilder for Developers, import the web app and download the zip file. 

0 Kudos
RobertScheitlin__GISP
MVP Esteemed Contributor

So that is the issue you can not import a WAB 2.6 (AGOL's current version) into WAB Dev with is only 2.5 currently.

View solution in original post

NikholaiO_Hara
Occasional Contributor

Thank You!. I was able to download it from ArcGIS Online and extracted the zip folder to our test server. It loaded up great! I changed something around and now I want to deploy it to our production server. I copy and past the file over to the production server. When i go to the URL I get the following error: Unexpected token < in JSON at position 0. Any idea whats going on?

0 Kudos
RobertScheitlin__GISP
MVP Esteemed Contributor

Sounds like you have introduced a syntax error in your change that you made.

NikholaiO_Hara
Occasional Contributor

The only change i did was changing an image source. When i inspect the website i get this in the console:

main.js?wab_dv=2.6:13 SyntaxError: Unexpected token < in JSON at position 0
at JSON.parse (<anonymous>)
at json (init.js:147)
at n (init.js:146)
at d.f [as handleResponse] (init.js:138)
at XMLHttpRequest.e (init.js:143)

It looks like it is coming from the main.js. I didnt even open that up. 

On the test server, everything works fine. I copy and paste it over and then this error shows up. 

0 Kudos
RobertScheitlin__GISP
MVP Esteemed Contributor

The source of the error saying is is in the main.js does not really mean the syntax error is in the main.js that just the file that is reporting the error from trying to parse a json file. What json file or files did you change?

0 Kudos