trace: The dreaded "throwing after await"
This might be completely expected, Iām not completely up-to-date on the state of node.js, but:
Repro steps
git clone https://github.com/fasterthanlime/async-test && cd async-test
npm i
npm start
Versions
$ node --version
v8.0.0
$ npm list
async-test@1.0.0 C:\msys64\home\amwenger\Dev\async-test
`-- trace@3.0.0
`-- stack-chain@1.3.7
Output
=================================
Throwing first thing
=================================
Full stack trace:
Error: throwing first thing
at cherrypie (C:\msys64\home\amwenger\Dev\async-test\index.js:12:13)
at binomial (C:\msys64\home\amwenger\Dev\async-test\index.js:14:40)
at abacus (C:\msys64\home\amwenger\Dev\async-test\index.js:15:38)
at main (C:\msys64\home\amwenger\Dev\async-test\index.js:16:22)
at Object.<anonymous> (C:\msys64\home\amwenger\Dev\async-test\index.js:34:1)
at Module._compile (module.js:569:30)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:503:32)
at tryModuleLoad (module.js:466:12)
at Function.Module._load (module.js:458:3)
at Function.Module.runMain (module.js:605:10)
at startup (bootstrap_node.js:158:16)
at bootstrap_node.js:575:3
at <anonymous>
at checkStack (C:\msys64\home\amwenger\Dev\async-test\index.js:38:5)
at main (C:\msys64\home\amwenger\Dev\async-test\index.js:16:11)
at Object.<anonymous> (C:\msys64\home\amwenger\Dev\async-test\index.js:34:1)
at Module._compile (module.js:569:30)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:503:32)
at tryModuleLoad (module.js:466:12)
at Function.Module._load (module.js:458:3)
at Function.Module.runMain (module.js:605:10)
at startup (bootstrap_node.js:158:16)
at bootstrap_node.js:575:3
=================================
Throwing after await
=================================
Full stack trace:
Error: after timeout
at cherrypie (C:\msys64\home\amwenger\Dev\async-test\index.js:26:13)
at <anonymous>
at <anonymous>
at checkStack (C:\msys64\home\amwenger\Dev\async-test\index.js:38:5)
at main (C:\msys64\home\amwenger\Dev\async-test\index.js:30:11)
at <anonymous>
at runMicrotasksCallback (internal/process/next_tick.js:86:5)
at _combinedTickCallback (internal/process/next_tick.js:95:7)
at process._tickCallback (internal/process/next_tick.js:161:9)
at Function.Module.runMain (module.js:607:11)
at startup (bootstrap_node.js:158:16)
at bootstrap_node.js:575:3
didn't see abacus, bailing
Expected output
In the second trace, something like:
<snip>
Error: after timeout
at cherrypie (C:\msys64\home\amwenger\Dev\async-test\index.js:26:13)
at binomial (path:line)
at abacus (path:line)
<snip>
About this issue
- Original URL
- State: open
- Created 7 years ago
- Reactions: 2
- Comments: 19 (10 by maintainers)
They have subtle differences in the standard too. It is about how many rounds the microtask queue take.
Promise.resolve(1).then((val) => Promise.resolve(val)).then(...)
results in the same asPromise.resolve(1).then(...)
but they behave slightly differently.I know, but that was an issue I understood š