**** BEGIN LOGGING AT Thu Feb 04 02:59:59 2016 **** BEGIN LOGGING AT Thu Feb 04 04:10:39 2016 Feb 04 08:08:42 morning Feb 04 08:08:52 Good morning Feb 04 08:10:11 morning Feb 04 08:10:59 Tofe: On your _initLocale from y'day: This basically should return PalmSystem.locale in browser. For device it would load mojoservice it seems Feb 04 08:11:49 Herrie|Veer: exactly, and as com.palm.service.contacts.linker is a service (if I understood slightly what's going on) is it calling mojoservice Feb 04 08:12:23 I still have to make sure com.palm.service.contacts.linker is involved; but that would make sense, as I'm seeing this error when I change a contacts' details Feb 04 08:13:03 Tofe: I'm not sure if we have contact linker from OWO or Garfonso rewrote it. Feb 04 08:13:08 I think it's OWO Feb 04 08:15:28 I'll try to put some debug log here https://github.com/webOS-ports/mojoservice-frameworks/blob/master/mojoservice/javascript/controller_service.js#L56 Feb 04 08:15:52 but I've seen it work for other service in the logs Feb 04 08:17:11 Tofe: It could be that this somehow is a side effect of WebEngine migration. I know it's far fetched but wouldn't exclude it. I have a vbox with WebKit still here so can test something if you give me instructions. Feb 04 08:18:00 Even if it's just to exclude it :) Feb 04 08:20:34 Very, very far fetched, I would say, because I don't think WebEngine is involved at all for services :p Feb 04 08:21:00 Tofe: Ah yeah it's nodejs I guess... Feb 04 08:21:11 Could be it's always been broken Feb 04 08:21:18 We've seen more cases of that :P Feb 04 08:21:29 journalctl is full of minor things Feb 04 08:21:36 Try to tackle them one by one Feb 04 08:24:40 getPreferences was one of them Feb 04 08:30:13 One of my hypothesis was that MojoServices was not *yet* initialized; do you think it could be so? Feb 04 08:33:17 Tofe, Herrie: I rewrote contacts.linker Feb 04 08:33:38 ah, good, so you know some bits about it :) Feb 04 08:34:42 Tofe: IIRC to com.Palm.Person only the contacts linker has write access, not even the app. Feb 04 08:35:27 What is the issue with it? :) Feb 04 08:35:34 Garfonso: so I'm looking at the right place; what I'm seeing right now is that the Globalization loadable framework complains that MojoServices doesn't have any locale Feb 04 08:35:54 that happens when I modify a contact's details Feb 04 08:36:56 I've put some logs in the MojoService node.js module, and we do have globalize=true for that service; what I need to double-check is the order in which things are initialized Feb 04 08:37:06 Tofe: To me that sounds more like a luna-init issue to be honest. Feb 04 08:37:33 See luna-init repo, files/conf/defaultPreferences Feb 04 08:37:34 I... don't know exactly what luna-init does :) Feb 04 08:37:56 Tofe: It provided default values for luna-sysservice afaik Feb 04 08:38:22 It populates timezones for example Feb 04 08:38:25 Herrie|Veer: but for other services (or was it only for apps ? mmh...), Globalization says that it could retrieve the region locale Feb 04 08:38:55 Tofe: maybe that just means that the service is not globalized (which is correct) Feb 04 08:38:58 I should have pastebin'ed a journal, I can't access it now Feb 04 08:39:21 Garfonso: yes, contacts.linker is globalized Feb 04 08:39:51 let me check that, it should be on the repo Feb 04 08:41:19 https://github.com/openwebos/app-services/blob/master/com.palm.service.contacts.linker/services.json#L7 Feb 04 08:41:29 hm.. wait a minute... Feb 04 08:41:31 (if I took the correct repo) Feb 04 08:42:09 It seems I mixed up contacts linker and message linker... *blush* Feb 04 08:42:10 I didn't, but it's the same https://github.com/webOS-ports/app-services/blob/webOS-ports/master/com.palm.service.contacts.linker/services.json#L7 Feb 04 08:42:14 contacts linker is from OWO Feb 04 08:46:23 ah, I see what you are trying to investigate... hm Feb 04 08:47:17 you can try account service, it says it is globalized, too Feb 04 08:47:31 should be suficient to run accounts app. Feb 04 08:48:48 ok, for accounts service it works: Feb 03 06:31:24 qemux86 ls-hubd[365]: Globalization.Locale._initLocale: Initialization done. Locale is now en_us formats region is now us and phone region is us. Feb 04 08:51:02 Could be it's a permission issue somewhere then :s Feb 04 08:51:35 btw: to ease debugging you can just run the service from command line run-js-service /usr/palm/services/com.palm.service.contacts.linker/ Feb 04 08:51:54 (and see some more issues with contact linker?) Feb 04 08:51:57 Let me search in the mako image if I have any references to com.palm.app.contacts where we don't have the webosports one where we should Feb 04 08:55:10 Could be it's a simple permissions issue somewhere. I'll run some tools through a mako image Feb 04 08:55:22 I already fixed some of those a couple of weeks back Feb 04 08:56:06 Tofe: Are you using org.webosports.app.contact to modify a contact? I'm not 100% sure that functionality was supposed to work yet. Feb 04 08:56:18 I think I read somewhere that it's not done yet Feb 04 08:56:41 Herrie|Veer: it is an issue with initialization of the contact linker service. Feb 04 08:56:43 So that might explain your issue? You might have more luck with the com.palm.app.contacts one Feb 04 08:57:04 strange is that it works for other service (like com.palm.service.accounts) but not for contacts.linker Feb 04 09:07:00 Herrie|Veer: not, I'm using the contacts app from our dev image Feb 04 09:07:41 Garfonso: thanks for the tip with the command line, it will be very usefull I think Feb 04 09:07:43 Tofe: It might be worth to try com.palm.app.contacts instead from core-apps Feb 04 09:08:07 Just to see if it's our app. Since it was rewritten from scratch that could be a likely culprit Feb 04 09:11:26 maybe Feb 04 09:12:05 Tofe: It's an easy tesg Feb 04 09:12:13 s/g/t Feb 04 09:12:55 Just on N4 there are resolution issues with legacy app due to it being for TP. Should be OK on TP and VBOx though Feb 04 09:14:33 If you want I can test in Vbox Feb 04 09:14:46 Just edit add & edit a contact? Feb 04 09:14:51 yup Feb 04 09:15:04 but you'll run into the getPreferences bug Feb 04 09:15:32 Ah so we need a new nightly :P ? Feb 04 09:15:43 to have a conclusive test you'll need a new build with latest luna-sysservice, yes Feb 04 09:16:09 Tofe: OK Feb 04 09:16:28 Let me fix this webos-keyboard issue shortly, PR and kick off a new build Feb 04 09:17:29 ok :) Feb 04 09:19:49 Tofe: you are right... for some reason during contacts.linker initialization the mojoservice initialization is not done, when globalization stuff happens# Feb 04 09:20:01 for accounts service it is the right way Feb 04 09:23:10 Garfonso: I don't know at all how that stuff works: is the intiialization of the various pieces automatic, or do the linker have to deal with it ? Feb 04 09:24:58 btw, the /etc/palm/contact_linker_plugins doesn't exist by default, we may want to create an empty folder at the package's installation Feb 04 09:26:13 Tofe: We might also want to add a symlink for /media/internal/wallpapers on non-TP targets Feb 04 09:26:49 Because user would put wallpapers in /media/internal/wallpapers, however system ones are elsewhere in /usr/var/wallpapers or something Feb 04 09:27:09 Tofe where does _ make sense? Next to - on symbol keyboard? Feb 04 09:27:41 shifted "-" should be "_", usually, like on TP keyboard Feb 04 09:29:15 Tofe: We don't have shifted on our phone symbol vkb currently Feb 04 09:30:07 Tofe: mojoservice initialization is automatic and should be the first thing happening at all... I currently try to understand what causes Globalization to initialize before... not sure how that can happen at all. Feb 04 09:31:13 Garfonso: for accounts, it seem to do some dedicated work related to locale: https://github.com/webOS-ports/app-services/blob/webOS-ports/master/com.palm.service.accounts/accounts.js#L228 Feb 04 09:31:35 Herrie|Veer: oh? Feb 04 09:32:45 Tofe: Yeah based on OWO phone VKB video Feb 04 09:32:57 So separate key next to - for now? Feb 04 09:33:56 if it fits, yes Feb 04 09:34:10 Tofe: Yeah Feb 04 09:34:32 We might want to revisit that sometime in future but for now that would be quickest & easiest solution Feb 04 09:34:39 exactly Feb 04 09:35:30 Tofe: yeah, but that should not matter... I just added log output in mojoservice/controller_service.js initialize and in globalization initialization for account service mojoservice initialization is run before globalization init for contacts linker it is the other way round Feb 04 09:35:42 Garfonso: maybe we shouldn't load Globalization here ? https://github.com/webOS-ports/app-services/blob/webOS-ports/master/com.palm.service.contacts.linker/linker.js#L85 but put it in a future ? Feb 04 09:37:15 I removed that already to try stuff. Not the issue. Also it should not be.. this already seems like a dirty fix, to me. Because this is the "service assitant". The setup method is run before a call to the service is handled. Feb 04 09:37:49 so the original author might have had the same problem and fixed it with re-loading globalization at that later stage? Feb 04 09:42:29 somehow the contacts library is involved.. Feb 04 09:44:45 and now that I think about it, the cdav service has the same issue for the same reason (although it even denies being globalized). Feb 04 09:46:01 All this is a bit weird Feb 04 09:50:33 There are quite some global variables in linker, also. Maybe it triggers Globalization too soon? Feb 04 09:51:19 this https://github.com/openwebos/loadable-frameworks/blob/master/contacts/javascript/prologue.js is the issue... not sure how to solve it Feb 04 09:51:38 this is run before mojoservice is initialized Feb 04 09:52:09 oh, contacts lib is loaded so soon ? where from ? Feb 04 09:53:05 you can see in sources.json that it is required. This will trigger something in mojoservice (I guess) to load it Feb 04 09:53:45 at least that is how I think it works, never looked into that. Feb 04 09:54:18 ah, ok Feb 04 09:54:44 maybe we could defer that loading to the setup assistant ? Feb 04 09:54:45 removing code in prologue.js in contact linker (where stuff from contact lib is assigned to global variables) did not prevent golbalization from beeing initialized to early. Feb 04 09:54:51 Tofe: PR is in. I basically added a dismiss button on bottom row for all languages & added underscore to symbol vkb phone layout Feb 04 09:56:04 merged Feb 04 09:57:52 Ok nightly running Feb 04 10:08:13 Garfonso: does it work to put a console.alert in Globalization init to know where that early init comes from? Feb 04 10:09:15 also, it seems that the little trick to reload Globalization doesn't work, which is weird Feb 04 10:18:16 Tofe: Not sure if all this worked OK on legacy Feb 04 10:18:22 Some stuff was hacked together Feb 04 10:20:08 And we still have 839 & 865 outstanding as well which might be related Feb 04 10:42:37 Tofe: Seems some of the libs in enyo 1 have hard reference to com.palm.apps.contacts like lib/contactsui/UI/ Feb 04 10:44:29 Also the cdav templates only allow for com.palm.app.contacts not the org.webosports.app.contacts.Let me PR that already Feb 04 10:44:44 Tofe: did not try that... but it comes from this line https://github.com/openwebos/loadable-frameworks/blob/master/contacts/javascript/prologue.js#L66 Feb 04 10:44:58 I just checked if we could defer that, but it is needed right away... Feb 04 10:45:26 I'm not sure if the reinitialization can work at all... Feb 04 10:51:03 I always hated contacts lib... :-/ Feb 04 10:51:52 Garfonso: frankly, it looks like a bug in MojoService more than in contacts linker: MojoService should initialize its locale before any of this require may happen Feb 04 11:18:21 no, this happens before mojoservice can do anything, already in mojoloader Feb 04 11:19:10 mojoloader basically runs all js code from the libraries. This defines all the functions and stuff, but also runs all code directly which is not wrapped in functions. Feb 04 11:19:43 so the code in prologue.js is run before any of the magic that mojoservice does, because it is already done in mojoloader. Feb 04 11:23:19 and this is also why a reinitialization won't work (at least not for all parts, it might solve normalization issues)... because all the stuff in contacts library gets initialised on load with the wrong locale and stays that way. So on re-initialize all the code from contacts libabry would need to be re-run. Feb 04 11:44:22 Garfonso: ok, I see... So basically, prologue.js does too many things, when it should be minimalistic Feb 04 12:20:30 Tofe: not only prologue.js. prologue.js defines RB, which is used in various parts of the library like https://github.com/openwebos/loadable-frameworks/blob/master/contacts/javascript/properties/PhoneNumber.js#L279 -> all of this would need to be rerun if the local changes. Feb 04 12:33:21 Garfonso: well, it could be done like for accounts: if the locale changes, it triggers a restart of the service. But that does solve the intiial issue, which is that the locale can't even be retrieved once. Feb 04 12:34:44 Garfonso: well, it could be done like for accounts: if the locale changes, it triggers a restart of the service. But that does solve the intiial issue, which is that the locale can't even be retrieved once. And I don't think RB is to be used before the service is setup? Feb 04 12:45:57 is the local read from /etc/palm/defaultPreferences.txt? We could do a dirty hack to fix it.. Feb 04 13:23:01 No, it is read from getPreferences luna-sysservice API Feb 04 13:41:49 Tofe/Garfonso: Did a PR for the C+Dav account templates to give org.webosports.app.contacts the same permissions as com.palm.app.contacts Feb 04 13:46:50 Will not fix this issue, but we'll need it eventually anyway Feb 04 13:57:00 Garfonso: couldn't we move all that global variable stuff from prologue.js to linker.js' setup, and remove the dependency to globalization to make a dynamic one ? Feb 04 14:00:40 JaMa: ping Feb 04 14:01:52 Ah no wait, I'm talking nonsense Feb 04 14:02:14 All this stuff is in contacts lib Feb 04 14:06:42 Still, for account service we even have a dynamic require on Globalization in prologue.js, and it doesn't seem to get in the way Feb 04 14:08:01 Garfonso: I remarked that for accounts, the mojoservice lib is present in sources.json; also, globalization isn't present. Feb 04 14:08:38 Maybe we simply need to add mojoservice before contacts. If that doesn't work, we could try removing it from sources, and load it dynamically from prologue.js. Feb 04 14:08:58 (removing contacts lib, I mean) Feb 04 14:41:28 Tofe: No, it won't work. Having contacts lib in sources.json creates the issue. Feb 04 14:41:42 Maybe we can remove it there and load dynamically in the setup function Feb 04 14:56:59 Tofe: loading contacts dynamically seems to do the trick. But it requires some changes in autlinker.js and linker.js, too. Feb 04 15:06:48 Garfonso: ah great; why does it impact those ones ? Did you try putting mojoservice in sources.json and load dynamically contacts in prologue.js, a bit like accounts? Feb 04 15:08:14 it affects those, because the require contacts to be loaded in prologue.js.. (basically the same issues as in contacts lib itself). Feb 04 15:10:14 Garfonso: then let's load it in prologue.js and put mojoservice in the sources.json Feb 04 15:12:30 loading prologue.js won't help, because then it is run before mojoservice initialization again. Feb 04 15:13:18 all code from source.json is run by mojoloader. For that reason in contacts lib prologue.json the globalization (and RB = RessourceBundle) is initialized to early. Feb 04 15:13:39 and for that reason we need to get rid of things like this https://github.com/webOS-ports/app-services/blob/webOS-ports/master/com.palm.service.contacts.linker/autolinker.js#L238 -> it will reference person during load. Feb 04 15:13:57 basically, with mojoloader, you just want to have function definitions in all js code. Feb 04 15:21:58 Garfonso: having mojoservices in sources.json wouldn't help? Feb 04 15:22:08 no. Feb 04 15:22:28 Ah, I thought it was what made accounts work Feb 04 15:22:33 because the initialization in mojoservice is done later. Feb 04 15:22:52 AFAIK node-service always have mojoservice anyways. ;) Feb 04 15:23:16 Then I have no clue why accounts works... Feb 04 15:23:42 because it does not load contacts library :) Feb 04 15:23:56 but it does load Globalization in prologue Feb 04 15:25:02 yes, but that is ok. Globalization waits with its initialization till it is required. Feb 04 15:25:22 but in contacts lib globalization is used right away. This line is the root of the issue: https://github.com/webOS-ports/loadable-frameworks/blob/master/contacts/javascript/prologue.js#L66 Feb 04 15:25:53 but you can not get rid of it in contacts lib easily, because a whole bunch of other code depends on RB being initialized right aways. Feb 04 15:26:38 I think contacts lib never was designed to be loaded by node.js services. Or so... not sure. Feb 04 15:27:07 Ah, now I understand, thanks. Yes, that's a pity, for a "loadable framework" ;) Feb 04 15:52:58 Tofe: Your luna-sysservice PR broke the patch Feb 04 15:53:02 Can you fix it? Feb 04 15:53:29 the 0001-replace-cjson-with-json-c.patch ;) Feb 04 15:53:55 I'm not sure why we don't apply the patch just Feb 04 15:54:06 We're not doing anything with upstream anyway Feb 04 15:57:14 Tofe: Let me see if I can fix it quickly Feb 04 15:58:45 Herrie|Veer: oh, sorry, I thought it was ok, but I might have made a mistake in the process Feb 04 16:00:18 Herrie|Veer: pong Feb 04 16:00:36 yes, please merge it Feb 04 16:01:06 JaMa: Yeah I'll just apply the patch and do tofe's stuff on top Feb 04 16:01:18 Since we're not following upstream we're OK dropping the patch. Feb 04 16:01:27 It makes sense when we follow upstream Feb 04 16:01:44 But since LG went stealth with OWO there's little use for now Feb 04 16:01:47 Tofe, Herrie|Veer: it would be good to fix JSONUtils.h in luna-sysmgr-common as well Feb 04 16:02:05 nizovn: oh, it's duplicated here? I'll have a look Feb 04 16:07:08 it was introduced as a patch, because I was changing all components at the same time and in meta-webos-ports branch so I didn't want to update component repos until all were ready Feb 04 16:08:22 JaMa: OK :) Feb 04 16:25:53 Tofe: please try if https://github.com/webOS-ports/app-services/pull/3 fixes your issue Feb 04 16:27:30 Garfonso: oh, great! Will do tonight :) Feb 04 18:17:09 Tofe: https://github.com/webOS-ports/luna-sysservice/pull/5 Feb 04 18:17:16 This applies the patch. Feb 04 18:18:22 I basically took our repo, created my own branch, did a git --reset hard 51fb0cb7a773628dfb802371fd112b284d87d2c7, git am the patch and reapplied your commit Feb 04 18:29:19 nizovn: You mean to apply the same fix as here: https://github.com/webOS-ports/luna-sysservice/commit/3b4c0f23be98efc5a2d5729df202679f2d37d34f ? Feb 04 18:32:15 yes Feb 04 18:34:16 nizovn: OK Feb 04 18:45:20 nizovn: https://github.com/webOS-ports/luna-sysmgr-common/pull/10 Feb 04 18:47:41 Herrie: thanks, looks good Feb 04 22:02:15 Garfonso: it worked! merging now Feb 04 22:10:04 Any comment on https://github.com/webOS-ports/loadable-frameworks/pull/5 would be appreciated :) Feb 04 22:25:48 Tofe: I think it should be "numberParam" not "numberParamType" here in the "else": https://github.com/webOS-ports/loadable-frameworks/pull/5/files#diff-7b56c2ef25638a372421ca635cbca2eeR170 Feb 04 22:26:52 (same for line 184) Feb 04 22:30:22 another comment would be that I don't like how the files are loaded... we should try to use node's require where possible. Feb 04 22:30:52 I know this is similar to what was there before... but maybe we can make telephony-lib loadable as node module. **** ENDING LOGGING AT Fri Feb 05 02:59:59 2016