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
The autoExitHook method of the IPCTransport class calls an undocumented method of the node.js process class, namely _getActiveHandles.
This method does not exist in the process class of Deno 2, and so causes a crash when running under that environment.
I note that this isn't the only place in the @pm2/io code where this undocumented method is used; However, in the other instance, there is a safety check to ensure that this undocumented method exists before calling it.
See the init method of EventLoopHandlesRequestsMetric, where the following safety check is made before calling the undocumented method:
As a quick-fix (without admittedly understanding the significance of autoExitHook), I would suggest adding a similar safety check to the autoExitHook method so as to not cause crashes in Deno 2. In the worst case, this change would result in a less severe bug when running under Deno 2.
The text was updated successfully, but these errors were encountered:
mikuso
added a commit
to mikuso/pm2-io-apm
that referenced
this issue
Nov 28, 2024
The
autoExitHook
method of theIPCTransport
class calls an undocumented method of the node.jsprocess
class, namely_getActiveHandles
.This method does not exist in the process class of Deno 2, and so causes a crash when running under that environment.
I note that this isn't the only place in the @pm2/io code where this undocumented method is used; However, in the other instance, there is a safety check to ensure that this undocumented method exists before calling it.
See the
init
method ofEventLoopHandlesRequestsMetric
, where the following safety check is made before calling the undocumented method:As a quick-fix (without admittedly understanding the significance of autoExitHook), I would suggest adding a similar safety check to the
autoExitHook
method so as to not cause crashes in Deno 2. In the worst case, this change would result in a less severe bug when running under Deno 2.The text was updated successfully, but these errors were encountered: