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: events.inherited-function-listeners #191

Closed
gandalfar opened this issue Apr 27, 2019 · 2 comments

Comments

Projects
None yet
2 participants
@gandalfar
Copy link

commented Apr 27, 2019

When upgrading my app, I've started seeing the following deprecation warning: events.inherited-function-listeners. I can't reproduce it inside dummy app in this repo, but it's present when I create a new ember app.

The full error is:

deprecate.js:122 DEPRECATION: You attempted to remove a function listener which did not exist on the instance, which means it was an inherited prototype listener, or you attempted to remove it before it was added. Prototype function listeners have been deprecated, and attempting to remove a non-existent function listener this will error in the future. [deprecation id: events.inherited-function-listeners] See https://emberjs.com/deprecations/v3.x#toc_events-inherited-function-listeners for more details.
        at logDeprecationStackTrace (http://localhost:4220/assets/vendor.js:46053:23)
        at HANDLERS.<computed> (http://localhost:4220/assets/vendor.js:46147:11)
        at raiseOnDeprecation (http://localhost:4220/assets/vendor.js:46080:11)
        at HANDLERS.<computed> (http://localhost:4220/assets/vendor.js:46147:11)
        at invoke (http://localhost:4220/assets/vendor.js:46159:11)
        at deprecate (http://localhost:4220/assets/vendor.js:46118:30)
        at Meta.pushListener (http://localhost:4220/assets/vendor.js:22772:35)
        at Meta.removeFromListeners (http://localhost:4220/assets/vendor.js:22705:12)
        at removeListener (http://localhost:4220/assets/vendor.js:23436:9)

Repository with a single component where I see this warning is here:
https://github.com/gandalfar/viewport-test

Version

"ember-source": "~3.8.1",
"ember-in-viewport": "^3.5.1",

Test Case

https://github.com/gandalfar/viewport-test

Component code is here:
https://github.com/gandalfar/viewport-test/blob/master/app/components/example-component.js

Steps to reproduce

I open the page in Chrome 74 on macOS 10.13.6 and deprecation appears in Dev Tools.

@snewcomer

This comment has been minimized.

Copy link
Contributor

commented Apr 27, 2019

@gandalfar This should be fixed in 3.5.2! Specifically changed it to a string listeners instead of on the prototype in the PR below.

Ref #185

@snewcomer snewcomer closed this Apr 27, 2019

@gandalfar

This comment has been minimized.

Copy link
Author

commented Apr 29, 2019

Works great. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.