You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 20, 2023. It is now read-only.
But UnhandledPromiseRejectionWarning was received, indicating the error thrown from callback was wrapped in promise chain and the node process was not terminated as expected. After debugging, I found the following code triggered the warning.
Error thrown in cb was wrapped in this.finalizeRelease promise chain. Would you mind calling the cb in setTimeout method to throw out the possible error from promise chain, like:
In order to end the node process, you could also call process.exit(1).
Putting this in a timeout would simply create a globally unhandled exception in Node, which is in no way better than an unhandled promise rejection (except for different console output).
You should probably consider a mechanism other than throwing to end the compilation. Also note that by the time this happens, a release has already been created on Sentry (and thus symbols uploaded), which might be confusing if your process dies afterwards.
@jan-auer We have to exit the process since the failure of some other plugins or procedures may cause problems in our web app. But still many thx. I understand what you mean.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hi. Now I need to throw the error, which sometimes occurs in webpack compiler's callback, to terminate the node process.
But
UnhandledPromiseRejectionWarning
was received, indicating the error thrown from callback was wrapped in promise chain and the node process was not terminated as expected. After debugging, I found the following code triggered the warning.Error thrown in
cb
was wrapped inthis.finalizeRelease
promise chain. Would you mind calling thecb
insetTimeout
method to throw out the possible error from promise chain, like:many thanks
The text was updated successfully, but these errors were encountered: