Recently found an issue with mergeMixins. it affects Ember versions at least as far back as 3.12 and also current release and LTS.
As I understand it, the issue is when a mixin defines a property (doesn’t necessarily have a value) then we try to access the value during construction before owner is set. This breaks getters that access services. Shared findings with @pzuraq.
Error message: Attempting to lookup an injected property on an object without a container, ensure that the object was instantiated via a container. Error: Assertion Failed: Attempting to lookup an injected property on an object without a container, ensure that the object was instantiated via a container.
Code where issue arrises
(Please note: the original link was to master 😞. I've changed the tag to the version of ember published the day before, but I have no memory of the original code it linked to)
Reproduction (Gist)
Recently found an issue with mergeMixins. it affects Ember versions at least as far back as 3.12 and also current release and LTS.
As I understand it, the issue is when a mixin defines a property (doesn’t necessarily have a value) then we try to access the value during construction before owner is set. This breaks getters that access services. Shared findings with @pzuraq.
Error message:
Attempting to lookup an injected property on an object without a container, ensure that the object was instantiated via a container. Error: Assertion Failed: Attempting to lookup an injected property on an object without a container, ensure that the object was instantiated via a container.Code where issue arrises
(Please note: the original link was to
master😞. I've changed the tag to the version of ember published the day before, but I have no memory of the original code it linked to)Reproduction (Gist)