Results 1 to 8 of 8
Like Tree1Likes
  • 1 Post By bhutten
  1.    #1  

    I'm trying to write a simple app using a self made JSJSJS $service$. $So$ $I$ $call$:

    this.controller.serviceRequest("palm://com.palm.mojoservicetest.service", {
    method : "echo",
    parameters : { "message" : "Echo this!" },

    But I get the error below. It's driving me nuts, but I cannot find what I'm doing wrong here.
    This error does not make any sense to me:

    "message":"palm://com.palm.activitymanager/monitor {"activityId":121,"subscribe":true}: Not permitted to send to com.palm.activitymanager.",
    "stack":"Error: palm://com.palm.activitymanager/monitor {"activityId":121,"subscribe":true}: Not permitted to send to com.palm.activitymanager.
    at Object.create (/usr/palm/frameworks/foundations/version/1.0/javascript/structure/err.jsjsjs:$5$:$17$)
    at /usr/palm/frameworks/foundations/version/1.0/javascript/comms/palmcall.jsjsjs:$158$:$16$
    at Future.<anonymous> (/usr/palm/frameworks/foundations/version/1.0/javascript/control/future.jsjsjs:$228$:$17$)
    at Timer.dispatch [as callback] (/usr/palm/frameworks/foundations/version/1.0/javascript/control/queue.jsjsjs:$72$:$16$)
    at /usr/palm/nodejs/fork_server.jsjsjs:$201$:$10$
    at ChildProcess.fork (child_process:8:245)
    at Object.fork (child_process:1:434)
    at /usr/palm/nodejs/fork_server.jsjsjs:$246$:$32$
    at Object.parseMessage (/usr/palm/nodejs/fork_server.jsjsjs:$68$:$5$)
    at Stream.<anonymous> (/usr/palm/nodejs/fork_server.jsjsjs:$445$:$18$)&$quot$;,
    "response": {
    "errorText":"Not permitted to send to com.palm.activitymanager."

    Can anobody help me on this?
  2. #2  
    I have never written a service myself, only looked at some for the purpose of patching them, so I have little to offer outside of ideas. I looked at the code and it seems simple enough to create your own simple service and call it - and the calling code looks pretty much exactly like yours. I packaged up the BasicService example from the SDK (on Windows it's under C:\Program Files (x86)\HP webOS\SDK\share\samplecode\mojo\BasicService) and installed it, and it works correctly on the emulator and on my Pre2. I would probably start by comparing that sample app to yours and see if anything jumps out. Are your app and service packaged and installed separately? Is your service method set to public in services.json? (I would expect that only to be necessary for other apps to use your service, but if you are installing your service separately from your app, I can see needing that set to true).

    From the stack trace, it appears the error is occurring in the service. Is it attempting to set an interval to be invoked again?
    Last edited by Grabber5.0; 05/26/2015 at 01:08 AM.
  3.    #3  
    Finally! I found the problem.
    I used the app id [com.palm.mojoservicetest.service]. But somehow the prefix [com.palm] seems reserved. When using a different prefix (like [com.palmdts] which is used in many sample apps) it works.
    This took me days to find out....

    Thanks Grabber5.0 for your reply, it feels good that there are still active developers for webOS.
    Preemptive likes this.
  4. #4  
    Glad you found it. The com.palm prefix is not a problem for apps, I wonder what the problem with services is? I've had to use com.palm on an app to be able to access the private bus reserved for system apps. As long as you don't need to do that, changing the package id is the right approach.
  5. #5  
    Quote Originally Posted by bhutten View Post
    Thanks Grabber5.0 for your reply, it feels good that there are still active developers for webOS.
    Including you!

    What are you making?
  6.    #6  
    Quote Originally Posted by Preemptive View Post
    Including you!

    What are you making?
    Just fiddling around with MojoWhatsup and try to convert from plugin to JSJSJS $service$.
  7. #7  
    Quote Originally Posted by bhutten View Post
    Just fiddling around with MojoWhatsup and try to convert from plugin to JSJSJS $service$.
    You've seen EricBlade's work on NodeWA? This worked quite OK in the messaging app until WhatsApp started to do their long overdue security overhaul :P

    -- Sent from my Palm Veer using Forums
    HP Veer (daily driver), HP Pre 3, HP Touchpad Proper 4G/LTE (Sierra MC7710), HP Touchpad 32GB WiFi, Palm Pre 2
  8. #8  
    com.palm prefix has the right to send on private bus... but it requires some more config files that palm-package does not generate. If you don't need access to "forbidden" stuff, then do not use com.palm prefix. :-)

    Good luck with your project. And I really recommend looking into the synergy messaging skeleton that eblade has on github:
    (and of course this: maybe you can use some of that).
    But of course only if you want to make a synergy service, i.e. want to include it into the system messaging app... maybe that is not what you want. Not sure if it supports everything fancy that whatsapp can do (not sure what it really can do. In theory messaging system can support group messages, for example).

Similar Threads

  1. Replies: 2
    Last Post: 08/13/2011, 01:11 AM
  2. Problem with homebrew services on gms Palm Pre Plus
    By Gravesent in forum Palm Pre and Pre Plus
    Replies: 4
    Last Post: 04/26/2011, 03:20 PM
  3. New Location Services Problem
    By TomD in forum webOS Discussion Lounge
    Replies: 0
    Last Post: 03/24/2011, 10:16 PM
  4. Goodlink problem on downloading services
    By svieira in forum Palm OS Devices & Apps
    Replies: 4
    Last Post: 05/09/2007, 02:17 PM
  5. Replies: 2
    Last Post: 10/02/2004, 10:38 AM

Posting Permissions