**** BEGIN LOGGING AT Fri Nov 28 02:59:58 2014 Nov 28 05:14:35 I have a minimal sample app which attempts to subscribe to a service: https://github.com/DougReeder/subscribe-enyo-webos Nov 28 05:15:08 Under webos 3.0.5, it works as expected, receiving updates at roughly 10s intervals indefinitly. Nov 28 05:17:11 Under Black Eye, it usally stops reciving updates after the first response. Occasionally, it receives 2 or 3 before it stops receiving. Nov 28 06:17:42 DougReeder: That might be a bug... I recall reading a similar bug from Garfonso in the bug tracker if I'm correct Nov 28 06:18:02 Oh, can you give me something to search for? Nov 28 06:19:31 Searching for “subscrib” doesn’t find anything like that. Nov 28 06:21:31 Is there a way to search issues by reporter? Nov 28 06:23:46 LEmme check Nov 28 06:25:38 A search for open issues w/ autthor Achim Koenigs doesn’t find anythng like that Nov 28 06:28:13 http://issues.webos-ports.org/issues/493 Nov 28 06:28:35 That seems closed Nov 28 06:28:40 Not sure if it's even related Nov 28 06:28:50 Anything useful in the logs you've seen? Nov 28 06:28:58 Could be something is just dying :S Nov 28 06:31:32 That’s activities, rather than subscriptions. Nov 28 06:32:49 Under Balck Eye, using ls-monitor, I see a “cancel” call beign issued soon after the initial call. Nov 28 06:33:12 I’m writing it all up now that I have two sample apps. Nov 28 06:39:53 It could be just a bug Nov 28 06:40:10 Lot's of these "more advanced" things haven't been really tested yet to be honest Nov 28 06:40:19 * DougReeder nods Nov 28 06:40:22 We've been mainly focussing on getting the OS running and improving Nov 28 06:40:35 So we're happy we have devs around who play with this and report bugs ;) Nov 28 06:48:29 Here’s the bug report: http://issues.webos-ports.org/issues/757 Nov 28 06:49:12 Here’s the other app, which uses webos-lib, to do the same thing: https://github.com/DougReeder/subscribe-webos-lib Nov 28 06:50:29 Damn, that was exhausting, working up two sample apps. But that should make it much easier to evoke the bug. Nov 28 06:54:34 morning Nov 28 06:54:55 I had not tried subscriptions, yet... so no bugreport from me. :) Nov 28 06:56:45 Well, then. Nov 28 06:57:09 I have an idea how to code around that for now, in Contacts. Nov 28 06:58:12 so db.find with watch=true does not yet work? Nov 28 06:58:41 Right. Nov 28 06:59:04 But I can issue a separate “watch” command. Nov 28 07:00:11 … or, rather, apps can’t make use of db.find with watch=true, because subscriptions don’t work. Nov 28 07:00:25 I suspect db.find with watch=true would work using luna-send. Nov 28 07:00:59 … because subscriptions work using luna-send. Nov 28 07:02:45 but that hopefully is a temporary thing, so don't make the work around to big. ;) Nov 28 07:04:41 DougReeder: It might actually be related to http://issues.webos-ports.org/issues/755 Nov 28 07:05:12 Nov 03 16:30:07 mako activitymanager847: [] [pmlog] ActivityManager SM_BOOTSTS_UPDATE_RETRY {} Subscription to System Manager failed retrying: {"errorCode":-1,"errorText":"com.palm.systemmanager is not running.","returnValue":false,"serviceName":"com.palm.systemmanager"} Nov 28 07:06:18 Dunno. "errorText":"com.palm.systemmanager is not running." Nov 28 07:06:52 Yeah could be it's not running or got killed along the way Nov 28 08:10:20 morning Nov 28 08:10:51 Morning. Late night here. :-) Nov 28 08:10:58 morphis: couldn't check the kbd last evening, I was a bit ill; but tonight should be ok :) Nov 28 08:11:39 DougReeder: yes, seems like it :) Nov 28 08:14:38 DougReeder: btw. the comparision with com.palm.wifi/findnetworks is a bit not sufficient Nov 28 08:14:48 How so? Nov 28 08:14:53 main reason is that com.palm.wifi is completely reimplemented for openwebos Nov 28 08:15:09 and it's not guranteed that new results are send every 10 seconds Nov 28 08:15:27 those should only come when something has changed Nov 28 08:15:31 Okay, but all we need for this, is that it send results repeatedly. Nov 28 08:15:42 so either a network added/removed, signal strength changed Nov 28 08:15:45 right Nov 28 08:15:55 better would be some predictable Nov 28 08:16:10 like a watch for a db8 object we then change on our own and verify we get the subscription response Nov 28 08:16:18 They key point, to my thinking, is ls-monitor shows the app issuing a cancel. Nov 28 08:16:24 hm Nov 28 08:16:33 morphis: ofono seems to behave a lot nicer now :) Nov 28 08:16:37 Herrie|Veer: :) Nov 28 08:16:43 Herrie|Veer: will fix firstuse today Nov 28 08:16:56 DougReeder: you want to look at the native code for that? Nov 28 08:17:09 I could take a look Nov 28 08:17:30 https://github.com/webOS-ports/qtwebkit/tree/webOS-ports/master/Source/WebCore/platform/webos Nov 28 08:17:45 morphis: thnx, where are these country/language combinations stored? Nov 28 08:18:12 Calling luna-send -n 5 luna://com.palm.wifi/findnetworks '{"subscribe": true}' gets repeated results, under eithere webOS or LuneOS. Nov 28 08:18:13 I always have all my OS-es in English, but when I select English my country is not in the list :P Nov 28 08:18:36 Herrie|Veer: the main difference here is that locale and region are different Nov 28 08:18:43 so you can have english - uk as locale Nov 28 08:18:49 and netherlands as region Nov 28 08:19:00 but also english -us as locale Nov 28 08:19:04 and that is what I did wrong Nov 28 08:19:16 Ah :) Nov 28 08:20:10 But I guess we have 2 bugs for this right? One the systemmanager not running and 2nd something with the language/locale/region? Nov 28 08:20:21 Does PalmServiceBridge handle JS -> PalmBus? Nov 28 08:21:51 DougReeder: yes Nov 28 08:22:03 PalmServiceBridge is the object you instantiate from Js Nov 28 08:22:12 it's behind every enyo ls2 kind Nov 28 08:22:34 that in turn uses the LunaServiceBridge to have just one connection to ls2 per app Nov 28 08:25:29 morphis: ofonod now gets started on the TP4G :) Need to confirm on N4 Nov 28 08:25:42 ok Nov 28 08:26:44 a bit strange is that m_subscribed is never read... Nov 28 08:27:18 the code mostly came as is from legacy Nov 28 08:28:10 Yes, I get the impression it’s simply not doing what it should when the subscribe flag is on. Nov 28 08:28:25 possible Nov 28 08:28:49 * DougReeder yawning “Anyway, I need to get to bed. I won’t make sense of code tonight.” Nov 28 08:29:11 the key thing is when cancel is called Nov 28 08:29:35 * DougReeder nods Nov 28 08:29:59 or it's the otherway round, it missbehaves if subscribe is off and fixed somewhere else? Like I can't see why a non subscribing call should not receive multiple responses from the PalmServiceBridge code Nov 28 08:30:12 night DougReeder :) Nov 28 08:30:12 Garfonso: right Nov 28 08:30:24 generally there is no difference between a LSCall and subscriping Nov 28 08:30:52 see https://github.com/openwebos/luna-service2/blob/master/include/public/luna-service2/lunaservice.h#L462 Nov 28 08:31:07 there are OneReply variants of LSCall which you should call when you expect just one reply Nov 28 08:31:29 otherwise LSCall will return response as long as you listen for them and don't call cancel on the token you got Nov 28 08:35:39 LunaServiceManager only calls LSCallFromApplication, never LSCallFromApplicationOneReply Nov 28 08:44:26 right Nov 28 08:44:36 but afaik the enyo kind handels the subscription case Nov 28 08:44:50 where it calls PalmServiceBridge.cancel when it didn't subscribed Nov 28 19:03:17 In PalmServiceBridge.cpp, I see that call() contains the code if (LSMESSAGE_TOKEN_INVALID == listenerToken) {ExceptionCode ec; cancel(ec);} but I can’t see where the value of listenerToken comes from. Nov 28 19:07:02 PalmServiceBridge.idl defines readonly attribute unsigned long token; Nov 28 19:08:06 and PalmServiceBridge.h defines int token(); Nov 28 19:08:58 token() just returns listenerToken, but I don’t see where listenerToken comes from. Nov 28 19:14:20 DougReeder: it comes from https://github.com/webOS-ports/qtwebkit/blob/webOS-ports/master/Source/WebCore/platform/webos/LunaServiceMgr.cpp#L243 Nov 28 19:19:01 So it’s coming from further in. Hmm, well I don’t see anything else in the source code. **** ENDING LOGGING AT Sat Nov 29 02:59:59 2014