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

  1. Install ember-cli 3.26.1, and ember-inspector 4.4.0 in Google Chrome browser
  2. Create new project and start it: mkdir tmp-dir; cd tmp-dir; ember init; npm start
  3. Open http://127.0.0.1:4200/ and manually add some non-existent url like http://127.0.0.1:4200/some/url
  4. Open chrome inspector dev tools (F12)
  5. Open console
  6. 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)

Commits related to this issue

Most upvoted comments

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!

Happening to me also from today. How to solve it please anyone help.

The best options as of now are:

  1. Turn off the Chrome Ember Inspector extension.
  2. Uninstall the Chrome Ember Inspector extension.
  3. Downgrade following jayvarner’s directions above.

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:

  • Remove the Ember Inspector extension from Chrome
  • Clone the repository
  • cd into the repo directory
  • switch to the 4.3.5 tag by running git checkout tags/v4.3.5
  • run yarn install
  • run yarn global add ember-cli
  • run yarn build to build the dist directory
  • Visit chrome://extensions in Chrome
  • Make sure Developer mode is checked
  • Click on ‘Load unpacked extension…’
  • Choose the dist/chrome folder in the cloned repo
  • Close and re-open developer tools if it’s already open

I hope that helps