#1 2017-02-25 09:42:51

hermanv
Member
Registered: 2017-02-17
Posts: 22

Remaining problems

Or maybe one question and one problem
1. I can sync my calender from the PC (Tunderbird) to the phone, but the other way nothing comes thru. Is that normal?? Firewall is not the problem since sync is active on both sides and that does not happen when the port (tcp and udp) is blocked on the PC.
2. I create a new calender in thunderbird to generalsync. Before that I exported my existing calendar to a .ics file. I then disable the existing calendar and import the .ics file to the new generalsync calendar. This always ends with a message "Modification failed". At first nothing appears in the new calendar, but after a minute of two, all seems to be there. But when I then try to sync the calendar to the phone, no info appears on its calendar. I used wireshark on the PC to be sure that the sync does something and indeed I see a lot of messages passing forth and back and there is data going from the PC to the phone. So ??????
I can provide the .ics file if needed.

#2 2017-02-25 16:36:47

ds
Founder / Developer
From: Freiburg, Germany
Registered: 2016-06-15
Posts: 258

Re: Remaining problems

hermanv wrote:

I can sync my calender from the PC (Tunderbird) to the phone, but the other way nothing comes thru. Is that normal?

What do you consider 'nothing comes thru'? If you created unidirectional sync connections ("send to" in contrast to "sync to"), you cannot change the content on the Smartphone. For address books, some Android Apps suggest that you could change or add contacts, but their changes will be reverted within a few minutes. This is normal.

If your changes on Android are not automatically synced with the PC, but the PC receives them on the next sync initiated from the PC, then that's not normal. Note that change detection on Android may take a minute or so, as Android does not notify Apps immediately (for power saving reasons). To test the issue more easily, open the dashboard on both devices (double-click the GeneralSync icon on PC, open the GeneralSync App on Android) and switch to the "Devices" section. Select the other device and look at the last sync timestamp. Does the timestamp change when touching "Sync now" on Android? Does it change when clicking the "Sync now" (two arrows in a circle, on the right) button on PC?

hermanv wrote:

Firewall is not the problem since sync is active on both sides and that does not happen when the port (tcp and udp) is blocked on the PC.

The "active" status does not consider the device initiating the connection; it only considers whether the other device has confirmed the ability to exchange content.

Besides permitting access on GeneralSync's port (TCP/UDP 7962), you need to make sure that unicast broadcast responses are whitelisted in your firewall (UDP packets from remote port 7962 to any local ephemeral port, in response to a broadcast packet sent from the same ephemeral port to port 7962). I posted a full firewall configuration for openSUSE in another thread here on the forums.

hermanv wrote:

I then disable the existing calendar and import the .ics file to the new generalsync calendar. This always ends with a message "Modification failed". At first nothing appears in the new calendar, but after a minute of two, all seems to be there. But when I then try to sync the calendar to the phone, no info appears on its calendar. [...]
I can provide the .ics file if needed.

This is indeed weird. Regarding the failed modification, you can usually find a more detailed error message in Thunderbird's error console (tools menu). It indeed seems as if the data had been at least partially imported, but the imported data is somehow lost until it reaches the calendar in Android.

Feel free to privately send me an email (info@generalsync.com) with the affected .ics file, I'll then have a look at the issue. If you want to encrypt the file in transit, use my PGP key (EF50 98AF DECE 3894 C633 6425 9CC9 E91F A8DD 759E).

hermanv wrote:

I used wireshark on the PC to be sure that the sync does something and indeed I see a lot of messages passing forth and back and there is data going from the PC to the phone.

To verify if and what data is exchanged, you can also open GeneralSync's system log (Android: deal *#*#GENERALSYNC#*#* or enter the pair code "troubleshoot", PC: click the corresponding button in the troubleshooting section of the settings dialog (gear-icon in the dashboard)). Whenever changes are processed, an entry called "ObjectEvent" is logged there.

#3 2017-03-01 09:09:16

hermanv
Member
Registered: 2017-02-17
Posts: 22

Re: Remaining problems

Too much to answerr in one go:
Error console from Thunderbird when importing .ics file into newly created gsync calendar (no errors during the creation step):
Timestamp: 01/03/17 10:02:41
Warning: There has been an error reading data for calendar: hermans.  However, this error is believed to be minor, so the program will attempt to continue. Error code: 0x80004002. Description: Component returned failure code: 0x80004002 (NS_NOINTERFACE) [nsISupports.QueryInterface]
Source File: file:///home/herman/.thunderbird/rf6kawiv.default/extensions/%7Be2fda1a4-762b-4020-b5ad-a41df1933103%7D/calendar-js/calCalendarManager.js
Line: 962
Timestamp: 01/03/17 10:02:41
Error: An error occurred when writing to the calendar hermans! Error code: MODIFICATION_FAILED. Description:
Source File: resource://calendar/modules/calUtils.jsm -> file:///home/herman/.thunderbird/rf6kawiv.default/extensions/%7Be2fda1a4-762b-4020-b5ad-a41df1933103%7D/calendar-js/calCalendarManager.js
Line: 959
Timestamp: 01/03/17 10:02:41
Warning: There has been an error reading data for calendar: hermans.  However, this error is believed to be minor, so the program will attempt to continue. Error code: 0x80004002. Description: Component returned failure code: 0x80004002 (NS_NOINTERFACE) [nsISupports.QueryInterface]
Source File: file:///home/herman/.thunderbird/rf6kawiv.default/extensions/%7Be2fda1a4-762b-4020-b5ad-a41df1933103%7D/calendar-js/calCalendarManager.js
Line: 962
Timestamp: 01/03/17 10:02:41
Error: An error occurred when writing to the calendar hermans! Error code: MODIFICATION_FAILED. Description:
Source File: resource://calendar/modules/calUtils.jsm -> file:///home/herman/.thunderbird/rf6kawiv.default/extensions/%7Be2fda1a4-762b-4020-b5ad-a41df1933103%7D/calendar-js/calCalendarManager.js
Line: 959
Note: I did the import operation once.
Sending .ics file on private mail.

#4 2017-03-01 09:12:30

hermanv
Member
Registered: 2017-02-17
Posts: 22

Re: Remaining problems

Forgot to mention: in the mean time while putting above post together, all data seem to appear in the new calendar. At least for the past months. I didn't check for the events of a couple of years before.

#5 2017-03-01 17:23:32

ds
Founder / Developer
From: Freiburg, Germany
Registered: 2016-06-15
Posts: 258

Re: Remaining problems

First of all, thanks for the ics file. I have been able to reproduce the issue. The behavior you're experiencing is a bug, most likely within the GeneralSync integration add-on for Thunderbird.

hermanv wrote:

in the mean time while putting above post together, all data seem to appear in the new calendar. At least for the past months. I didn't check for the events of a couple of years before.

I did that for you: there have been two importing errors, affecting two events some years back (I'll send you the details privately). All other events are imported correctly and should get synced.

The issue is triggered by "faked master events" generated by Thunderbird whenever you insert a repetition instance (an event generated by a repetition rule) without also inserting the master element for the repetition rule. This could have happened by copy-pasting repetition instances.

When importing an affected event into a local (non-GeneralSync) calendar, it is displayed without a title in the list of events (only containing the start date of the visible event, an arbitrary end date and a "custom" repetition rule that resets itself to "daily" once you try to edit it).

The technical parts of this issue are tracked in bug 43.

#6 2017-03-01 21:29:43

ds
Founder / Developer
From: Freiburg, Germany
Registered: 2016-06-15
Posts: 258

Re: Remaining problems

The issue should be fixed in Version 0.2.1.5b of the Thunderbird Add-on. The update will be also available through automatic updates after I did some more testing, probably end of this week.

#7 2017-03-02 13:24:59

hermanv
Member
Registered: 2017-02-17
Posts: 22

Re: Remaining problems

I did a "quick and dirty" test: switched off the firewall, and indeed, synchronization worked OK. I will later revise the firewall rules (Mageia nor being the same as openSUSE), but I have now a handle at it. Tx a lot.

#8 2017-03-16 09:15:10

hermanv
Member
Registered: 2017-02-17
Posts: 22

Re: Remaining problems

Waited for the new versions on PC and Android to test further.
As Mageia uses shorewall as frontend for the firewall, this is a different from Suse's configuration. I installed Suse on a VM, did the configuration as provided above and looked at the files. I think I got the firewall rules correct for Mageia.
But nevertheless: updates from the PC - Thunderbird to the Android phone cross over perfectly, but  the other way around (making a change on the Android phone and syncing thereafter) does not bring anything over. Not when inititating the sync from the phone, nor from the PC. And switching the firewall completely off has no effect either. Any idea how I could trace what is happening here????

#9 2017-03-16 09:39:24

ds
Founder / Developer
From: Freiburg, Germany
Registered: 2016-06-15
Posts: 258

Re: Remaining problems

hermanv wrote:

but  the other way around (making a change on the Android phone and syncing thereafter) does not bring anything over. Not when inititating the sync from the phone, nor from the PC.

First, make sure you're actually editing data that has been synced with GeneralSync: your calendar app has a setting somewhere (usually in the event creation dialog) which calendar to use. Make sure you're actually using the GeneralSync calendar, and not a calendar provided by another Android app or your operating system. Changes performed in other calendars cannot be monitored by GeneralSync.

If you are indeed working on the correct calendar, this issue is indeed weird. Some calendar apps have a feature called "refresh" or "sync", which can be used to make sure that sync providers (such as GeneralSync) immediately receive data. If that button causes the data to become available, make sure that "Calendars" is checked for automatic sync in Android's account settings for the Account "GeneralSync", maybe some app disabled that?

#10 2017-03-17 11:04:45

hermanv
Member
Registered: 2017-02-17
Posts: 22

Re: Remaining problems

That was the last thing I needed. I'm quite fluent at "PC-ese", but less at Android. The problem was indeed that the agenda on the phone was using 3 possible agendas. I switched the others off, keeping only the GeneralSync calendar. That deleted the entry I had made on the phone, but recreating it and syncing, and all is OK now.
The only thing I need to check now is to switch on the firewall on the PC and see if that is OK. If positive, I'll post the changes I have made to shorewall to get it working. Tx a lot.

#11 2017-03-21 09:28:24

hermanv
Member
Registered: 2017-02-17
Posts: 22

Re: Remaining problems

All works OK.
The firewall settings I use now for the Mageia/Shorewall firewall are the following:
The Mageia Control Center - Security has an item for firewall configuration. In there in the Advanced section add the port 7962/tcp and 7962/udp. This is enough to allow synchronization from the PC to the phone (in other words: PC is master, phone is slave).
To have two way synchronization, go as root to /etc/shorewall and check the file "rules.drakx". This is the file that is manipulated by the Mageia Control Center - Security, so do not edit it. The file "rules" has an include for rules.drakx and thereafter I inserted following line:
ACCEPT    net    fw    udp    32768:60999    7962
That did the trick for me.

Board footer