Coroutine couldn't be started because the the game object 'X' is inactive!
Coroutines can only be run on active GameObjects.
Use activeInHierarchy to check whether the GameObject is active. Don't use activeSelf, the GameObject's active state depends on the hierarchy.
if (gameObject.activeInHierarchy)
{
StartCoroutine(MyCoroutine());
}Or
Reference another component that is in an active hierarchy and start the coroutine on it instead.
_otherComponent.StartCoroutine(MyCoroutine());