-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Defining a property on an Ember Component named "container" causes an exception in Production build of Ember #15322
Comments
Hit by the same bug. It's pretty frustrating to hit because there is no good error message, it triggers an error even before 'didInsertElement' - so there's no way to debug using standard console errors, and finally, it ONLY happens in production - so if your build times are long, it takes forever to track down in addition to just being strange that it only occurs in 'production'. It's actually kind of scary, as it's difficult to know what else might only be going wrong in production if there is such a difference between the builds. I moved from 2.10 to 2.13. Dev looked great, but production was completely failing without any reasonable way to trace the error. Had to essentially unbuild an entire app - as the multiple components had the issue, and was a completely unprecedented kind of bug to track down. |
To summarise the issue, the following is fine in Ember 2.12, but in Ember 2.13+ it breaks on production builds, and not in development builds: export default Ember.Component.extend({
container: null
}); I've asked in #dev-ember to see which one of these is correct:
|
Unfortunately, Does someone have time to submit a failing test case here that has a component with a container property (as in @GavinJoyce’s comment)? Alternatively, is there a demo app that shows the error? |
@rwjblue https://github.com/hudakdidit/ember-container-property-production-bug shows the error in a production build from this component: |
I'll write the failing test for the lack of assertion. I'm not sure how to write a high level test showing the app not booting with a production build, this repo provides an example. |
Interestingly, a production build of https://github.com/hudakdidit/ember-container-property-production-bug seems to work in Ember |
@GavinJoyce @TRMW @hudakdidit @jbailey4 @jfarlow @rwjblue is this still an issue, perhaps we should close or create a new reproduction of this, what do you think? |
Upgrading seems a like a totally valid path to resolve the issue. Closing. |
Hi All,
I recently encountered an issue when upgrading from Ember 2.9.1 to 2.13.0. I didn't see anything the Ember guides or docs about this, but please correct me if I missed it. It seems when you add a "container" property to a component you get the following error - only when serving your app with the production build of Ember . If this is not documented I would be happy to contribute. It seems we could also handle the exception with a more informative message to track down the source of the bug.
I was able to track down the source with the help of this SO post https://stackoverflow.com/questions/35155198/how-solve-this-using-the-injected-container-is-deprecated-ember-2-3.
I've put together a demo repo with Ember 2.13 that reproduces the bug. https://github.com/hudakdidit/ember-container-property-production-bug
To reproduce you can run
ember build --environment production
and put the dist folder on a running server or run a local node server likehttp-server
.
The text was updated successfully, but these errors were encountered: