We get "stderr: Ports refresh request not sent!" even when the request is sent successfully
nunoguedelha opened this issue · 2 comments
nunoguedelha commented
nunoguedelha commented
process.send(...)
returns a boolean, set to true if the message was sent successfully, and false otherwise. So OpenMctServerHandlerChildProc.prototype.requestPortsRefresh()
just needs to return that value.
nunoguedelha commented
Also fixed UnhandledPromiseRejectionWarning
error due to unhandled Promise rejection in
yarp-openmct/iCubTelemVizServer/configHandler.js
Lines 64 to 71 in 7957433
(node:71178) UnhandledPromiseRejectionWarning: Error: spawn yarp ENOENT
at Process.ChildProcess._handle.onexit (internal/child_process.js:269:19)
at onErrorNT (internal/child_process.js:467:16)
at processTicksAndRejections (internal/process/task_queues.js:82:21)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:71178) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:71178) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
[OPEN-MCT STATIC SERVER] stderr: Debugger listening on ws://127.0.0.1:56478/41eb7164-2760-4838-b41a-b09fcb1d0dfd
For help, see: https://nodejs.org/en/docs/inspector
- => Added a
catch
block for handling theyarp name list
failure (for instance if we have a mismatch in the Yarp dependency version). - => Handled the case where no match is found when looking for regexp port names in
yarp-openmct/iCubTelemVizServer/configHandler.js
Lines 82 to 95 in 7957433
Now, when such failure occurs, we get the error shown below, Yarp Text Logging visualiisation is not available, and the rest of the visualiser features work properly.
Failed running Yarp port names retrieval: Error: spawn yarp ENOENT./n
returning empty array of ports
Yarp port name regexp @{^\/log\/.*\[YarpJS_WholeBodyDynamics\].*$} does not match any existing ports
Yarp port name regexp @{\[walkingModule\]} does not match any existing ports