ember-inspector: Uncaught TypeError: Cannot destructure property 'A' of '_ember.default' as it is undefined.
Describe the bug
Exception in console: Uncaught TypeError: Cannot destructure property 'A' of '_ember.default' as it is undefined.
From time to time Ember also said that this is not an Ember application. I suppose because of this is error.
With more loaded application (tailwind, ember-cli-mirage, some components, some routes, some models and so on) it starts failing more often. When I did mirage mockups, and gives this error in 50-60% of refreshes.
To Reproduce
- Install ember-cli 3.26.1, and ember-inspector 4.4.0 in Google Chrome browser
- Create new project and start it:
mkdir tmp-dir; cd tmp-dir; ember init; npm start - Open http://127.0.0.1:4200/ and manually add some non-existent url like http://127.0.0.1:4200/some/url
- Open chrome inspector dev tools (F12)
- Open console
- Now spam Ctrl-R to refresh page. After time to time there will be exception:
VM4178:61 Uncaught TypeError: Cannot destructure property 'A' of '_ember.default' as it is undefined.
at <anonymous>:61:5
at requireModule (<anonymous>:42:28)
at requireModule (<anonymous>:38:24)
at <anonymous>:9574:62
at triggerOnce (<anonymous>:9642:7)
at runLoadHooks (lazy_load.js:75)
at index.js:588
at internalRequire (loader.js:54)
at require (loader.js:87)
at rsvp.js:2493
Research showed that it points to this line: https://github.com/emberjs/ember-inspector/blob/master/ember_debug/adapters/basic.js#L3 Ember object here could be undefined.
Expected behavior No exception
Environment ember 3.26.1 node-inspector 4.4.0 google chrome 90.0.4430.212
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 10
- Comments: 17 (6 by maintainers)
We just tagged v4.4.1 with a fix (though there may need to be more fixes to follow).
ijbpeeflkojiljfgfdkhbajcombijegb
I believe that version is now published to the chrome store.
Happening to my team also, just today. Does not happen to a teammate that is still on 4.3.5.
This should be fixed as of 4.4.1. If anyone is on 4.4.1 and still seeing this, please let us know!
The best options as of now are:
There’s a fairly active conversation going on in Ember Discord > dev-ember-inspector.
@dirkdirk I putzed around on this a bit this morning. I resolved it by making a few changes to the instructions on the readme:
git checkout tags/v4.3.5yarn installyarn global add ember-cliyarn buildto build thedistdirectorychrome://extensionsin ChromeDeveloper modeis checkeddist/chromefolder in the cloned repoI hope that helps