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
$ yarn start
============================== step_1 ==============================
Error
at Object.next (file:///C:/Projects/rxjs-bug-report-0/src/main.js:13:25)
# .....
at file:///C:/Projects/rxjs-bug-report-0/src/main.js:25:1
at ModuleJob.run (node:internal/modules/esm/module_job:218:25)
at async ModuleLoader.import (node:internal/modules/esm/loader:329:24)
at async loadESM (node:internal/process/esm_loader:28:7)
at async handleMainPromise (node:internal/modules/run_main:113:12)
============================== step_2 ==============================
Error
at Object.next (file:///C:/Projects/rxjs-bug-report-0/src/main.js:18:25)
# lost stack trace
finish
Expected behavior
Expect
Stacktrace must be maintained after promise is resolved.
$ yarn start
============================== step_1 ==============================
Error
at Object.next (file:///C:/Projects/rxjs-bug-report-0/src/main.js:13:25)
# .....
at file:///C:/Projects/rxjs-bug-report-0/src/main.js:25:1
at ModuleJob.run (node:internal/modules/esm/module_job:218:25)
at async ModuleLoader.import (node:internal/modules/esm/loader:329:24)
at async loadESM (node:internal/process/esm_loader:28:7)
at async handleMainPromise (node:internal/modules/run_main:113:12)
============================== step_2 ==============================
Error
at Object.next (file:///C:/Projects/rxjs-bug-report-0/src/main.js:18:25)
# .....
at file:///C:/Projects/rxjs-bug-report-0/src/main.js:25:1
at ModuleJob.run (node:internal/modules/esm/module_job:218:25)
at async ModuleLoader.import (node:internal/modules/esm/loader:329:24)
at async loadESM (node:internal/process/esm_loader:28:7)
at async handleMainPromise (node:internal/modules/run_main:113:12)
finish
Everything that happens after the promise is resolved (when the microtask fires) happens synchronously in nested functions, and is no different than if you were to do something like:
And I also tried cloning your repository and checking on the same version of node. I couldn't reproduce the issue.
I would recommend that you look up "why is my stack trace missing in node?" because it seems to be a condition of errors being thrown after promise resolution in specific versions of node? Although I tried the same one and could reproduce the bug.
Regardless, this doesn't seem to have anything to do with RxJS, because we can't really control the call stack produced by new Error().stack.
Describe the bug
Lost stacktrace after promise is resolved.
Expected behavior
Expect
Stacktrace must be maintained after promise is resolved.
Reproduction code
Reproduction URL
https://github.com/ChoSeoHwan/rxjs-bug-report-0
Version
7.8.1
Environment
Additional context
No response
The text was updated successfully, but these errors were encountered: