Select to view content in your preferred language

Custom component not working when switching to on premise

04-06-2023 02:14 AM
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 ( 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 ( - 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:

GET net::ERR_ABORTED 404 (Not Found)
Error: scriptError:
at t (init.js:6:37)
at HTMLScriptElement.<anonymous> (init.js:29:339)
init.js:30 src: dojoLoader
init.js:30 info: (2) ['', 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 .
Uncaught (in promise) Error: scriptError:
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?



0 Kudos
2 Replies
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
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 to the file which was causing the problem.



0 Kudos