webOS Nation Forums >  Homebrew >  webOS Patches > Google Calendar Sync Behaviors patch
Google Calendar Sync Behaviors patch
  Reply
Like Tree14Likes

 
Thread Tools Display Modes
Old 01/15/2013, 07:20 AM   #261 (permalink)
Member
 
Posts: 2,661
Quote:
Originally Posted by WeeGee View Post
The sync from Google to Pre is working, but the other way is totally blocked, no matter in which of my calendars I add or change an event.
So I thought, the malicious event must be on the Pre.. is that a wrong assumption?.
You are correct the bad event is on the Pre. I was thinking comparing the web events to the Pre might help you find it.

Quote:
Now I moved (hopefully) all events I created after the first missing event, and some before that event to the Palm/HP account, so they should be out of the way, but no change....

I get one 410 error when I use Sync Now in the menu, and one minicore (what is that?) crash at the beginning, and some others when I don't filter.. I'll add a current log.
Log looked good. A 410 error means that google does not have the event that you are trying to sync. Have you tried restarting your device after moving all the events? Sometimes a restart is necessary to fix a hung sync, which is what a mini-core crash is --- the node service stopping. It will restart on it's own, but a restart should clear the memory.
__________________
French Pre3, UK Pre2, US Veer, German gsm Pre, 680, garmin ique 3600 & still have my working palm pilot 1000 with the 1 Mb adapter

Please remove UberCalendar and google sync behavior patches prior to system updates.
patch Google calendar sync behavior for 2.x.x and TouchPad (Tweaks enabled)
Preference guide for MetaView's UberCalendar patch
frantid is online now   Reply With Quote
Old 01/17/2013, 05:07 AM   #262 (permalink)
Member
 
Posts: 65
A complete reboot didn't help either.
I moved even more events to the palm profile, but no sync.

When I look at my logs, there is another thing:
all calendars (except the one I rarely use) have a sync window going back only two days, so maybe all the changes I made to earlier events are just ignored?
How is the sync window calculated?

And I still see the minicore crash - right after starting a sync and after all the 200s. What exactly does this minicore do?
And could we get any information why it crashes?


-- Sent from my Palm Pre3 using Forums
__________________
HP Preł (GSM, webOS 2.2.4, UberKernel: 1.68GHz On Demand), Palm Pre GSM, Palm Treo 680, Garmin iQue 3600, Palm III
WeeGee is offline   Reply With Quote
Old 01/21/2013, 11:49 AM   #263 (permalink)
Member
 
Posts: 2,661
Quote:
Originally Posted by WeeGee View Post
A complete reboot didn't help either.
I moved even more events to the palm profile, but no sync.

When I look at my logs, there is another thing:
all calendars (except the one I rarely use) have a sync window going back only two days, so maybe all the changes I made to earlier events are just ignored?
How is the sync window calculated?
The dates are just one part of the sync formula. The first set asks for any changes between the devices last sync'd events modification time and the reported last modified time from google's data. If that errors or conflicts, the second time window asks for all (changed or not) events from the devices modified time to the sync window settings. The times represent requests from google. Those are the periodic syncs. It should also sync as soon as it can (all requirements met), after you make a change to the database on the device.

Quote:
And I still see the minicore crash - right after starting a sync and after all the 200s. What exactly does this minicore do?
And could we get any information why it crashes?


-- Sent from my Palm Pre3 using Forums
mini-core is the node service itself.

I think you might have database problems. You might have to, toggle the calendar off in the accounts app. Then go through the calendar and see if you have undefined events. If you do have them, you have to delete them all, before you turn the calendar back on.
__________________
French Pre3, UK Pre2, US Veer, German gsm Pre, 680, garmin ique 3600 & still have my working palm pilot 1000 with the 1 Mb adapter

Please remove UberCalendar and google sync behavior patches prior to system updates.
patch Google calendar sync behavior for 2.x.x and TouchPad (Tweaks enabled)
Preference guide for MetaView's UberCalendar patch
frantid is online now   Reply With Quote
Old 01/21/2013, 08:23 PM   #264 (permalink)
Member
 
Posts: 65
Quote:
Originally Posted by frantid View Post
The dates are just one part of the sync formula. The first set asks for any changes between the devices last sync'd events modification time and the reported last modified time from google's data. If that errors or conflicts, the second time window asks for all (changed or not) events from the devices modified time to the sync window settings. The times represent requests from google. Those are the periodic syncs. It should also sync as soon as it can (all requirements met), after you make a change to the database on the device.
Thanks for that explanation.

Quote:
Originally Posted by frantid View Post
I think you might have database problems. You might have to, toggle the calendar off in the accounts app. Then go through the calendar and see if you have undefined events. If you do have them, you have to delete them all, before you turn the calendar back on.
Uh... In the struggle to get my Pre syncing again, I already removed all calendars from my google account which weren't mine (p.ex. belonging to my wife). And all these hundreds of events are now undefined at my Pre...
And AgendaZ doesn't delete them, despite the fact that the delete undefined option is set. And even worse, at the Preferences of AgendaZ I can see some calendar names more than once - some of them don't have a color associated. I guess these contain the orphaned calendar events... how can I clean up this mess without resetting everything or deleting all thousand (?) undefined events one by one? Any idea?
__________________
HP Preł (GSM, webOS 2.2.4, UberKernel: 1.68GHz On Demand), Palm Pre GSM, Palm Treo 680, Garmin iQue 3600, Palm III
WeeGee is offline   Reply With Quote
Old 01/22/2013, 02:42 AM   #265 (permalink)
Member
 
Posts: 2,661
I added a menu item that attempts to delete all events from an undefined events calendar. Sometimes it doesn't work though. Just open an undefined event and choose the menu item. If it doesn't work, you will have to delete them one by one; or doctor.
frantid is online now   Reply With Quote
Old 02/05/2013, 07:17 PM   #266 (permalink)
Member
 
Posts: 65
Quote:
Originally Posted by frantid View Post
I added a menu item that attempts to delete all events from an undefined events calendar. Sometimes it doesn't work though. Just open an undefined event and choose the menu item. If it doesn't work, you will have to delete them one by one; or doctor.
frantid, could you explain what this menu item does, please?

As it didn't help on my undefined events, I searched for whatever I could find regarding this problem; I found this thread, and posted some questions about my experiences using luna-send:
"undefined" calendar entries

Maybe I could find the reason why your menu command (and AgendaZ) doesn't work and modify it...
__________________
HP Preł (GSM, webOS 2.2.4, UberKernel: 1.68GHz On Demand), Palm Pre GSM, Palm Treo 680, Garmin iQue 3600, Palm III
WeeGee is offline   Reply With Quote
Old 02/05/2013, 07:21 PM   #267 (permalink)
Member
 
Posts: 65
Quote:
Originally Posted by WeeGee View Post
And even worse, at the Preferences of AgendaZ I can see some calendar names more than once - some of them don't have a color associated. I guess these contain the orphaned calendar events...
I found out that these are disabled Google EAS calendars - since I had syncing troubles in the past, I tried to set up EAS syncing, which didn't work very well, so I switched back to the standard Google API sync. But these calendars are all empty and didn't cause any troubles in the past.
__________________
HP Preł (GSM, webOS 2.2.4, UberKernel: 1.68GHz On Demand), Palm Pre GSM, Palm Treo 680, Garmin iQue 3600, Palm III
WeeGee is offline   Reply With Quote
Old 02/06/2013, 08:01 AM   #268 (permalink)
Member
 
Posts: 2,661
Quote:
Originally Posted by WeeGee View Post
frantid, could you explain what this menu item does, please?

As it didn't help on my undefined events, I searched for whatever I could find regarding this problem; I found this thread, and posted some questions about my experiences using luna-send:
"undefined" calendar entries

Maybe I could find the reason why your menu command (and AgendaZ) doesn't work and modify it...
What I do is find the calendarId of the undefined event. Then query the database for all the events associated with that calendarId. Once the results are back, I take each of the eventId's and put them in an array. You can then send the array to the database to be deleted. You need to set the "purge" parameter to true. If you don't set purge to true, the next time it tries to sync it will delete the events from your google account.

Try to use the test patch I just posted. I put in some extra logging to see what happens.
UberCalendar: Enhanced calendar patch

Quote:
Originally Posted by WeeGee View Post
I found out that these are disabled Google EAS calendars - since I had syncing troubles in the past, I tried to set up EAS syncing, which didn't work very well, so I switched back to the standard Google API sync. But these calendars are all empty and didn't cause any troubles in the past.
I have never tried it, but you can use impostah to look at the objects in any of the phone databases. There is a menu item there to delete all items once you find the entries that match the right calendarId.

Just be careful to delete the right one --- once you delete it, there is no going back without a doctor if you make a mistake.

I would try just one event first to see if you get any bad side effects. Since you have the eventId of one of these bad events, you can find it in impostah and delete it. I would then restart the phone and make sure the calendar doesn't have problems, check the logs etc.
__________________
French Pre3, UK Pre2, US Veer, German gsm Pre, 680, garmin ique 3600 & still have my working palm pilot 1000 with the 1 Mb adapter

Please remove UberCalendar and google sync behavior patches prior to system updates.
patch Google calendar sync behavior for 2.x.x and TouchPad (Tweaks enabled)
Preference guide for MetaView's UberCalendar patch
frantid is online now   Reply With Quote
Old 04/17/2013, 04:42 PM   #269 (permalink)
Member
 
Posts: 2,661
edit: files updated in first post -- removed from this post, Latest Preware version includes these changes

I have created a debug version of the sync behaviors patch. It has some extra logging for help in sync problems.

I also added a beta preference to the Tweaks interface -- "Sync Strategy" The options are "Default" and "Changes Only" It's my belief that the changes only strategy will be better for the heavy calendar users with greater than 50 events in a calendar month -- counting repeating events as 1 event.


Default behavior:
  • Asks google for any changes from the last sync
  • After changes are processed, it asks for all events in the sync window specified by the tweaks preferences. 12 months back and 48 forward by default.
  • You can change these as you need.
  • This last sync type uses more battery and bandwidth, but ensures most events are found.
  • If you have hundreds of events per month, this last sync has a tendency to error if you are not on wifi.


Changes only:
  • Asks google for any changes since the last sync.
  • If there is no error on the response, it stops there.
  • If there are minor errors, it will attempt to sync just the last week and 2 weeks forward. As a second request.
  • If there are major errors, it will do the default sync of asking for events in the window specified in your Tweaks settings.
  • In theory, this should lower the time it takes to sync. Improving battery and data usage.
  • If your network is always dropping, then it will do the default for safety..
  • I could configure it to not do the default, but I need more testers to verify the changes only works well.

Quote:
To manually install this patch you must uninstall the current sync behaviors patch. Restart Luna, install this debug version. You must also have Tweaks installed and copy over the new attached json file. You use the json file as follows:

1. rename the attached "google-first-sync.json.txt" file to "google-first-sync.json" by deleting ".txt" from the end of the name. 2. place the "google-first-sync.json" file in the following directory:

/media/cryptofs/apps/usr/palm/services/org.webosinternals.tweaks.prefs/preferences/
Choose "Changes Only" under the Tweaks preferences for calendar to try the new sync strategy.
Attached Images
File Type: png tweaks.PNG (113.7 KB, 25 views) Email Attachment
__________________
French Pre3, UK Pre2, US Veer, German gsm Pre, 680, garmin ique 3600 & still have my working palm pilot 1000 with the 1 Mb adapter

Please remove UberCalendar and google sync behavior patches prior to system updates.
patch Google calendar sync behavior for 2.x.x and TouchPad (Tweaks enabled)
Preference guide for MetaView's UberCalendar patch

Last edited by frantid; 04/20/2013 at 09:19 AM.
frantid is online now   Reply With Quote
Liked by toaste and xjstattoo like this.
Thanked by Rnp, xjstattoo
Old 04/18/2013, 08:59 AM   #270 (permalink)
Member
 
Posts: 2,661
Added a debug version for the touchpad. See post before this one.
__________________
French Pre3, UK Pre2, US Veer, German gsm Pre, 680, garmin ique 3600 & still have my working palm pilot 1000 with the 1 Mb adapter

Please remove UberCalendar and google sync behavior patches prior to system updates.
patch Google calendar sync behavior for 2.x.x and TouchPad (Tweaks enabled)
Preference guide for MetaView's UberCalendar patch
frantid is online now   Reply With Quote
Liked by toaste likes this.
Old 04/18/2013, 04:29 PM   #271 (permalink)
Member
 
toaste's Avatar
 
Posts: 290
I vote for updating the normal patch
toaste is offline   Reply With Quote
Liked by frantid likes this.
Thanked By: frantid
Old 04/18/2013, 04:37 PM   #272 (permalink)
Member
 
Posts: 2,661
Quote:
Originally Posted by toaste View Post
I vote for updating the normal patch
I agree. LOL

I will submit it. If anyone finds a problem, I'm sure I can adjust it pretty quickly. The changes only sync is off by default, so most won't notice any change -- unless they purposely choose to try it.
__________________
French Pre3, UK Pre2, US Veer, German gsm Pre, 680, garmin ique 3600 & still have my working palm pilot 1000 with the 1 Mb adapter

Please remove UberCalendar and google sync behavior patches prior to system updates.
patch Google calendar sync behavior for 2.x.x and TouchPad (Tweaks enabled)
Preference guide for MetaView's UberCalendar patch
frantid is online now   Reply With Quote
Thanked By: toaste
Old 04/20/2013, 07:22 AM   #273 (permalink)
Member
 
Posts: 2,661
Preware has been updated. Remember you have to have Tweaks installed and set the strategy to "Changes only", if you want to try it. You don't need to restart luna after changing Tweaks settings. It will happen on the next sync.
__________________
French Pre3, UK Pre2, US Veer, German gsm Pre, 680, garmin ique 3600 & still have my working palm pilot 1000 with the 1 Mb adapter

Please remove UberCalendar and google sync behavior patches prior to system updates.
patch Google calendar sync behavior for 2.x.x and TouchPad (Tweaks enabled)
Preference guide for MetaView's UberCalendar patch
frantid is online now   Reply With Quote
Thanked By: toaste
Old 04/20/2013, 08:57 AM   #274 (permalink)
Member
 
Posts: 2,661
Quote:
Originally Posted by Ste1venson View Post
Also attached the json file for use in tweaks.
You mean in Preware? Yes, Preware does it all auto-magically.

If you had placed one there yourself, you may have duplicate entries in Tweaks. Just delete the one you put manually if you have duplicates.
__________________
French Pre3, UK Pre2, US Veer, German gsm Pre, 680, garmin ique 3600 & still have my working palm pilot 1000 with the 1 Mb adapter

Please remove UberCalendar and google sync behavior patches prior to system updates.
patch Google calendar sync behavior for 2.x.x and TouchPad (Tweaks enabled)
Preference guide for MetaView's UberCalendar patch
frantid is online now   Reply With Quote
Old 04/22/2013, 09:07 AM   #275 (permalink)
Member
 
Posts: 2,661
Anyone have any problems over the weekend -- if you tried the Changes only strategy?

I have 6 devices syncing without error, but I have not historically had sync problems as I am almost always on wifi.

Let me know how it goes, to see if there are adjustments needed....

cheers
__________________
French Pre3, UK Pre2, US Veer, German gsm Pre, 680, garmin ique 3600 & still have my working palm pilot 1000 with the 1 Mb adapter

Please remove UberCalendar and google sync behavior patches prior to system updates.
patch Google calendar sync behavior for 2.x.x and TouchPad (Tweaks enabled)
Preference guide for MetaView's UberCalendar patch
frantid is online now   Reply With Quote
Old 04/24/2013, 09:02 AM   #276 (permalink)
Member
 
Posts: 43
Quote:
Originally Posted by frantid View Post
Anyone have any problems over the weekend -- if you tried the Changes only strategy?

I have 6 devices syncing without error, but I have not historically had sync problems as I am almost always on wifi.

Let me know how it goes, to see if there are adjustments needed....

cheers
The patch appeared in my Preware shortly after you announced it, but after installing and doing a restart, there is no "changes only" option in my Calendar | Prefs | Advanced sync Requirements.
chillrobot is offline   Reply With Quote
Old 04/24/2013, 09:13 AM   #277 (permalink)
Member
 
Posts: 2,661
The preference is in Tweaks app.
frantid is online now   Reply With Quote
Old 09/23/2013, 05:46 AM   #278 (permalink)
Member
 
Posts: 26
Hello, i can't install the google behavior patch and don't know why. I'm going mad...
Can i have some help?
Thanks a lot!



Postinst
-1: Unable to run command: IPKG_OFFLINE_ROOT=/media/cryptofs/apps /bin/sh /media/cryptofs/apps/usr/lib/ipkg/info/org.webosinternals.patches.calendar-google-sync-behaviors-patch.postinst 2>&1
1 out of 2 hunks FAILED -- saving rejects to file usr/palm/services/com.palm.service.calendar.google/javascript/assistants/serviceassistant.js.rej
Reversed (or previously applied) patch detected! Assume -R? [n]
Apply anyway? [n]
6 out of 6 hunks ignored -- saving rejects to file usr/palm/services/com.palm.service.calendar.google/javascript/models/calendar_event_query.js.rej
2 out of 3 hunks FAILED -- saving rejects to file usr/palm/services/com.palm.service.calendar.google/javascript/models/google_calendar_transformer.js.rej
Reversed (or previously applied) patch detected! Assume -R? [n]
Apply anyway? [n]
3 out of 3 hunks ignored -- saving rejects to file usr/palm/services/com.palm.service.calendar.google/javascript/models/transforms.js.rej
Reversed (or previously applied) patch detected! Assume -R? [n]
Apply anyway? [n]
1 out of 1 hunk ignored -- saving rejects to file usr/palm/services/com.palm.service.calendar.google/javascript/utils/xhr.js.rej
Remove
Removing package org.webosinternals.patches.calendar-google-sync-behaviors-patch from root...
(offline root mode: not running org.webosinternals.patches.calendar-google-sync-behaviors-patch.prerm)
mitweeeeh is offline   Reply With Quote
Old 10/03/2013, 06:34 PM   #279 (permalink)
Member
 
Posts: 26
No help??
mitweeeeh is offline   Reply With Quote
Old 10/04/2013, 09:57 AM   #280 (permalink)
Member
 
Posts: 2,661
Quote:
Originally Posted by mitweeeeh View Post
No help??
Quote:
Originally Posted by mitweeeeh View Post
Hello, i can't install the google behavior patch and don't know why. I'm going mad...
Can i have some help?
Thanks a lot!



Postinst
-1: Unable to run command: IPKG_OFFLINE_ROOT=/media/cryptofs/apps /bin/sh /media/cryptofs/apps/usr/lib/ipkg/info/org.webosinternals.patches.calendar-google-sync-behaviors-patch.postinst 2>&1
1 out of 2 hunks FAILED -- saving rejects to file usr/palm/services/com.palm.service.calendar.google/javascript/assistants/serviceassistant.js.rej
Reversed (or previously applied) patch detected! Assume -R? [n]
Apply anyway? [n]
6 out of 6 hunks ignored -- saving rejects to file usr/palm/services/com.palm.service.calendar.google/javascript/models/calendar_event_query.js.rej
2 out of 3 hunks FAILED -- saving rejects to file usr/palm/services/com.palm.service.calendar.google/javascript/models/google_calendar_transformer.js.rej
Reversed (or previously applied) patch detected! Assume -R? [n]
Apply anyway? [n]
3 out of 3 hunks ignored -- saving rejects to file usr/palm/services/com.palm.service.calendar.google/javascript/models/transforms.js.rej
Reversed (or previously applied) patch detected! Assume -R? [n]
Apply anyway? [n]
1 out of 1 hunk ignored -- saving rejects to file usr/palm/services/com.palm.service.calendar.google/javascript/utils/xhr.js.rej
Remove
Removing package org.webosinternals.patches.calendar-google-sync-behaviors-patch from root...
(offline root mode: not running org.webosinternals.patches.calendar-google-sync-behaviors-patch.prerm)

Hi, I did not see your earlier post. ...

It looks like it did not remove correctly before, assuming you had it installed previously.

What type of device is this and what OS version are you running?
__________________
French Pre3, UK Pre2, US Veer, German gsm Pre, 680, garmin ique 3600 & still have my working palm pilot 1000 with the 1 Mb adapter

Please remove UberCalendar and google sync behavior patches prior to system updates.
patch Google calendar sync behavior for 2.x.x and TouchPad (Tweaks enabled)
Preference guide for MetaView's UberCalendar patch
frantid is online now   Reply With Quote
Reply

 

Thread Tools
Display Modes



 


Content Relevant URLs by vBSEO 3.6.0