NotificationService does not process serviceId correctly (probably other luna-next services affected, too) (Bug #1007)


Added by Achim Königs almost 2 years ago. Updated almost 2 years ago.


Status:Closed Start date:11/01/2015
Priority:Normal Due date:
Assignee:Herman van Hazendonk % Done:

100%

Category:System Services
Target version:Marocchino

Description

Can be easily reproduced using luna-send calls.

This call works:
luna-send -n 1 -a "org.webosports.service.messaging" palm://org.webosports.notifications/create '{"ownerId":"org.webosports.service.messaging","launchId":"org.webosports.app.messaging","launchParams":{"threadId":"JYTeyV67OR3"},"title":"+461234567890","message":"Message Text6","iconUrl":"file:///usr/palm/applications/org.webosports.app.messaging/icon.png","expiresTimeout":5}'

In NotificationService.qml this message object arrives: (see applicationId is set) {"objectName":"","payload":"{\"ownerId\":\"org.webosports.service.messaging\",\"launchId\":\"org.webosports.app.messaging\",\"launchParams\":{\"threadId\":\"JYTeyV67OR3\"},\"title\":\"+461234567890\",\"message\":\"Message Text6\",\"iconUrl\":\"file:///usr/palm/applications/org.webosports.app.messaging/icon.png\",\"expiresTimeout\":5}","applicationId":"org.webosports.service.messaging"}

If we do not want to set the applicationId but a serviceId (as node.js services would do) we have to use the -m switch, like in this luna-send call:
luna-send -n 1 -m "org.webosports.service.messaging" palm://org.webosports.notifications/create '{"ownerId":"org.webosports.service.messaging","launchId":"org.webosports.app.messaging","launchParams":{"threadId":"JYTeyV67OR3"},"title":"+461234567890","message":"Message Text6","iconUrl":"file:///usr/palm/applications/org.webosports.app.messaging/icon.png","expiresTimeout":5}'

In NotificationService.qml this message object arrives: (see no serviceId is set!) {"objectName":"","payload":"{\"ownerId\":\"org.webosports.service.messaging\",\"launchId\":\"org.webosports.app.messaging\",\"launchParams\":{\"threadId\":\"JYTeyV67OR3\"},\"title\":\"+461234567890\",\"message\":\"Message Text6\",\"iconUrl\":\"file:///usr/palm/applications/org.webosports.app.messaging/icon.png\",\"expiresTimeout\":5}","applicationId":""}

Not sure where serviceId goes missing... but serviceId works for old "Palm" services. But probably more QML based services are affected by this and can not be used by node.js services for this reason. The error message returned to a node.js service / luna-send -m currently is (parameters are identical to second luna-send call): {"errorCode":-1,"response":{"errorMessage":"Error: an application id or a service id must be set on the notification message.","returnValue":false}}


History

Updated by Achim Königs almost 2 years ago

Maybe nicer formating in bpaste: https://bpaste.net/show/c1ff72fc4f6b

Updated by Herman van Hazendonk almost 2 years ago

  • Target version set to Marocchino
  • % Done changed from 0 to 100
  • Assignee set to Herman van Hazendonk
  • Category set to System Services
  • Status changed from New to Feedback

Updated by Achim Königs almost 2 years ago

Ok, works for me, now. Had some minor issues with the parameters still ( fixed in https://github.com/webOS-ports/org.webosports.messaging/pull/32 ).

  • Status changed from Feedback to Closed

Also available in: Atom PDF