Hi, I’m having the same problem, I’m just getting into DreamFactory and trying to get the Trivia App example to work, using the free cloud DSP and have followed the instructions precisely. My JS console error is:
TypeError: undefined is not a function
at _formatAndCreateJsonObj (http://0.0.0.0:9000/scripts/services/services.js:221:29)
at http://0.0.0.0:9000/scripts/services/services.js:248:30
at wrappedCallback (http://0.0.0.0:9000/bower_components/angular/angular.js:11561:81)
at http://0.0.0.0:9000/bower_components/angular/angular.js:11647:26
at Scope.$eval (http://0.0.0.0:9000/bower_components/angular/angular.js:12673:28)
at Scope.$digest (http://0.0.0.0:9000/bower_components/angular/angular.js:12485:31)
at Scope.$apply (http://0.0.0.0:9000/bower_components/angular/angular.js:12777:24)
at done (http://0.0.0.0:9000/bower_components/angular/angular.js:8371:45)
at completeRequest (http://0.0.0.0:9000/bower_components/angular/angular.js:8585:7)
at XMLHttpRequest.xhr.onreadystatechange (http://0.0.0.0:9000/bower_components/angular/angular.js:8524:11) undefined angular.js:10061
When I try to make a single call to the movies API like this:
TypeError: Cannot read property 'getMovie' of undefined
at new <anonymous> (http://0.0.0.0:9000/scripts/controllers/main.js:37:51)
at invoke (http://0.0.0.0:9000/bower_components/angular/angular.js:3966:17)
at Object.instantiate (http://0.0.0.0:9000/bower_components/angular/angular.js:3977:23)
at http://0.0.0.0:9000/bower_components/angular/angular.js:7274:28
at link (http://0.0.0.0:9000/bower_components/angular-route/angular-route.js:911:26)
at nodeLinkFn (http://0.0.0.0:9000/bower_components/angular/angular.js:6704:13)
at compositeLinkFn (http://0.0.0.0:9000/bower_components/angular/angular.js:6098:13)
at publicLinkFn (http://0.0.0.0:9000/bower_components/angular/angular.js:5994:30)
at boundTranscludeFn (http://0.0.0.0:9000/bower_components/angular/angular.js:6118:21)
at controllersBoundTransclude (http://0.0.0.0:9000/bower_components/angular/angular.js:6725:18) <div data-ng-view="" class="ng-scope">
Config looks good. Can you assign one app to the role you have set for guest users, and let me know the app name for it? I’ll try and pull your api docs.
The guest users have the role “Trivia Users”, and this role is assigned to the app “trivia”. The Live API Doc all works fine from the Launchpad. Ah! I just now pressed “Update” on the Trivia Users role, and now there are no assignments under Service Access and System Access. I’ll add that stuff and see if that fixes it.
EDIT: Nope, the access was there, it just reverted to an empty role when I pressed update.
I’m running the Angular SDK against your machine and can make calls to the db , so its definitely built, let me modify my code to use the app name you gave me.
getMovie is the name of the function in the Trivia App Services code, but this in turn calls DreamFactory.api.movies.getMovies({“q”: _generateSearchTerm()}, so I think the naming should be all right?
EDIT: I see your point, I can try a direct call using getMovies…
Furthermore, I now noticed from the console that I’m actually getting a valid response from a movies query (Rocky, to be precise), but it’s still returning this error so there’s something fishy with the angular code.