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

Nested worker threads fail to produce meaningful error messages #34309

Closed
micon4sure opened this issue Jul 11, 2020 · 0 comments
Closed

Nested worker threads fail to produce meaningful error messages #34309

micon4sure opened this issue Jul 11, 2020 · 0 comments
Labels
worker Issues and PRs related to Worker support.

Comments

@micon4sure
Copy link

micon4sure commented Jul 11, 2020

  • Version: v12.16.1
  • Platform: linux x64
  • Subsystem:

What steps will reproduce the bug?

Create a project with nested worker threads and throw an error in the nested thread.

( https://github.com/teh-mICON/ts_worker_error has this setup, ignore .ts files. )

How often does it reproduce? Is there a required condition?

Always.

What is the expected behavior?

Show proper error message

What do you see instead?

Error [ERR_UNHANDLED_ERROR]: Unhandled error. ({})

Additional information

@addaleax addaleax added the worker Issues and PRs related to Worker support. label Jul 11, 2020
addaleax added a commit to addaleax/node that referenced this issue Jul 11, 2020
We are using `ObjectPrototypeToString()` as a cross-context brand check
for built-in errors, but weren’t making sure to set that when
deserializing errors back into JS objects.

Fix that by setting `[Symbol.toStringTag]` manually, to make sure that
multiple serialize-and-deserialize cycles keep giving the same result.

Fixes: nodejs#34309
MylesBorins pushed a commit that referenced this issue Jul 14, 2020
We are using `ObjectPrototypeToString()` as a cross-context brand check
for built-in errors, but weren’t making sure to set that when
deserializing errors back into JS objects.

Fix that by setting `[Symbol.toStringTag]` manually, to make sure that
multiple serialize-and-deserialize cycles keep giving the same result.

Fixes: #34309

PR-URL: #34310
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
MylesBorins pushed a commit that referenced this issue Jul 16, 2020
We are using `ObjectPrototypeToString()` as a cross-context brand check
for built-in errors, but weren’t making sure to set that when
deserializing errors back into JS objects.

Fix that by setting `[Symbol.toStringTag]` manually, to make sure that
multiple serialize-and-deserialize cycles keep giving the same result.

Fixes: #34309

PR-URL: #34310
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
cjihrig pushed a commit that referenced this issue Jul 23, 2020
We are using `ObjectPrototypeToString()` as a cross-context brand check
for built-in errors, but weren’t making sure to set that when
deserializing errors back into JS objects.

Fix that by setting `[Symbol.toStringTag]` manually, to make sure that
multiple serialize-and-deserialize cycles keep giving the same result.

Fixes: #34309

PR-URL: #34310
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
addaleax added a commit that referenced this issue Sep 22, 2020
We are using `ObjectPrototypeToString()` as a cross-context brand check
for built-in errors, but weren’t making sure to set that when
deserializing errors back into JS objects.

Fix that by setting `[Symbol.toStringTag]` manually, to make sure that
multiple serialize-and-deserialize cycles keep giving the same result.

Fixes: #34309

PR-URL: #34310
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
addaleax added a commit that referenced this issue Sep 22, 2020
We are using `ObjectPrototypeToString()` as a cross-context brand check
for built-in errors, but weren’t making sure to set that when
deserializing errors back into JS objects.

Fix that by setting `[Symbol.toStringTag]` manually, to make sure that
multiple serialize-and-deserialize cycles keep giving the same result.

Fixes: #34309

PR-URL: #34310
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
worker Issues and PRs related to Worker support.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants