Using nothing but a simple sample from ESRI (StreamLayer using ArcGIS API for JavaScript and ArcGIS GeoEvent Processor for Server ) I get an error saying "require is undefined". I also get 'dojo is undefined' if I use the classic method (TOC ) but that example is not by the developers of ESRI.
This happens on a client machine, but works just fine on my machine as well.
I have tried compatibility mode on and off with no success: I keep getting the exact same error. If I use code that that use the 3.1 API it seems to work just fine. But there seems to e something about the new version of dojo in 3.12 that is causing errors for me.
Solved! Go to Solution.
You can take a look at these options. Do you have dojoConfig before the ArcGIS JS API script tag:
<!-- set Dojo configuration, load Dojo -->
<script>
dojoConfig = {
parseOnLoad: true,
async: true
};
</script>
This may provide you with a better error message when debugging.
If it's just on the client machines I would think it's the IE settings like Kelly Hutchins mentioned.
It can be tough to figure out where to start but I would start with security settings.
Click on Tools >> Internet Options
Select the Security tab and then select Custom level button; this will open additional settings where you can see what may be blocked, enabled or prompted. You should compare this to a machine that has a working application. There are four areas to check here; Internet, Local intranet, Trusted Sites, and Restricted Sites. Only change one item at a time if something doesn't match, click apply and refresh the page. If the security settings match, you can compare the other options one by one.
Also, ensure any security setting that you change actually stayed. You can close the browser and re-open it for this. If they don't, there may be security preventing browser security changes.
Thank you for the helpful information. I found the cause:
I had to enable "Active Scripting" in Tool -> Internet Options -> Security Tab -> Custom Level
I also had to run-as-administrator IE to be able to change those settings.
I'm surprised that there wasn't an issue when running version 3.1 of ESRI's API.