HTTP/HTTPS problem in WAB 2.0

1674
4
04-26-2016 09:17 AM
LubomírBucek
New Contributor II

Hello,

I added a HTTP feature service layer into a Webmap that I am using in WAB. I saved and everything worked perfectly on WAB version 1.3, because WAB launched itself also in HTTP mode. Yesterday I tried to run the new 2.0 version and immediately hit a wall. After around 5 seconds console showed up a problem, that WAB cannot load the feature service because it runs in HTTPS mode, so the feature service present in the Webmap has to be also loaded through HTTPS.

I am also loading some .png pictures from internet sources in my widget through HTTP, which works just fine, only a warning shows up in console, that they should be loaded in HTTPS mode.

Since the feature services I added are not mine, I cannot rely on them being able to load through HTTPS. Is there a way to force WAB run in HTTP only? I tried to remove the "S" in adress bar, but it auto reloads again into HTTPS mode.

Thanks for help.

Lubomír

0 Kudos
4 Replies
RobertScheitlin__GISP
MVP Emeritus

Lubomír,

Whether WAB runs in https or http depends on how you registered the app. WAB does not have to run using https protocol. If you unintentionally set your WAB 2.0 to use https then the fix is simple. Go to the [install dir]\server\ and delete the signininfo.json then when you re-start WAB it will ask you to register your app again and this time make sure to NOT use https protocol when registering the app.

LubomírBucek
New Contributor II

Yes, that is what must have happened, but I cannot figure out how to not use HTTPS.
This is my workflow:

  • delete signininfo.json
  • Go to my organization arcgis account, login,
  • Add an item: into URL goes http://msi_luba:3344/webappbuilder
  • Register app: Browser, redirect: http://msi_luba:3344/webappbuilder
  • Copy app ID that showed up
  • run startup.bat from [install dir]
  • copy app ID into the form - continue
  • then browser jumps into HTTPS mode and needs my verification and asks for information about my ARCGIS online account -> accept (i tried to manually remove "S" in HTTPS here and reload, but 403 error shows up that it needs to be run through https)
  • Create new 2D app and the problem is the same, feature service does not load because of https.

Where did I miss out something important? I tried using both Opera and Chrome with the same result.

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Lubomir,

Delete you signininfo.json agan and this time when you re-launch WAB make sure you change the portal url to not use https.

LubomírBucek
New Contributor II

Aaaaah, finally solved. Since I revealed this problem yesterday, I tried to adapt the jquery, I am loading through resources array in init.js in stemapp folder, where i added the allmighty infernal "s", so I was loading Jquery through https protocol, which then prevented the app from loading through http (it somehow found out and then reloaded again). Putting jquery on http: again solved the problem.

Thanks for your time and help. Your immediate answers are awesome. Thanks again.