Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deprecation warnings on Ember 2.4.2 #12

Closed
bgentry opened this issue Apr 6, 2016 · 2 comments
Closed

deprecation warnings on Ember 2.4.2 #12

bgentry opened this issue Apr 6, 2016 · 2 comments

Comments

@bgentry
Copy link
Contributor

bgentry commented Apr 6, 2016

Seeing these when using an imgix-image component on an Ember 2.4.2 app:

DEPRECATION: Using the injected `container` is deprecated. Please use the `getOwner` helper instead to access the owner of this object. [deprecation id: ember-application.injected-container] See http://emberjs.com/deprecations/v2.x#toc_injected-container-access for more details.
        at HANDLERS.(anonymous function) (http://localhost:4200/assets/vendor.js:16376:7)
        at raiseOnDeprecation (http://localhost:4200/assets/vendor.js:16286:12)
        at HANDLERS.(anonymous function) (http://localhost:4200/assets/vendor.js:16376:7)
        at invoke (http://localhost:4200/assets/vendor.js:16392:7)
        at deprecate (http://localhost:4200/assets/vendor.js:16345:32)
        at Object.deprecate (http://localhost:4200/assets/vendor.js:26461:37)
        at Object.defineProperty.get (http://localhost:4200/assets/vendor.js:11582:26)
        at .<anonymous> (http://localhost:4200/assets/vendor.js:131841:18)
        at Descriptor.ComputedPropertyPrototype.get (http://localhost:4200/assets/vendor.js:25263:28)
ember.debug.js:6208 DEPRECATION: A property of <myapp-ember@view:-outlet::ember611> was modified inside the didInsertElement hook. You should never change properties on components, services or models during didInsertElement because it causes significant performance degradation. [deprecation id: ember-views.dispatching-modify-property]
        at HANDLERS.(anonymous function) (http://localhost:4200/assets/vendor.js:16376:7)
        at raiseOnDeprecation (http://localhost:4200/assets/vendor.js:16286:12)
        at HANDLERS.(anonymous function) (http://localhost:4200/assets/vendor.js:16376:7)
        at invoke (http://localhost:4200/assets/vendor.js:16392:7)
        at deprecate (http://localhost:4200/assets/vendor.js:16345:32)
        at Object.deprecate (http://localhost:4200/assets/vendor.js:26461:37)
        at exports.default._emberMetalMixin.Mixin.create._Mixin$create.scheduleRevalidate (http://localhost:4200/assets/vendor.js:53421:22)
        at http://localhost:4200/assets/vendor.js:23840:32
        at Object.BasicStream.notifySubscribers (http://localhost:4200/assets/vendor.js:32430:11)
@kellysutton
Copy link
Contributor

Thanks for bringing this up. Looks like the problem code is here: https://github.com/imgix/ember-cli-imgix/blob/master/addon/mixins/imgix-path-behavior.js#L208-L210

We'll review and see what the path forward here is. Likely just need to update the addon to take advantage of more public APIs.

reidab added a commit to thedyrt/ember-cli-imgix that referenced this issue Jun 2, 2016
Fixes deprecation warning and associated performance issue in Ember 2.4.2

imgix#12
@reidab
Copy link
Contributor

reidab commented Jun 2, 2016

The second deprecation warning about modifying properties within didInsertElement points to a legitimate performance concern. We've been experiencing browser crashes when moving between pages of collections containing many imgix-image components. Deferring the resize count update with Ember.run.once seems to solve the issue. PR incoming…

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants