# Problemas ao sobrescrever getters em um controller (3.0.0)

**URL:** <https://meta.discourse.org/t/issues-overriding-getters-in-a-controller-3-0-0/251793>\
**Category:** Bug\
**Created:** [Janeiro 14, 2023, 6:57pm UTC](https://meta.discourse.org/t/issues-overriding-getters-in-a-controller-3-0-0/251793 "2023-01-14T18:57:15Z")\
**Posts on this page:** 1\
**Showing post:** 8

<div class="post-metadata">

**Author:** ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)\
**Post date:** [Janeiro 16, 2023, 10:46pm UTC](https://meta.discourse.org/t/issues-overriding-getters-in-a-controller-3-0-0/251793/8 "2023-01-16T22:46:38Z")

</div>

OK, temos ainda mais certeza de que há um problema aqui… já que `mergeMixins` é mencionado no rastreamento da pilha

 ![image](https://global.discourse-cdn.com/meta/original/4X/7/c/6/7c6d810586ce26c0a74272852156bc2e9bbd03cc.png)

> <https://github.com/emberjs/ember.js/issues/18860>
>
> 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
> \](https://github.com/emberjs/ember.js/blob/v3.17.3/packages/@ember/-internals/metal/lib/mixin.ts#L475) (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\](https://ember-twiddle.com/3147343e2dbf0e4c6965a50fa7e7389d?openFiles=controllers.application%5C.js%2C) (\[Gist\](https://gist.github.com/nlfurniss/3147343e2dbf0e4c6965a50fa7e7389d))

(graças a @RGJ por encontrar isso)

---

_[View the full topic](https://meta.discourse.org/t/issues-overriding-getters-in-a-controller-3-0-0/251793)._
