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
david@CHE-X1:~/z/Temp/appmetrics-test $ node --require appmetrics/start index.js
[Sat Mar 14 16:15:16 2020] com.ibm.diagnostics.healthcenter.loader INFO: Node Application Metrics 5.1.1.202003141613 (Agent Core 4.0.5)
[Sat Mar 14 16:15:16 2020] com.ibm.diagnostics.healthcenter.mqtt INFO: Connecting to broker localhost:1883
Hello...
TypeError [ERR_INVALID_CALLBACK]: Callback must be a function. Received 1000
at setTimeout (timers.js:118:11)
at fallback (/mnt/c/Users/david/Temp/appmetrics-test/node_modules/async-listener/index.js:621:15)
at /mnt/c/Users/david/Temp/appmetrics-test/node_modules/async-listener/index.js:651:53
at internal/util.js:277:30
at new WrappedPromise (/mnt/c/Users/david/Temp/appmetrics-test/node_modules/async-listener/es6-wrapped-promise.js:13:18)
at internal/util.js:276:12
at main (/mnt/c/Users/david/Temp/appmetrics-test/index.js:8:9)
at Object.<anonymous> (/mnt/c/Users/david/Temp/appmetrics-test/index.js:12:1)
at Module._compile (internal/modules/cjs/loader.js:936:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:947:10)
It seems as if for some reason promisify would not respect setTimeout's custom util.promisify.custom handler in this case!
EDIT: After further testing, it seems that after including appmetrics/start, for some reason setTimeout and setImmediate are now missing the util.promisify.custom symbol property entirely! Also, confusingly, this does not happen when I do it from a node REPL.
The text was updated successfully, but these errors were encountered:
Same here for Node v13.0.1. But it's the async-listener package that's causing this since it's overriding the core Promise class with a custom one WrappedPromise.
node v12.10.0, appmetrics v5.1.1
Test case:
Result without appmetrcis:
Result with appmetrics:
It seems as if for some reason
promisify
would not respectsetTimeout
's customutil.promisify.custom
handler in this case!EDIT: After further testing, it seems that after including
appmetrics/start
, for some reasonsetTimeout
andsetImmediate
are now missing theutil.promisify.custom
symbol property entirely! Also, confusingly, this does not happen when I do it from a node REPL.The text was updated successfully, but these errors were encountered: