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.

[Bug] Injecting Ember Data Store to Avoid Implicit Injection is Broken

See original GitHub issue

🐞 Describe the Bug

In advance of implicit injections of the Ember Data’s Store being removed we’ve been refactoring to explicit injections of the store when we need it. As of Ember v3.28.7 we’re seeing errors to this effect:

this.store.findAll is not a function

Note that this is not unique to findAll — any method on Store will fail.

🔬 Minimal Reproduction

  1. Clone https://github.com/jherdman/ember-data-store-sadness
  2. npm install && npm start
  3. Visit http://localhost:4200
  4. Open your dev console, see error

😕 Actual Behavior

Page does not load, an error is raised as described above.

🤔 Expected Behavior

  1. No deprecation warning is raised
  2. Store works as expected

🌍 Environment

  • Ember: - 3.28.7
  • Node.js/npm: - v16.13.0
  • OS: - macOS 12.0.1
  • Browser: - Firefox 94.0.2

➕ Additional Context

Bug does not occur in Ember v3.28.6

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

4reactions
mixoniccommented, Dec 2, 2021

3.28.8 is out which should address this bug. Thank you for the excellent write up and reproduction @jherdman, they really helped focus the conversation! 🍻

2reactions
mansonacommented, Dec 3, 2021

Thanks so much for working through this @mixonic 🎉 It’s working exactly as it should now 😍

Read more comments on GitHub >

github_iconTop Results From Across the Web

Implicit Injection Deprecation - Ember RFCs
This RFC seeks to deprecate implicit injections on arbitrary Ember Framework objects. This is commonly done via owner.inject in an intializer or ...
Read more >
@ember-data/store | Yarn - Package Manager
Provides the Store service which coordinates the cache with the network and ... EmberData. The lightweight reactive data library for JavaScript applications.
Read more >
eslint-plugin-ember - npm
ESLint plugin for Ember.js apps. Latest version: 11.3.1, last published: 6 days ago. Start using eslint-plugin-ember in your project by ...
Read more >
ember error this.store.findAll is not a function - Stack Overflow
The reason why you see it is that starting from the v4 Ember doesn't allow some implicit service injections which were there up...
Read more >
[Solved]-ember error this.store.findAll is not a function-ember.js
The reason why you see it is that starting from the v4 Ember doesn't allow some implicit service injections which were there up...
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