Web AppBuilder Developer Edition HTTP/HTTPS Problem

1967
7
02-01-2018 03:23 AM
MuglaCbs1
New Contributor II

I am using;

  • ArcGIS for Server Standard Enterprise 10.4.1
  • Portal for ArcGIS 10.4.1

Also i am using Web AppBuilder Developer Edition 2.3 and deploying webapps in our server.

Normally when i deploy a webapp to server root directory and reach site a http web adress my app waits at startup loading screen then redirect to https format and starts.

When i create an app and deploy to my server with WAB 2.7 version, with http web adress my app do not start and stuck at startup screen with this error;

Failed to load resource: the server responded with a status of 404 (Not Found)
main.js?wab_dv=2.7:199 jimu.js init...
init.js:379 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><script id="ftnt_topbar_script" src="//mydomain:8011/bar7cbf8c34e03e2da1a4f946e2ce708e5c.js" type="text/javascript" class="0" ></script>     at Function.e.getCachedTemplate (init.js:379)     at Object.buildRendering (init.js:378)     at Object.create (init.js:355)     at Object.postscript (init.js:354)     at new <anonymous> (init.js:200)     at Object.loadConfig (ConfigManager.js?wab_dv=2.7:130)     at Object.initApp (main.js?wab_dv=2.7:229)     at init.js:211     at ja (init.js:28)     at init.js:29
(anonymous) @ init.js:35
bar7cbf8c34e03e2da1a4f946e2ce708e5c.js Failed to load resource: 
net::ERR_CONNECTION_TIMED_OUT

But when i add https in front of adress web aplication starts with no problem.

what changed in 2.6 and 2.7 version that i get this error?

0 Kudos
7 Replies
RobertScheitlin__GISP
MVP Emeritus

Mugla,

  So when you say deploy you mean that you have exported the app for WAB Dev and un-zipped it to your web servers appropriate directory right.

MuglaCbs1
New Contributor II

Hi rscheitlin

Yes i export app as zip file and cop my servers wwwroot directory as unzipped.
i have more than 30 web app like that made with WAB 2.3 and works well with http or https adress starting.

But when i export an app from WAB 2.6 or 2.7 version i must use https for adress starting.

i use portal adress with "http" while configuring and connecting to our arcgis portal with appid.

singinginfo.json (WAB 2.7) portal url starts with "https" also portal url starts with "https" in my WAB 2.3 singinginfo.json file.

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Mugla,

   Inside the apps config.json does the portalUrl property have http or https protocol? What ever the protocol is there is what you have to use when calling the app.

MuglaCbs1
New Contributor II

in config.json file 

line21: "portalUrl": "http://mydomain

line260: "portalUrl": "http://mydomain

all set http.

---------------------------------------------------------------

i tried your widgets live preview site adress:

ArcGIS Web Application 

i get this error in console of chrome.

any that site did not work for me too.

jimu.js init...
js.arcgis.com/3.22/init.js:28 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><script id="ftnt_topbar_script" src="//gis.calhouncounty.org:8011/bar7cbf8c34e03e2da1a4f946e2ce708e5c.js" type="text/javascript" class="51" ></script>
at Function.f.getCachedTemplate (js.arcgis.com/3.22/init.js:379)
at Object.buildRendering (js.arcgis.com/3.22/init.js:378)
at Object.create (js.arcgis.com/3.22/init.js:355)
at Object.postscript (js.arcgis.com/3.22/init.js:354)
at new <anonymous> (js.arcgis.com/3.22/init.js:200)
at Object.loadConfig (/WAB/V2.6/widgets/eSearch/jimu.js/ConfigManager.js?wab_dv=2.6:130)
at Object.initApp (/WAB/V2.6/widgets/eSearch/jimu.js/main.js?wab_dv=2.6:223)
at init.js:208
at ia (js.arcgis.com/3.22/init.js:28)
at js.arcgis.com/3.22/init.js:28
0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Mugla,

  If you can not bring up my live preview site then you have a network issue that you need to bring up with your IT personnel. My Site works fine using WAB 2.7 and http.

SimonJackson
Occasional Contributor III

Hey Robert.

Encountering this issue as well. 

  • ArcGIS Online (HTTPS enforced)
  • Public services/Web Map
  • Zip from Dev-WAB uploaded to S3  (which does not have HTTPS enabled via a domain name in front of it)

ConfigManager.js error.

I assume I need to either get a cert to my domain name or consider enabling HTTP on my Org account (for testing).

I tried changing the config portalURL to use http, but same problem.

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Simon,

  Mixed content in modern browsers is a real headache. Yes you should get an ssl cert for your S3 web server or disable HTTPS enforced in AGOL.

0 Kudos