-
Notifications
You must be signed in to change notification settings - Fork 20
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
Update message when WASM returns an error and allow user to restart the server #753
Conversation
…ing the this.server var
…lready terminated
…he user can start the server again
error instanceof Error && | ||
error.message.includes( '"unreachable" WASM instruction executed' ) | ||
) { | ||
throw new Error( 'Please try disabling plugins and themes that might be causing the issue.' ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could translate the error message here with __
, but we probably prefer to log, and capture in Sentry all the messages in English.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we move the Sentry call here, too, so we would log it before we rethrow the exception?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
try { | ||
await server.start(); | ||
} catch ( error ) { | ||
if ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. In the future, we could handle other exceptions there with custom messages, or maybe remove the condition and use unified message for all case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed. I thought about overwriting all the errors, but I prefer to make the distinction in case we found any other error now or in the future after a dependency update.
Related issues
Proposed Changes
"unreachable" WASM instruction executed
Before this PR, when a site crashed, it got unresponsive, and users couldn't re-try starting it again.
The reason is that the server child process failed and didn't resolve or rejected a promise when stopping the site, which let the main thread waiting for messages. This was fixed on : a4afa34
Testing Instructions
npm start
Before
After
Pre-merge Checklist