Skip to content
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

Ember Error: Assertion Failed: You cannot make a new Ember.Application using a root element that is an ancestor of an existing Ember.Applicatiom #5134

Closed
transitorytammy opened this issue Jan 2, 2019 · 9 comments
Assignees

Comments

@transitorytammy
Copy link

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

screen shot 2019-01-02 at 12 08 10 pm

To Reproduce
Steps to reproduce the behavior:

  1. add storybook to ember-addon repository
  2. open console and see above error

Expected behavior
No error.

System:

  • OS: [MacOS]
  • Device: [Macbook Pro 2018]
  • Browser: [chrome]
  • Framework: [ember]
  • Addons: [@storybook/addon-a11y]
  • Version: [e.g. 4.0.0]
@gabrielcsapo
Copy link
Contributor

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.

@stale
Copy link

stale bot commented Jan 29, 2019

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!

@stale stale bot added the inactive label Jan 29, 2019
@transitorytammy
Copy link
Author

@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/

@gabrielcsapo
Copy link
Contributor

@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 #5489?

@stale stale bot removed the inactive label Feb 5, 2019
@stale
Copy link

stale bot commented Feb 26, 2019

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!

@stale stale bot added the inactive label Feb 26, 2019
@Amerr
Copy link

Amerr commented Mar 22, 2019

I did run ember b --environment=test
and then ran storybook script. it worked

@stale stale bot removed the inactive label Mar 22, 2019
@stale
Copy link

stale bot commented Apr 12, 2019

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!

@stale stale bot added the inactive label Apr 12, 2019
@stale
Copy link

stale bot commented May 12, 2019

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!

@stale stale bot closed this as completed May 12, 2019
backspace added a commit to hashicorp/nomad that referenced this issue Oct 11, 2019
As suggested here, though I suspect it’s superfluous since
more recent changes:
storybookjs/storybook#5134
@trotzig
Copy link

trotzig commented Nov 14, 2019

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants