3
votes

Yes part of the problem is I don't have a Mac Pro ;) And the demo are done on Macs.

I can get the "Hello World" app to run, loading it via the web interface and accessing via:

http://localhost:8529/_db/Test1/hello-foxx

But I cannot seem to get any other demos to load. For example oauth2:

http://localhost:8529/_db/Test1/oauth2
{"error":true,"code":404,"errorNum":404,"errorMessage":"unknown path 'oauth2'"}

UPDATE - I am also new to server side Javascript. While playing with a simple working demo, I created an error in the app.js file. The resulting output in the browser was my above 404 error. It would seem that if the app.js fails and cannot create the output file, then logically the browser can't find it. So it may not be a "Mounting" or File System error, but a JS error???

1
The 404 messages usually just mean the app couldn't be mounted. It's a good idea to check the logs as they will usually contain the relevant stack traces that give an indicator of what's wrong. The oauth2 app in particular doesn't export an HTTP API, however, so opening it's "mount point" will just greet you with a friendly 404 even if it does work correctly. It's meant to be used from other apps with Foxx.requireApp. Try installing the "foxx-sessions-example" app instead.Alan Plum
I agree with @pluma. Probably an error happened during mounting the application. Error details (including stacktraces) are intentionally not printed in the HTTP response, because that might reveal too much information for clients using your APIs. But still the original error with all backtraces should be logged in detail in the server's logfile.stj
@user1541513 could you check the log files for any error messsages? Thanksfceller
@user1541513 Are there any updates on this issue? Does it work now? If not, can you check the log files please? Thanks13abylon
Gave up on this project for now, playing with Polymer.js and Meteor.js now.user1541413

1 Answers

2
votes

Maybe this can help you. Run arangodb in debug mode:

arangod -c "D:\Tools\ArangoDB 2.2.5\etc\arangodb\arangod.conf" --javascript.dev-app-path "D:\Tools\ArangoDB 2.2.5\www"

Take a look at the console output when you receive the error. This is an internal error at a FOXX app returning 404

2014-11-07T05:07:00Z [4928] INFO ArangoDB (version 2.2.5 [win64]) is ready for business. Have fun!
2014-11-07T05:21:47Z [4928] ERROR Cannot compute Foxx application routes: SyntaxError: JavaScript exception in file '(snippet)' at 11,19: SyntaxError: Unexpected token * 2014-11-07T05:21:47Z [4928] ERROR !\x09\x09if(fuzzyType != * || ! $(fts).All(function(ft){ return typeof(fuzzy[ft]) ==
2014-11-07T05:21:47Z [4928] ERROR ! ^
2014-11-07T05:21:47Z [4928] ERROR stacktrace: SyntaxError: Unexpected token *
2014-11-07T05:21:47Z [4928] ERROR at createModule (common/bootstrap/modules.js:492:20)
2014-11-07T05:21:47Z [4928] ERROR at requireModuleFrom (common/bootstrap/modules.js:645:14)
2014-11-07T05:21:47Z [4928] ERROR at requirePackage (common/bootstrap/modules.js:805:21)
2014-11-07T05:21:47Z [4928] ERROR at [object Object].Module.require (common/bootstrap/modules.js:1206:21)

As you can see there is an error on the FOXX code. After fixing this is a normal output about a request:

2014-11-07T05:23:45Z [4928] INFO /dev/FreeTextEngine, incoming request from 127.0.0.1: GET http://0.0.0.0:8529/dev/FreeTextEngine/create/hotelall?type=* 
2014-11-07T05:23:45Z [4928] INFO /dev/FreeTextEngine, outgoing response with status undefined of type application/json, body length: 125