emberjs / ember-inspector

Adds an Ember tab to the browser's Developer Tools that allows you to inspect Ember objects in your application.
MIT License
966 stars 286 forks source link

Ember Inspector has errored. #1123

Closed vigneshrajarr closed 8 months ago

vigneshrajarr commented 4 years ago

I couldn't reproduce this since I was using the inspector to crack client code. While using Zoho Books, this error occurred.

Versions : Ember Inspector | 3.13.1 Ember | 3.4.8 jQuery | 2.1.0

image

RobbieTheWagner commented 4 years ago

Sounds like the error is here https://github.com/emberjs/ember-inspector/blob/47138779d4f6c559bda90a0e53df5838ac6da446/ember_debug/libs/capture-render-tree.js#L207

@chancancode do we need to make that if (template && template.meta)?

chancancode commented 4 years ago

Yeah, adding the check there (and the conditional below it) would silence the error, but it is certainly unexpected and may be worth digging deeper into how it actually manifests. I was expecting this to be always present, so if that turns out to be wrong, some underlying assumptions may also be wrong (e.g. maybe we should just skip over that node because it means nothing is being rendered there).

@vigneshrajarr are you able to set a breakpoint at that location and see if you can figure out which outlet/route template is causing this error, and see if the corresponding route have anything special like a named outlet, or an overridden renderTemplate method, etc?

chancancode commented 4 years ago

@vigneshrajarr I managed to create an account to test this in the app but I couldn't reproduce the issue. If you know the specific place to look, let me know 🙌

vigneshrajarr commented 4 years ago

@vigneshrajarr are you able to set a breakpoint at that location and see if you can figure out which outlet/route template is causing this error, and see if the corresponding route have anything special like a named outlet, or an overridden renderTemplate method, etc?

image

The page has Trial expiry notification. After clicking cancel, the error occurs. Added a screen recording here https://drive.google.com/file/d/1NBlr28nLfge6TV-ELPCZFXiQ_YAf8Ar8/view?usp=sharing

Hope this is what you have asked. P.S: I am not an ember expert. Just learning.

chancancode commented 4 years ago

@vigneshrajarr that is great! it seems like this is a named outlet called {{outlet "modal"}} on the application.hbs template, but rendered by the "home.trialexpired" route. I am guessing, in app/routes/home/trialexpired.js, there is an overridden renderTemplate() method that renders a template, something along the lines of:

    this.render('some-template', {
      outlet: 'modal',
      into: 'application'
    });

And then, when you close the modal, I think there is probably code that is similar to these:

    this.disconnectOutlet({
      outlet: 'modal',
      parentView: 'application'
    });

Does that seem to match what you see in the code?

MariannaAtPlay commented 3 years ago

Hello, I am getting a similar error while working on my app. This started appearing only recently. We recently upgraded to Ember 3.20 - not sure if this is related. Guessing this is related to the same issue. Also, some of the components from my app don't get rendered in the inspector (those that load after some slow requests come back) Would love to see this fixed!

Uncaught Error: Assertion Failed: Cannot call `meta` on symbol
    at assert (index.js:172)
    at meta (meta.js:649)
    at Class.retainObject (<anonymous>:4264:18)
    at RenderTree._serializeObject (<anonymous>:2207:19)
    at RenderTree._serializeItem (<anonymous>:2199:31)
    at <anonymous>:2180:28
    at Array.forEach (<anonymous>)
    at RenderTree._serializeDict (<anonymous>:2179:25)
    at RenderTree._serializeArgs (<anonymous>:2162:21)
    at RenderTree._serializeRenderNode (<anonymous>:2147:22)
VM243495:106 Ember Inspector has errored.
This is likely a bug in the inspector itself.
You can report bugs at https://github.com/emberjs/ember-inspector.
Error message: Assertion Failed: Cannot call `meta` on symbol
Stack trace: Error: Assertion Failed: Cannot call `meta` on symbol
    at assert (http://localhost:4200/assets/vendor.js:55051:15)
    at meta (http://localhost:4200/assets/vendor.js:31552:91)
    at Class.retainObject (<anonymous>:4264:18)
    at RenderTree._serializeObject (<anonymous>:2207:19)
    at RenderTree._serializeItem (<anonymous>:2199:31)
    at <anonymous>:2180:28
    at Array.forEach (<anonymous>)
    at RenderTree._serializeDict (<anonymous>:2179:25)
    at RenderTree._serializeArgs (<anonymous>:2162:21)
    at RenderTree._serializeRenderNode (<anonymous>:2147:22)
RobbieTheWagner commented 8 months ago

Since this issue is very old, I am going to close it for now. If people are still having problems, please let us know!