You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the app runs on the server side, I’m hitting few service injection errors of this kind:
Attempting to inject an unknown injection: 'service:xyz'
After some digging with @krisselden, we found that there's an error thrown (and swallowed) earlier in EngineInstance's cloneParentDependencies() method. The error is:
EventDispatcher should never be instantiated in fastboot mode. Please report this as an Ember bug.
So here I am, reporting an Ember bug as the error told me 🙂
I did some more digging and found an explanation to the swallowing of the real error. The error happens during the boot of an engine. The engine's boot() method correctly returns a rejected promise because of that error. Then that promise is ignored and the app continues running as if nothing happened.
The text was updated successfully, but these errors were encountered:
It seems like the issue was introduced by this commit. The event_dispatcher was moved from the registrations list to the singletons list. The difference being that registrations are only resolved at this point, but singletons are eagerly looked up and instantiated.
A possible fix would be to check if running in a server-side environment, don't add event_dispatcher:main to the singletons list.
Ember version:
[email protected]
When the app runs on the server side, I’m hitting few service injection errors of this kind:
After some digging with @krisselden, we found that there's an error thrown (and swallowed) earlier in EngineInstance's
cloneParentDependencies()
method. The error is:So here I am, reporting an Ember bug as the error told me 🙂
I did some more digging and found an explanation to the swallowing of the real error. The error happens during the
boot
of an engine. The engine'sboot()
method correctly returns a rejected promise because of that error. Then that promise is ignored and the app continues running as if nothing happened.The text was updated successfully, but these errors were encountered: