I’m implementing a JS service to be used by web apps. The service works well, and I can successfully call each of the commands defined in the services.json file from a web app.
However, I am facing an issue when trying to call the getSystemInfo
method of the luna://com.webos.service.tv.systemproperty
service from within one of the registered commands. When I add this call to the command function handler, the service seems to terminate immediately.
Here is the code causing the issue:
service.call("luna://com.webos.service.tv.systemproperty/getSystemInfo", {
keys: ['modelName', 'firmwareVersion', 'UHD', 'sdkVersion']
}, function (response) {
console.log(JSON.stringify(response));
});
I can see logs before this call, which confirms that the service is created and handles the command properly. However, as soon as service.call
is executed, the service terminates unexpectedly, and I can no longer see it running. If I remove the call, the service continues running normally (since it has an active subscription).
My question is: Is there any restriction on calling the systemproperty
service from a JS service?
When I call the same service directly from a web app (as shown in this example: webOS TV Device Information), it works without any issues.