Select to view content in your preferred language

How to host configurable app on your sever?

1485
3
Jump to solution
12-09-2020 11:02 AM
BrittaneyHarkness
Occasional Contributor

Hi, I'm trying to configure the Nearby app to test on my local server and eventually my development web server but when I update the portal url, appid, and oauthappid I get an error :

(index):236 Uncaught TypeError: Cannot read property 'trim' of undefined
at Object.x [as normalize] ((index):236)
at d.e._sanitizeUrl (IdentityManager.js:36)
at d.e.findOAuthInfo (IdentityManager.js:13)
at IdentityManager.js:10
at Array.filter (<anonymous>)
at d.e.registerOAuthInfos (IdentityManager.js:10)
at ApplicationBase._registerOauthInfos (ApplicationBase.ts:647)
at ApplicationBase.load (ApplicationBase.ts:202)
at init.ts:39
at wa ((index):19)

 

Any thoughts?

0 Kudos
2 Solutions

Accepted Solutions
by Anonymous User
Not applicable

Hi Brittaney, 

If you haven't done so already try setting these values in the application.json:
{
  appid: <insert app id here>, // This can be an empty string if there is no app id i.e. ""
  portalUrl: <insert portal url where your content is hosted>,
  oauthappid: ""
}

Then, in the applicationBase.json, try setting isEsri to false. 

This should get rid of the error in the console and load the app. Please let use know if you run into any more issues. 

Thanks,
Ryan

View solution in original post

0 Kudos
RyanLibed
Esri Contributor

Hi Brittaney, 

If you haven't done so already try setting these values in the application.json:
{
  appid: <insert app id here>, // This can be an empty string if there is no app id i.e. ""
  portalUrl: <insert portal url where your content is hosted>,
  oauthappid: ""
}

Then, in the applicationBase.json, try setting isEsri to false. 

This should get rid of the error in the console and load the app. Please let use know if you run into any more issues. 

Thanks,
Ryan

View solution in original post

3 Replies
by Anonymous User
Not applicable

Hi Brittaney, 

If you haven't done so already try setting these values in the application.json:
{
  appid: <insert app id here>, // This can be an empty string if there is no app id i.e. ""
  portalUrl: <insert portal url where your content is hosted>,
  oauthappid: ""
}

Then, in the applicationBase.json, try setting isEsri to false. 

This should get rid of the error in the console and load the app. Please let use know if you run into any more issues. 

Thanks,
Ryan

0 Kudos
BrittaneyHarkness
Occasional Contributor

Ryan, thanks!! that did the trick

RyanLibed
Esri Contributor

Hi Brittaney, 

If you haven't done so already try setting these values in the application.json:
{
  appid: <insert app id here>, // This can be an empty string if there is no app id i.e. ""
  portalUrl: <insert portal url where your content is hosted>,
  oauthappid: ""
}

Then, in the applicationBase.json, try setting isEsri to false. 

This should get rid of the error in the console and load the app. Please let use know if you run into any more issues. 

Thanks,
Ryan