question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Application that accesses global Ember fails to start after browser refresh

See original GitHub issue

Describe 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

  1. start the application refresh-inspector. This is a simple application that renders the global Ember.VERSION
  2. visit the application with chrome
  3. open the ember-inspector
  4. refresh the browser
  5. 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:closed
  • Created 2 years ago
  • Reactions:16
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
tbencommented, Sep 17, 2021

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

0reactions
sandstromcommented, Oct 22, 2021

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)

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found