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

Recover IDE from runtime exceptions in renderer process #2074

Merged
merged 4 commits into from
Jan 18, 2021

Conversation

brusherru
Copy link
Contributor

@brusherru brusherru commented Dec 8, 2020

It closes #1476


It does not catch any exceptions. However, if some error crashes the GUI, the <Catcher> component will catch the exception, recover the state of the IDE to the previous stable state and show the report, which might be shared with the developers on GitHub or XOD forum.

The report includes:

  • error message with stack trace,
  • component stack,
  • last three dispatched actions with the message did the last action broke the IDE or not,
  • the stable state, where the tokens (user grant and project API token) are replaced with the string SECRET

To test this PR you can check it out and then broke something. For example:


This PR also could introduce some bugs in the IDE behavior after being recovered (because of reconstructing <App> and its children, so their state will be lost, and they should resubscribe on DOM and IPC events and so on), so I'll be glad if you find something and report it here.
Anyway, I'm sure it's better to get a recovered state and possibility to save the project, then just get a crashed IDE. :)

Copy link
Member

@nkrkv nkrkv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 LGTM

@brusherru brusherru force-pushed the feat-1476-ide-recover branch 4 times, most recently from 5675c31 to d021a22 Compare December 23, 2020 16:22
@brusherru brusherru force-pushed the feat-1476-ide-recover branch 2 times, most recently from d05ff3e to 02ac662 Compare January 18, 2021 10:49
Copy link
Contributor

@evgenykochetkov evgenykochetkov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The overall user experience is very cool 👍🏻
I have some doubts about a couple of messages, but I might be wrong.

packages/xod-client/src/core/containers/Catcher.jsx Outdated Show resolved Hide resolved
packages/xod-client/src/core/containers/Catcher.jsx Outdated Show resolved Hide resolved
@brusherru brusherru merged commit 7bfd33f into master Jan 18, 2021
@brusherru brusherru deleted the feat-1476-ide-recover branch January 18, 2021 13:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Provide user a possibility to recover from runtime exceptions
3 participants