Reputation: 1568
I completed the ember getting started todo guide.
i then built a JSON Webapi using the correct naming conventions.
ember successfully calls the api and retrives the information i then get the following error messages, and i am unsure on how i am going to debug this
Assertion failed: No model was found for '0' ember.js:394
(anonymous function) ember.js:394
Ember.assert ember.js:53
DS.Store.Ember.Object.extend.modelFor ember-data-latest.js:2177
DS.RESTSerializer.DS.JSONSerializer.extend.extractArray ember-data-latest.js:6403
superWrapper ember.js:1218
(anonymous function) ember-data-latest.js:89
DS.JSONSerializer.Ember.Object.extend.extract ember-data-latest.js:196
(anonymous function) ember-data-latest.js:2649
invokeCallback ember.js:8055
(anonymous function) ember.js:8105
EventTarget.trigger ember.js:7878
(anonymous function) ember.js:8172
DeferredActionQueues.flush ember.js:5459
Backburner.end ember.js:5545
Backburner.run ember.js:5584
Ember.run ember.js:5915
hash.success ember-data-latest.js:7115
l jquery.js:9597
c.fireWith jquery.js:9597
k jquery.js:9597
(anonymous function) jquery.js:9597
Error while loading route: TypeError {} ember.js:394
(anonymous function) ember.js:394
Ember.Router.reopenClass._defaultErrorHandler ember.js:30563
triggerEvent ember.js:30520
trigger ember.js:29641
handleError ember.js:29903
invokeCallback ember.js:8055
(anonymous function) ember.js:8109
EventTarget.trigger ember.js:7878
(anonymous function) ember.js:8180
DeferredActionQueues.flush ember.js:5459
Backburner.end ember.js:5545
Backburner.run ember.js:5584
Ember.run ember.js:5915
hash.success ember-data-latest.js:7115
l jquery.js:9597
c.fireWith jquery.js:9597
k jquery.js:9597
(anonymous function) jquery.js:9597
Uncaught TypeError: Cannot set property 'store' of undefined ember-data-latest.js:2179
DS.Store.Ember.Object.extend.modelFor ember-data-latest.js:2179
DS.RESTSerializer.DS.JSONSerializer.extend.extractArray ember-data-latest.js:6403
superWrapper ember.js:1218
(anonymous function) ember-data-latest.js:89
DS.JSONSerializer.Ember.Object.extend.extract ember-data-latest.js:196
(anonymous function) ember-data-latest.js:2649
invokeCallback ember.js:8055
(anonymous function) ember.js:8105
EventTarget.trigger ember.js:7878
(anonymous function) ember.js:8172
DeferredActionQueues.flush ember.js:5459
Backburner.end ember.js:5545
Backburner.run ember.js:5584
Ember.run ember.js:5915
hash.success ember-data-latest.js:7115
l jquery.js:9597
c.fireWith jquery.js:9597
k jquery.js:9597
(anonymous function)
Upvotes: 0
Views: 319
Reputation: 19128
I think that the payload returned from the server, is missing the root key of the json array, for example:
this.store.find('user')
The expected response from server is:
{
users: [ ... ]
}
Probally you are using:
[...]
If you see this fiddle the same error is throwed, because the missing people
http://jsfiddle.net/marciojunior/8GfG4/
Upvotes: 1