Select to view content in your preferred language

Custom component not working when switching to on premise

329
2
04-06-2023 02:14 AM
nevvo
by
New Contributor II

Hello there,

I have a custom control that I have developed that when I am hooking it up to point at the online ArcGIS JavaScript source (https://js.arcgis.com/4.25) it works as expected when I provide it a valid portal and portal id.

We also have an internal portal server running 10.9.1 and we are serving up the equivalent 4.25 JavaScript using the scripts downloaded from here (https://developers.arcgis.com/downloads/#javascript) - I didn't configure this but it is definitely serving up the contents.

If I then take that exact same component and try to use our internal setup it is exhibiting different behaviour. I am getting the following errors in the browser console when the control is trying to load the map:

init.js:29
GET https://test.maps.my-domain.com/javascript/api/4.25/init.js./core/accessorSupport/decorators/cast net::ERR_ABORTED 404 (Not Found)
init.js:30
Error: scriptError: https://test.maps.my-domain.com/javascript/api/4.25/init.js./core/accessorSupport/decorators/cast
at t (init.js:6:37)
at HTMLScriptElement.<anonymous> (init.js:29:339)
init.js:30 src: dojoLoader
init.js:30 info: (2) ['https://test.maps.my-domain.com/javascript/api/4.25/init.js./core/accessorSupport/decorators/cast', Event]
init.js:30 popStackFrame: ƒ (){if(typeof this.stack==="undefined"||this.stack===null||typeof this.fileName==="undefined"||this.fileName===null||typeof this.lineNumber==="undefined"||this.lineNumber===null)return;var a=this.stac…
init.js:30 .
init.js:6
Uncaught (in promise) Error: scriptError: https://test.maps.my-domain.com/javascript/api/4.25/init.js./core/accessorSupport/decorators/cast
at t (init.js:6:37)
at HTMLScriptElement.<anonymous> (init.js:29:339)
t @ init.js:6
(anonymous) @ init.js:29

My control makes no specific calls to any behaviour in the (decorators | API Reference | ArcGIS Maps SDK for JavaScript 4.26 | ArcGIS Developers) - UPDATE - after tracing through a bit further it looks as though it is the Point class that uses this (I need to use Point).

I am not sure as to why it works online but not on prem.

Does anyone have any idea as to what might be happening here?

Thanks,

 

0 Kudos
2 Replies
Noah-Sager
Esri Regular Contributor

Hi @nevvo, thanks for posting your question here. I looked at the downloaded 4.25 init.js, and it looks like ./core/accessorSupport/decorators/cast should be included. Is there a simplified repro app you can share for testing? Can you try running the app with 4.26? And also downloading 4.26 and testing with that to see if it works?

0 Kudos
nevvo
by
New Contributor II

Hi there,

Thanks for the reply.

After a bit more investigation it turns out someone had manually edited the init.js file and had mistakenly pasted in https://test.maps.my-domain.com/javascript/api/4.25/init.js to the file which was causing the problem.

Thanks

 

0 Kudos