Military Tools Widget deployment to 10.5.1 Portal

2796
12
08-09-2017 04:12 PM
BenBerghauser1
New Contributor II

Hi all,

We've deployed Military Tools 2.0 Widgets to our 10.5.1 Portal and cannot get the Visibility one to work.

CoordinateConversion and DistanceAndDirection work perfectly in Web App Builder (Default) however when selecting the Visibility Widget, once you hit Ok, we just get a spinning 'loading' icon in the middle of the dialog box forever. The dialog boxis called 'Configure Visibility'.

This is obviously before we get the chance to nominate the GP Service.

How do we go about troubleshooting this? 

Thanks for your help.

0 Kudos
12 Replies
AnthonyGiles
Frequent Contributor

Hi Ben,

To help isolate the issue could you please specify which browser you are using and if you know how to debug the browser (normally by hitting F12) are you getting any errors in the console window?

Regards

Anthony 

0 Kudos
BenBerghauser1
New Contributor II

Hi Anthony, thanks for the reply. I'm on FF45

I've had a look and the first thing I noticed was the console complaining that the config.js file had a premature end. That file is blank in version 1.1 and 2.0 so I threw the text from version 1.0 into it and it got past that.

Now it's stuck on /apps/webappbuilder/stemapp/jimu.js/serviceBrowserRuleUtils.js which is coming back with a '404 Not Found' response. This I think is resulting in a scriptError...something about injectUrl in init.js of the jsapi. 

I've tried to put the GP Service URL in the config.js but that doesn't solve it either.

Does that help any?

0 Kudos
AnthonyGiles
Frequent Contributor

Ben,

When you say the config.js is blank do you mean empty? Before the widget is configured the config.js will be just a pair of braces '{}'.

When you configure the widget the config will be saved as:

{
  "taskUrl": "rest endpoint of visibility gpservice"
}

You could try and change the config.js to this and see if you can get past the loading screen

Regards

Anthony

AnthonyGiles
Frequent Contributor

Ben,

Not having a 10.5.1 build to test on I tried adding the widget into the in built web appbuilder within portal 10.4.1, and I am experiencing the same issue of the widget not loading. After inspection of the network traffic I can see that some files that the configuration needs are not in the built in web appbuilder.

If your portal has been installed to the standard directories have a look in:

C:\Program Files\ArcGIS\Portal\apps\webappbuilder\stemapp\jimu.js\dijit

on 10.4.1 there is just a single folder called SymbolsInfo

yet in the same directory in web appbuilder developer contains, 105 items:

The parent folder tells a similar story (left portal, right web appbuilder developer):

As a test I copied over the missing files from the developer edition to portal, refreshed the browser and everything worked OK. I am not sure why the two environments differ so much in terms of the files contained within, maybe somebody from the web appbuilder team can explain (dlaw-esristaffjunshan_liu-esristaff‌)

I think your best bet to get the widget working is to manually create the config file with the parameter I mentioned above and ignore the settings screen.

Regards

Anthony

JunshanLiu
Occasional Contributor III

It's correct, most of the files in jimu.js folder are removed before portal 10.5.1. From 10.5.1, the jimu.js folder will contain the full lib

0 Kudos
AnthonyGiles
Frequent Contributor

Thanks Junshan,

Would copying over the files from the developer edition, have any negative side effects?

0 Kudos
BenBerghauser1
New Contributor II

We just upgraded from 10.5.0 to 10.5.1 and the files weren't there in our deployment.

0 Kudos
BenBerghauser1
New Contributor II

So I added the missing files to jimu.js and got further.

The next issue I ran into was that there is an absolute (ish) path in the Visibility widget which refers to 'webappbuilder\stemapp\Visibility' . As per instructions, we hosted the widget in another location on the web server.

I dropped the Visibility Widget folder in there and everything started to work.

I think the wrap-up for this one is that the Visibility Widget in Military Tools 2.0 cannot be deployed with 10.5.1 WAB Standard Edition in the manner outlined in the instructions (specifically referring to deploying custom Widgets into standard Portal without modifying anything). If has at least one dependency that wasn't satisfied in the standard install of Portal 10.5.1 (upgraded from 10.5.0) and there is (at least one) hard-coded path to the webappbuilder stemapp folder that needs to be relative to the installed folder instead.

Lyle Wright‌ can someone please look at the Visibility widget and update so it can be deployed as per instructions here: Add custom widgets—Portal for ArcGIS | ArcGIS Enterprise ?

0 Kudos
AnthonyGiles
Frequent Contributor

Hi Ben,

Glad you got the widget working, in regards to the absolute path there is nothing in the code that refers to 'webappbuilder\stemapp\Visibility' so I'm not sure where that is being introduced.

It looks like the core web appbuilder team need to look at how the hosted web appbuilder within portal is installed and how it works with the workflow you mention above

Regards

Anthony

0 Kudos