question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Issue with loading fixture data: Encountered "0" in payload, but no model was found for model name "0"

See original GitHub issue

Hi Sam,

I’m a bit of a newbie to Ember and I’m trying to use mirage in order to quickly develop a shopping site. I’ve used mirage to create fixtures and my app is correctly making the api calls and getting the data, but i’m getting the following warnings (basically they are numbered till 12, since I have 13 fixtures) in my dev console:

WARNING: Encountered “0” in payload, but no model was found for model name “0” (resolved model name using ember-responsive-retailer@serializer:-rest:.modelNameFromPayloadKey(“0”))

Here is my code: mirage/config.js: https://gist.github.com/zshnr/f8acf076bcf87dc5b3de mirage/fixtures/products.js: https://gist.github.com/zshnr/6696ba7ede17cd21b261 app/adapters/application.js: https://gist.github.com/zshnr/ac13ead44b1a58c8187a app/model/product.js: https://gist.github.com/zshnr/80080ae22d26a5aa220b

I’m using ember.js 1.13.2 and ember-data 1.13.2

I have a feeling this issue is like #168 but I didn’t understand what that user did to fix the problem.

Thanks a lot!

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:6

github_iconTop GitHub Comments

1reaction
zshnrcommented, Jun 26, 2015

Nevermind, I fixed it. So for anyone else having this problem, i’ll leave the solution here:

I found the solution from the documentation here: http://www.ember-cli-mirage.com/docs/v0.1.x/shorthands/

my original mirage/config.js: https://gist.github.com/zshnr/f8acf076bcf87dc5b3de the fixed mirage/config.js: https://gist.github.com/zshnr/58194084e225497f2769

0reactions
samselikoffcommented, Aug 31, 2015

a13496a13dac58fb6417bcba98efdc4bdc9a93c5

Read more comments on GitHub >

github_iconTop Results From Across the Web

Encountered "categories" in payload, but no model was found ...
It seems you have written specific serializer for category model alone. so make sure you have the below and its file name same...
Read more >
Uncaught Error: No model was found for 'model'-ember.js
This error occurs because Ember Data cannot find a model into which to insert the data coming back from the PUT ensuing from...
Read more >
Encountered "categories" in payload, but no model ... - Ember.JS
Hi i get this error “Encountered “categories” in payload, but no model was found for model name “category””. Data I get from the...
Read more >
Error Messages | Cypress Documentation
Test File Errors No tests found This message means that Cypress was unable ... The supportFolder option was removed from Cypress in version...
Read more >
JUnit 5 User Guide
JUnit Jupiter is the combination of the programming model and ... @ParameterizedTest(name = "For example, year {0} is not supported.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found