Ember-inspector: View Tree completely empty

Created on 19 Mar 2014  Â·  14Comments  Â·  Source: emberjs/ember-inspector

I'm not sure when I lost it, but as some point, the View Tree stopped showing anything at all. The other tabs (Routes, Data, Promises) all work as expected.

In a different project, the View Tree works fine.Are there know scenarios in which the View Tree will break?

screen shot 2014-03-18 at 5 06 04 pm

Most helpful comment

It seems this issue is still impacting us. Anything I can do to check what's happening?

The command listed above triggers an error:

window.Ember.Debug.viewDebug.viewTree()

VM25018:2 Uncaught TypeError: Cannot read property 'viewDebug' of undefined(…)

All 14 comments

I have encountered one case https://github.com/tildeio/ember-extension/issues/74.

If you navigate, does the view tree show up?

Hi, I have the same behavior, the view tree is empty, even if I navigate between routes.
Neither the search nor the checkboxes "Components" or "All views" do not work.

@dogawaf are you able to reproduce this in Jsbin ?

I tried but without success. One thing to notice, I run an ember-cli app...

@dogawaf Can you try to run window.Ember.Debug.viewDebug.viewTree() in the console and tell me what is the output you get?

And also which browser are you using?

I'am using Chrome 36.0.1985.125, on Ubuntu 14.04

> window.Ember.Debug.viewDebug.viewTree()
< false

The extension can't find the main view of your application.

what does $('.ember-application > .ember-view') return?

Which version of Ember do you use?

Thx @Cyril-sf, I found it.
I was customizing the body class (for the needs to a bootstrap theme), and the .ember-application class was not maintained in the list of classes. With .ember-application on the body, the view tree is now well populated.

Does the ember inspector can throw some advice if an ember application is detected (other tabs of the inspector work well) but no .ember-application?

@dogawaf I guess we could use the same logic as in the other tabs: get the application from Ember.Namespace.NAMESPACES and then get the ApplicationView from the application. That would avoid to rely on CSS selectors to lookup for that view.

I think not having .ember-application somewhere in the DOM must be considered as a problem. The setup of Ember.EventDispatcher relies on this class to do some usefull assertions.
In my case, .ember-application was here at the time of Ember.EventDispatcher.setup(), but I removed it accidentally later. So finally the only "hint" about this issue was the empty view tree...

This is orthogonal. If Ember.EventDispatcher hasn't been setup properly, Ember would have complained.

There's no reason for the inspector to display routes but not views in your case.

I'll make a PR to close this issue.

working on it

It seems this issue is still impacting us. Anything I can do to check what's happening?

The command listed above triggers an error:

window.Ember.Debug.viewDebug.viewTree()

VM25018:2 Uncaught TypeError: Cannot read property 'viewDebug' of undefined(…)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

brian-c picture brian-c  Â·  3Comments

camskene picture camskene  Â·  6Comments

stevehanson picture stevehanson  Â·  9Comments

fpauser picture fpauser  Â·  3Comments

lifeart picture lifeart  Â·  7Comments