Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUGFIX lts] Cleans up the DebugRenderTree more thoroughly on errors #19199

Merged
merged 1 commit into from
Oct 22, 2020

Conversation

pzuraq
Copy link
Contributor

@pzuraq pzuraq commented Oct 15, 2020

The DebugRenderTree is currently left in a bad state after an error
occurs during render. Specifically, if an error occurs and we call
capture on the tree, it will throw errors because the state hasn't
been setup correctly. In real world development, this can happen
whenever the Ember Inspector is open and an app has errored, as the
inspector polls regardless of the state of the app and doesn't take
error state into account. This results in a follow on error to the
original error, which is confusing and can make it more difficult to
debug.

Screen Shot 2020-10-14 at 6 50 11 PM

This can be reproduced using this repo and following
these steps:

  1. Open the app
  2. Open the Ember Inspector
  3. Click the To View link

This fixes the issue by removing the affected root altogether, so that
it will not attempt to capture in the first place.

The DebugRenderTree is currently left in a bad state after an error
occurs during render. Specifically, if an error occurs and we call
`capture` on the tree, it will throw errors because the state hasn't
been setup correctly. In real world development, this can happen
whenever the Ember Inspector is open and an app has errored, as the
inspector polls regardless of the state of the app and doesn't take
error state into account. This results in a follow on error to the
original error, which is confusing and can make it more difficult to
debug.

This fixes the issue by removing the affected root altogether, so that
it will not attempt to capture in the first place.
@pzuraq pzuraq force-pushed the bugfix/clean-up-debug-render-tree-more-thoroughly branch from 64902de to e1b803e Compare October 15, 2020 02:00
@rwjblue rwjblue merged commit 4c494c1 into master Oct 22, 2020
@rwjblue rwjblue deleted the bugfix/clean-up-debug-render-tree-more-thoroughly branch October 22, 2020 20:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants