Describe the bug
I am building an ember-addon and am getting this error when installing storybook in the console.
Assertion Failed: You cannot make a new Ember.Application using a root element that is an ancestor of an existing Ember.Application

To Reproduce
Steps to reproduce the behavior:
Expected behavior
No error.
System:
This is an error we are trying to work on to resolve with the ember-core team. It is dealing with loading the application twice, the fix is to use the add-on and make sure that the EMBER_ENVIRONMENT is set to testing and it is ensuring that fast boot is turned off.
Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 30 days. Thanks!
@gabrielcsapo you mentioned the fix to this is using the add-on. do you mean https://github.com/storybooks/ember-cli-storybook ? Does that mean I would remove all the npm packages I have already added given I used this set of instructions for setting up? https://storybook.js.org/basics/guide-ember/
@transitorytammy I have an RB open to update the docs to reflect the ability to use the blueprints ember-cli-storybook would you see if that helps https://github.com/storybooks/storybook/pull/5489?
Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 30 days. Thanks!
I did run ember b --environment=test
and then ran storybook script. it worked
Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 30 days. Thanks!
Hey there, it's me again! I am going close this issue to help our maintainers focus on the current development roadmap instead. If the issue mentioned is still a concern, please open a new ticket and mention this old one. Cheers and thanks for using Storybook!
For anyone coming here with the same symptoms, I thought I'd share something that worked for us. It seems the storybook integration for ember is depending on ENV.APP.autoboot to be false. When storybook was running, this setting was correctly set to false. But in the build phase, it wasn't. We had to make sure to run ember build in an environment that set ENV.APP.autoboot = false. In our case, that meant:
ember build --environment test
If this doesn't work for you, check config/environment.js to make sure autoboot is set correctly.
The symptoms we had except for the same You cannot make a new Ember.Application error being logged in the javascript console was that our login screen showed up instead of the stories. This only happened on initial load however, if you refreshed the storybook page the issue went away.
Most helpful comment
For anyone coming here with the same symptoms, I thought I'd share something that worked for us. It seems the storybook integration for ember is depending on
ENV.APP.autobootto be false. When storybook was running, this setting was correctly set to false. But in the build phase, it wasn't. We had to make sure to runember buildin an environment that setENV.APP.autoboot = false. In our case, that meant:If this doesn't work for you, check
config/environment.jsto make sureautobootis set correctly.The symptoms we had except for the same
You cannot make a new Ember.Applicationerror being logged in the javascript console was that our login screen showed up instead of the stories. This only happened on initial load however, if you refreshed the storybook page the issue went away.