Select to view content in your preferred language

'NS_ERROR_FAILURE  location: "JS frame' using v3.2 of the API

1363
4
10-11-2012 02:06 PM
StephenLead
Honored Contributor
I'm seeing a few error messages if I run this simple sample from a Mac webserver directory. I'm getting the error message below, and the map fails to load:

Error: [Exception... "Failure"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame :: http://serverapi.arcgisonline.com/jsapi/arcgis/?v=3.2 :: <TOP_LEVEL> :: line 15"  data: no]
http://serverapi.arcgisonline.com/jsapi/arcgis/?v=3.2
Line 15


[ATTACH=CONFIG]18374[/ATTACH]

If I revert the code to use v2.8 the error messages disappear and the map loads. This code wasn't causing a problem for me previously.

The live sample doesn't cause the error message, implying that there's a problem with my web server - what should I be looking at in order to debug this? I'm not aware of having changed anything recently.

Thanks,
Steve
0 Kudos
4 Replies
derekswingley1
Deactivated User
Can you elaborate on "Mac webserver directory"? Are you using the apache instance that comes with OSX (that's what I use)? Some other web server? Anvil, perhaps (I personally haven't tried this one yet)?

What's the URL your using to access the sample via your browser?
0 Kudos
StephenLead
Honored Contributor
Hi Derek,

Yep, I'm using the in-built Mountain Lion web server - after looking up how to configure it months ago I haven't touched it, and up until now it has "just worked".

The URL I'm using is file:///Library/WebServer/Documents/demos/test.html for the simple sample referenced above. This works when using v2.8 but fails when using 3.1 or 3.2

I just tried restarting the web server using sudo apachectl restart but this had no effect.

Thanks,
Steve
0 Kudos
derekswingley1
Deactivated User
Using "file:///Library/WebServer/Documents/demos/test.html" isn't actually using your web server. Your URL needs to start with "http://localhost/". If I had to guess, try http://localhost/demos/test.html. Obviously you can use your machine's name or your IP address in place of localhost.
0 Kudos
StephenLead
Honored Contributor
Sorry, you're obviously right. I don't know why I made that simple mistake.

Thanks!
0 Kudos