Closed nunoguedelha closed 1 year ago
yarp connect /icubSim/inertial /yarpjs/inertial:i
the problem persists.
icubtelemetry.processOrDropYarpData[i]
are still inactive, i.e. set to the dummy value (id,data) => {}
.ICubTelemetry.prototype.connectTelemSrcToNotifier(id)
was never called for any of the ports.connectPortsAndStartNotifier
isn't called either.ConfigHandler.prototype.matchRegexpYarpPortNames
or some processing scheduled there never ends.yarp name list
https://github.com/ami-iit/yarp-openmct/blob/45035b8cda4af25310d1f352196da692f9912e5e/common/yarpNameListHandler.js#L17
fails in
https://github.com/ami-iit/yarp-openmct/blob/45035b8cda4af25310d1f352196da692f9912e5e/common/yarpNameListHandler.js#L28
Causing the error message Error: spawn yarp ENOENT
and the warning UnhandledPromiseRejectionWarning
mentioned in the issue description. Actually we had missed the handling of this error, which would directly reveal the source of the error to be at this point..catch
in order to handle .reject
or thrown errors[^1]..catch
, an eventual subsequent .then()
is treated normally as if there was no error..catch
exactly where we wish to handle the error, and rethrow errors we cannot handle..catch
can be placed at the end of a sequence of cascaded .then
to catch any error which occurred in between, which was the approach used in
https://github.com/ami-iit/yarp-openmct/blob/f1508ad77d95f10b70abeb312ba96b0196383f1b/iCubTelemVizServer/iCubTelemVizServer.js#L111-L113unhandledrejection
event handler or alert
in order to inform the user.[^1]: If an error is not handled, a UnhandledPromiseRejectionWarning
warning is thrown.
spawn yarp ENOENT
ocurs when the executable or command in question (here yarp
) is not found in the working folder. yarp
should be found from anywhere, unless the environment of the child process was corrupted. That environment is by default inherited from the parent, but we can always do:
spawn('<command_executable>', ['command_param_1', 'command_param_2'],{
env: {
PATH: process.env.PATH
}
});
The issue was occuring on Webstorm. Running once from the terminal with npm start
worked without issues, after which the issue was no more reproducible from Webstorm.
When testing a previously working commit 45035b8 on
main
branch, the plots usually displaying the samples received on the visualiser are not displaying anything, although the plot view is flowing forward (Local Clock
selected instead ofFixed Timespan
).How to Reproduce
http:<your-machine-IP-address>:8080
,Fixed Timespan
toLocal Clock
,Error Log
We also get a warning on the process console:
...related to a spawned YARP command, probably the
yarp name list
.