question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

You cannot use the same root element (#ember-testing) multiple times in an Ember.Application

See original GitHub issue

We started getting this on the build server after 0.3.2 was published. Traced it back to ember-qunit and a downgrade to 0.3.1 which got our tests running successfully again. Here is the log

ok 8 PhantomJS 1.9 - JSHint - .: test-helper.js should pass jshint
not ok 9 PhantomJS 1.9 - AddressDisplayComponent: it renders

---
actual: >
null
message: >
TypeError: Requested keys of a value that is not an object.
Log: >
...
not ok 10 PhantomJS 1.9 - AddressDropdownComponent: it renders

---
actual: >
null
message: >
Error: Assertion Failed: You cannot use the same root element (#ember-testing) multiple times in an Ember.Application
Log: >
...
not ok 11 PhantomJS 1.9 - BackerTotalsComponent: it renders

---
actual: >
null
message: >
Error: Assertion Failed: You cannot use the same root element (#ember-testing) multiple times in an Ember.Application
Log: >
...
not ok 12 PhantomJS 1.9 - ConfirmProductComponent: it renders

---
actual: >
null
message: >
Error: Assertion Failed: You cannot use the same root element (#ember-testing) multiple times in an Ember.Application
Log: >
...
not ok 13 PhantomJS 1.9 - InputRegexComponent: it renders

---
actual: >
null
message: >
Error: Assertion Failed: You cannot use the same root element (#ember-testing) multiple times in an Ember.Application
Log: >

I’m not familiar enough with the changes in 0.3.2 to pinpoint the issue. I see some stuff was added for Glimmer (we’re on Ember 1.11.3)

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:26 (8 by maintainers)

github_iconTop GitHub Comments

6reactions
ef4commented, May 24, 2018

To future visitor who land here from Google: this is an old thread with out-of-date advice. For example, in modern Ember you’re supposed to use module directly from QUnit, even though this thread calls that bad.

There are several reasons you might see “you cannot use the same root element” errors, mostly around broken tests leaving part of an application around to conflict with the next test.

0reactions
txmcommented, Jun 15, 2019

Ah ha thanks, test-support/helpers/start-app.js attributes.autoboot = true; // <------ true here.

Still the same num of test failing, but at least I can see for sure now that they are unhandled promise rejections.

Read more comments on GitHub >

github_iconTop Results From Across the Web

You cannot use the same root element (DIV) multiple times in ...
This error started appearing after I upgraded to Ember 2.18 and ember-cli-qunit 4.2.1. I'm honestly not sure if it's a bug, my tests...
Read more >
You cannot use the same root element (body) multiple times in ...
You cannot bind several Ember application to the same DOM element, as it will conflict for DOM maintenance. You nevertheless can instanciate ...
Read more >
You cannot use the same root element (body) multiple times in ...
You cannot bind several Ember application to the same DOM element, as it will conflict for DOM maintenance. You nevertheless can instanciate several...
Read more >
Error: Assertion Failed: You cannot make a new ... - Ember.JS
Application using a root element that is a descendent of an ... Hi, I'm trying to run tests in the browser, but I'm...
Read more >
ember-qunit | Yarn - Package Manager
ember-qunit simplifies testing of Ember applications with QUnit by providing QUnit-specific wrappers around the helpers contained in ember-test-helpers.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found