ember-inspector icon indicating copy to clipboard operation
ember-inspector copied to clipboard

View tree is blank

Open ToddSmithSalter opened this issue 12 years ago • 19 comments

After the upgrade to 1.6, the view tree no longer shows anything. The Routes panel is working fine, just the current view is non-functional.

Blank View Tree

My app stack:

DEBUG: -------------------------------
vendor.js:28474 DEBUG: Ember                       : 1.8.0-beta.5
vendor.js:28474 DEBUG: Ember Data                  : 1.0.0-beta.11
vendor.js:28474 DEBUG: Handlebars                  : 1.3.0
vendor.js:28474 DEBUG: jQuery                      : 1.11.1
vendor.js:28474 DEBUG: Ember Simple Auth           : 0.6.7
vendor.js:28474 DEBUG: Ember Simple Auth OAuth 2.0 : 0.6.7
vendor.js:28474 DEBUG: -------------------------------

ToddSmithSalter avatar Oct 23 '14 16:10 ToddSmithSalter

Are there any errors in the console? Can you reproduce this issue in a Jsbin or any public example?

teddyzeenny avatar Oct 27 '14 12:10 teddyzeenny

@teddyzeenny: please close this issue. Entirely my bad JS.

ToddSmithSalter avatar Oct 31 '14 20:10 ToddSmithSalter

I'm having the same problem. Can you explain what was causing your error, or how you figured out the problem?

I would note that the 1.5.0 version of the inspector does not have the same problem for me...

marshall-prosperworks avatar Oct 31 '14 20:10 marshall-prosperworks

@marshall-prosperworks: Pretty much there was malformed data in the ember-data store on a route or view that needed it, the view tree didn't work. I narrowed it down by trial and error on the routes panel, showing on the current route and checking controllers and models. I looked for properties that looked janky. Wish I had a better solution than that, but it's what worked for me.

ToddSmithSalter avatar Oct 31 '14 20:10 ToddSmithSalter

Still feels like, if something goes wrong that would make the view panel break, there should be some error message or diagnostic available. Even if it is one's own code at fault.

marshall-prosperworks avatar Oct 31 '14 22:10 marshall-prosperworks

@marshall-prosperworks it could be that the error is getting caught inside a promise. Look in the Promise tab for rejected promises, or maybe try using Ember.RSVP.config('onerror').

teddyzeenny avatar Nov 04 '14 14:11 teddyzeenny

@marshall-prosperworks ping

teddyzeenny avatar Nov 21 '14 20:11 teddyzeenny

I have not had time to investigate this problem, unfortunately. I'm currently working around it by using a previous build of the plugin.

marshall-prosperworks avatar Nov 21 '14 20:11 marshall-prosperworks

The only 2 commits between 1.5 and 1.6 that could affect the view tree are https://github.com/emberjs/ember-inspector/commit/063198a73b2b5baed2a858e95d1f064f8524f3e2 and https://github.com/emberjs/ember-inspector/commit/ff2145185b6d2575fd0b76801bb8b35debfdabae.

Can you tell me what the value of your application's rootElement (YourApp.rootElement) ? And the value of $(YourApp.rootElement).find('> .ember-view').attr('id');

teddyzeenny avatar Nov 21 '14 20:11 teddyzeenny

App.rootElement undefined Ember.VERSION "1.0.0"

marshall-prosperworks avatar Nov 21 '14 21:11 marshall-prosperworks

@marshall-prosperworks App.rootElement shouldn't be undefined. The default value is body. Any idea why it might beundefined?

teddyzeenny avatar Nov 22 '14 12:11 teddyzeenny

@marshall-prosperworks ping

teddyzeenny avatar Jan 31 '15 21:01 teddyzeenny

Sorry, have not had much chance to look into this problem, though we are still experiencing it.

marshall-prosperworks avatar Feb 03 '15 21:02 marshall-prosperworks

@marshall-prosperworks Is it possible you are deleting the app's rootElement? if you search your project for rootElement do you get any results?

teddyzeenny avatar Feb 03 '15 21:02 teddyzeenny

Our project contains a few applications which we run in different contexts. The one that was breaking, was specifying a rootElement of '#application_content', but it seemed that we had no element with that id (running $('#application_content') from the command line got me an empty array).

I saw that we had some other Applications, which were using rootElement: 'body', so i tried changing '#application_content' to 'body', and now the newer inspector version is working. Nice!

Still, it would be nice if the inspector or the framework itself had some better way to deal with this error instead of failing silently. Like, "You specified an applicationRoot which is not present. This will break Ember Inspector and possibly other things"

Anyways, thanks again.

marshall-prosperworks avatar Feb 03 '15 22:02 marshall-prosperworks

Oh I guess i should point out that changing the rootElement to 'body' makes the ember inspector seem to work, but also is messing up my app in other ways, but I guess I just need to figure that out on my end.

marshall-prosperworks avatar Feb 03 '15 22:02 marshall-prosperworks

If your rootElement doesn't exist, you're supposed to get an error from Ember core. See http://emberjs.jsbin.com/quxeli/1/edit?html,js,console

teddyzeenny avatar Feb 03 '15 23:02 teddyzeenny

Having the same issue when there is no root element in the page. I think it should give a waring though.

benedikt-buchert avatar Jun 10 '15 12:06 benedikt-buchert

Closing this for relevancy.

locks avatar Sep 15 '16 13:09 locks