Select to view content in your preferred language

Deploying Web Appbuilder app

2873
18
06-13-2017 08:28 AM
Mehretab
Frequent Contributor
I have been developing an app from the developer edition of web appbuilder and deployed it in our Web server (Tomcat) it seems to work with out any problem from our organizations intranet and internet infrastracture. But when we tried it at home from our own machine it appears to hang forever with the blue sreen (loading screen). Here are the error report from the console of chrome and Firefox.
From Chrome (2 error report)
Failed to load resource: the server responded with a status of statisticsUtils.js 403 (Forbidden)
js.arcgis.com/3.20/init.js:3Error: scriptError at f (js.arcgis.com/3.20/init.js:10) at HTMLScriptElement.<anonymous> (js.arcgis.com/3.20/init.js:35)
from Firefox
Status Code 403 Forbiden
It complains  about the statisticsUtil.js file and this javascript file resides in the Jimu.js folder and it deals with query and filtering a layer (from my understanding), this file is the only file which can not be opened from the browser and it throws this error message (403 Forbidden: You don't have permission to access /...../..../jimu.js/statisticsUtils.js on this server). Any idea Robert Scheitlin, GISP and any body that have an idea what did I do wrong in the process of deploying the app.
Thanks in advance
0 Kudos
18 Replies
RobertScheitlin__GISP
MVP Emeritus

Mehretab,

   I am not very familiar with Tomcat but it sounds like a permissions issue. Are you adding the WAB app files to the webapps folder in your Tomcat deployment?

0 Kudos
Mehretab
Frequent Contributor

I hope by now you are awake and thanks for the reply. Yes my WAB app files are in the webapps folder. My services are publicly shared in portal and I have ofcourse an esri base  map. My question is Is it necessary/must to set a proxy? The mystery for me is it works fine in my offices browsers but not if I want to access it at home form  my machine. Are they extra steps in the deployment that  deals with permission issues?

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Mehretab,

   No a Proxy is only necessary when using secured services or wanting to use services that require credits on AGOL or geometry service operations that need to use POST instead of PUT. There is no extra steps dealing with permissions that I am aware of.

0 Kudos
Mehretab
Frequent Contributor

Robert,

It would be interesting to try it on IIS server to see if the Tomcat deployment process is the problem. Do you know some free providers.

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Mehretab,

   If you are using MS Windows OS then you have free access to IIS.

0 Kudos
Mehretab
Frequent Contributor

Robert,

yes you are right but unfortunately our organisation disabled it.

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

So you just go to control panel > Programs and Features > Turn Windows features on or off >  Internet Information Services and add it.

0 Kudos
RebeccaStrauch__GISP
MVP Emeritus

If their IT/administrators give them the ability to do that (our blocks it for us now).

Mehretab Tquabo Sium  Is it a public web site that you can share?  That way others can test browsers they have since it may be something that is blocked by your home browser. 

Otherwise, I agree with Robert that is something that is being blocked by Tomcat, possibly external permission access to "/...../..../jimu.js/statisticsUtils.js"  ??  My guess is you modified the path, but if not, maybe it doesn't recognize the path (just guessing here. I haven't used Tomcat for a long time either)

0 Kudos
BrianCollins
Frequent Contributor

Mehretab...we deploy our apps from WAB Developer to IIS; however, we have to modify the env.js file for each app to call out the proper URL for the Esri JavaScript API once published to IIS. On line 61 of the file, I change the string...

FROM:

apiUrl = null,

TO:

apiUrl = '//js.arcgis.com/3.19',‍‍‍

Referenced here: https://developers.arcgis.com/web-appbuilder/sample-code/change-url-of-arcgis-api-for-javascript.htm

0 Kudos