I am getting a similar problem, I get the error "Unable to get property 'indexOf' of undefined or null reference" with a sad face. Not sure what I could be doing wrong, I have the WAB application shared to Everyone in AGOL, the layer and map shared with the organization, and I've done this setup for proxy several times. I've been trying just about everything for the last few weeks with no results. My code is as follows:
Proxy.config:
<?xml version="1.0" encoding="utf-8" ?>
<ProxyConfig allowedReferers="*"
mustMatch="true">
<serverUrls>
<serverUrl url="https://tog.maps.arcgis.com"
username="<uname>"
password="<pw>"
matchAll="true"/>
<serverUrl url="https://services.arcgisonline.com"
matchAll="true" />
<serverUrl url="https://gissvr"
matchAll="true" />
</serverUrls>
</ProxyConfig>
<!-- See https://github.com/Esri/resource-proxy for more information -->
json.config for the app:
"httpProxy": {
"useProxy": true,
"alwaysUseProxy": false,
"url": "http://gissvr/DotNet/proxy.ashx",
"rules": [
{
"urlPrefix:":"https://www.tog.maps.arcgis.com",
"proxyUrl":"/DotNet/proxy.ashx"
}
]
}
}
(gissvr is the name of the internal web server)
I've tried this with both clientid/secret and username/password, no change in results.
I tried setting all urls to https (not just AGOL ones), no change.
I have also tried hosting the app on my external web server, and setting this all up there (with the external ws name), and I have the same results there as well.
Is there something that I might not be looking at? I've been through the documentation from ESRI, github, stackexchange, etc., to no avail.
I am just now starting with web appbuilder, so I didn't come from 2.3 version, so I can't say this was broken by 2.4.
Thank you for looking at this...
Jeff