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

App Switcher breaks inspector

Open nummi opened this issue 6 years ago • 12 comments

image

Error in event handler: Error: Assertion Failed: You attempted to remove a function listener which did not exist on the instance, which means you may have attempted to remove it before it was added.

The entire Inspector turns into a white screen.

Seems to be coming from this line: https://github.com/emberjs/ember-inspector/blob/master/app/routes/app-detected.js#L52

I believe updating to 3.11 is the culprit. This PR causes the error: https://github.com/emberjs/ember-inspector/pull/1000

nummi avatar Sep 25 '19 06:09 nummi

I think this may be fixed in https://github.com/emberjs/ember-inspector/pull/1103/files (specifically this), @nummi any chance you can re-test? (no rush)

chancancode avatar Dec 18 '19 21:12 chancancode

@chancancode, it's getting better: no empty white screen. Unfortunately Inspector doesn't switch apps and now I'm getting this error:

VM129:9027 Uncaught TypeError: Cannot read property '__deprecatedInstance__' of undefined
    at <anonymous>:9027:46
    at <anonymous>:138:9
    at Array.forEach (<anonymous>)
    at Class._messageReceived (<anonymous>:137:30)
    at <anonymous>:378:16
    at Backburner._run (backburner.js:1010)
    at Backburner.run (backburner.js:751)
    at run (index.js:122)
    at MessagePort.<anonymous> (<anonymous>:377:9)

Here's the test app I've been using: https://github.com/nummi/inspector-test

It embeds the deprecation app in an iframe.

nummi avatar Dec 19 '19 00:12 nummi

Thanks! I’ll take a look!

chancancode avatar Dec 19 '19 00:12 chancancode

@chancancode is this still an issue?

RobbieTheWagner avatar Dec 19 '19 21:12 RobbieTheWagner

Yes

chancancode avatar Dec 19 '19 21:12 chancancode

I haven’t had a chance to look into how it’s supposed to work with iframes yet, but it doesn’t work properly. It may be the case that switching between two apps on the same page and on the same frame works but switching between iframes doesn’t.

chancancode avatar Dec 19 '19 21:12 chancancode

@chancancode was changing the app picker a requirement of the new render node stuff? If not, maybe we can change it back?

RobbieTheWagner avatar Dec 20 '19 01:12 RobbieTheWagner

It was already broken before my change. This issue predated my changes. My change made it crash less badly, but it still doesn’t work.

chancancode avatar Dec 20 '19 02:12 chancancode

@chancancode are you sure? It worked the last time @nummi and I tried it, but we don't try it often.

RobbieTheWagner avatar Dec 20 '19 13:12 RobbieTheWagner

The issue is from September and the description mentioned:

I believe updating to 3.11 is the culprit. This PR causes the error: #1000

But yes I also confirmed it locally. I can try to figure this out but probably have a few other things to look into before getting to this. I also find that the inspector's detection of apps on the current page could be pretty spotty and timing dependent, so probably going to try and fix that as well.

chancancode avatar Dec 20 '19 16:12 chancancode

@chancancode sorry, you are correct, it's been a long couple of weeks 😅

RobbieTheWagner avatar Dec 20 '19 17:12 RobbieTheWagner

No problem! Same 😄

chancancode avatar Dec 20 '19 17:12 chancancode

should be fixed by https://github.com/emberjs/ember-inspector/pull/2157

patricklx avatar Oct 04 '22 07:10 patricklx