Application that accesses global Ember fails to start after browser refresh
See original GitHub issueDescribe the bug
If an Ember application accesses the global Ember
and the ember-inspector plugin is active, then the application fails to start after a browser refresh.
To Reproduce
- start the application refresh-inspector. This is a simple application that renders the global
Ember.VERSION
- visit the application with chrome
- open the ember-inspector
- refresh the browser
- stacktrace in the console and nothing is rendered:
lazy_load.js:75 Uncaught RangeError: Maximum call stack size exceeded.
at runLoadHooks (lazy_load.js:75)
at Module.callback (index.js:520)
at Module.exports (loader.js:106)
at requireModule (loader.js:27)
at r (loader.js:176)
at get (index.js:10)
at get (index.js:41)
at <anonymous>:9649:7
at runLoadHooks (lazy_load.js:75)
at Module.callback (index.js:520)
Expected behavior The application should render successfully
Environment ember=3.27.5 (there is no problem with 3.26) chrome=91.0.4472.106 os=macos 11.4
Additional context We still need some addons that access the global Ember, so this is for us a nasty bug
Issue Analytics
- State:
- Created 2 years ago
- Reactions:16
- Comments:10 (5 by maintainers)
Top Results From Across the Web
ember serve and browser reload results in "cannot GET /foo ...
Ember built-in server looks at the environment.js locationType property to figure out if it must serve routes after the rootURL path.
Read more >Cannot read properties of undefined (reading '_application ...
Open an Ember app in the browser. Open Ember Inspector. Refresh the browser tab. Expected behavior. The app is working, Ember Inspector is ......
Read more >[Solved]-Ember service is lost on reload-ember.js
You are trying to get the app state to persist on the client's browser, even after a page refresh. I think you should...
Read more >Routing in Ember - Learn web development | MDN
Typically, when writing web applications, you want the page to be represented by the URL so that if (for any reason), the page...
Read more >Ember.js Tutorial – using Ember CLI - AirPair
In this tutorial, he walks through building an API-driven Ember.js app using ember-cli ... Save and reload the page — if you get...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Just in case anyone wondering what’s causing this. I had a look and the issue appears to be line linked below. For whatever reason, Ember.EmberInspectorDebugger is no longer available in the onApplicationStart function. I was able to fix it locally by adding
Ember.EmberInspectorDebugger = requireModule('ember-debug/main')['default'];
within the function however that’s really isn’t the most ideal solution worthy of a pull request.https://github.com/emberjs/ember-inspector/blob/aba7da68e9e8461a308f3d02799cf133c3df975a/ember_debug/vendor/startup-wrapper.js#L75
I think this can be closed as a duplicate of https://github.com/emberjs/ember-inspector/issues/1758 (younger, but already a PR connected to that issue)