AnsweredAssumed Answered

How to change WAB config.json for an app

Question asked by joe.minicucci_NCS on Oct 25, 2016
Latest reply on Oct 26, 2016 by rscheitlin

Im building a Dojo widget in WebAppBuilder using a settings page to initially set the state of the config.json object's properties. The settings page works and the widget opens. Now I changed my config.json from one state to another:

 

From:

{
    "id": "6c821ced4fc34a29b5b3bb98c9e05db2",
    "cssMapping": {
        "InputField": "inputField"
    },
    "hierarchyLevels": [],
    "servicePath": ""
}

to:

 

{
    "id": "6c821ced4fc34a29b5b3bb98c9e05db2",
    "cssMapping": {
        "InputField": "inputField"
    },
    "hierarchyLevels": []
}

I only omitted service path. This created major problems for me. Now after initializing the app I receive a very obscure stack trace:

 

init.js:113 Error: uniqName_6 template:config.serviceUrl(…) "Error: uniqName_6 template:config.serviceUrl
at Object.<anonymous> (https://js.arcgis.com/3.17/init.js:372:222)
at https://js.arcgis.com/3.17/init.js:63:209
at https://js.arcgis.com/3.17/init.js:376:308
at RegExp.[Symbol.replace] (native)
at String.replace (native)
at Object.q.substitute (https://js.arcgis.com/3.17/init.js:376:156)
at Object._stringRepl (https://js.arcgis.com/3.17/init.js:372:107)
at Object.buildRendering (https://js.arcgis.com/3.17/init.js:373:182)
at Object.create (https://js.arcgis.com/3.17/init.js:350:18)
at Object.postscript (https://js.arcgis.com/3.17/init.js:348:475)
----------------------------------------
rejected at a (https://js.arcgis.com/3.17/init.js:108:174)
at h (https://js.arcgis.com/3.17/init.js:107:452)
at k (https://js.arcgis.com/3.17/init.js:107:205)
at g.w.reject (https://js.arcgis.com/3.17/init.js:109:488)
at Object.<anonymous> (https://devbox.intranet.softwarecompany.com:3344/webappbuilder/apps/8/jimu.js/WidgetManager.js?wab_dv=2.1:121:25)
at https://js.arcgis.com/3.17/init.js:63:209
at h (https://js.arcgis.com/3.17/init.js:107:279)
at k (https://js.arcgis.com/3.17/init.js:107:205)
at g.resolve (https://js.arcgis.com/3.17/init.js:109:280)
at Object.<anonymous> (https://devbox.intranet.softwarecompany.com:3344/webappbuilder/apps/8/jimu.js/WidgetManager.js?wab_dv=2.1:179:17)
----------------------------------------
Error
at g.then.c.then (https://js.arcgis.com/3.17/init.js:110:97)
at Object.<anonymous> (https://devbox.intranet.softwarecompany.com:3344/webappbuilder/apps/8/jimu.js/BaseWidgetPanel.js?wab_dv=2.1:76:53)
at Object.forEach (https://js.arcgis.com/3.17/init.js:70:348)
at Object.loadAllWidgetsInOrder (https://devbox.intranet.softwarecompany.com:3344/webappbuilder/apps/8/jimu.js/BaseWidgetPanel.js?wab_dv=2.1:66:13)
at Object.startup (https://devbox.intranet.softwarecompany.com:3344/webappbuilder/apps/8/jimu.js/BaseWidgetPanel.js?wab_dv=2.1:55:12)
at Object.m (https://js.arcgis.com/3.17/init.js:155:344)
at Object.startup (https://devbox.intranet.softwarecompany.com:3344/webappbuilder/apps/8/jimu.js/OnScreenWidgetPanel.js?wab_dv=2.1:65:14)
at Object.openPanel (https://devbox.intranet.softwarecompany.com:3344/webappbuilder/apps/8/jimu.js/PanelManager.js?wab_dv=2.1:146:17)
at Object.<anonymous> (https://devbox.intranet.softwarecompany.com:3344/webappbuilder/apps/8/jimu.js/PanelManager.js?wab_dv=2.1:93:16)
at https://js.arcgis.com/3.17/init.js:63:209"

 

 

 

I tried to delete the widget from C:\<WABROOT>\client\stemapp\widgets\<APP_NAME> as well as C:\WebAppBuilderForArcGIS\server\apps\<App#>\widgets\<APP_NAME> and also looked for config entries in C:\WebAppBuilderForArcGIS\server\apps\8\configs\<APP_NAME> (<APP_NAME> didn't exist);; and run both Grunt-clean/sync/watch...The app is totally broken now, and in the future I need to be able to edit config.json as I develop. Can anyone help? There seems to be some cached entry of config.json that is causing a problem.

Outcomes