Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to sync new entries to Thunderbird #1140

Open
doofmars opened this issue Nov 29, 2022 · 2 comments
Open

Unable to sync new entries to Thunderbird #1140

doofmars opened this issue Nov 29, 2022 · 2 comments

Comments

@doofmars
Copy link

I found a working workaround, yet I'm still submitting this report.
In case someone else has the same issue or if there is some simple fix that can be implemented this can be used as base for discussion.

Baikal version:
0.9.2 using MySQL database
PHP 8.1

Expected behaviour:
When I perform a sync on Thunderbird (v102) I expect new entries to be synced and show up in the calendar.
The entries are exist in the database and have been created since the last sync.

Current behaviour:
On clicking sync in Thunderbird a request with a sync ID is send to Baikal but the response does not contain any calendar entries to be fetched.

  • A sync from Thunderbird (v102) to Android client using DAVx5 is working.
  • A sync from Android client using DAVx5 to Thunderbird (v102) is not working.
  • A sync from an Thunderbird (v102) to another different Thunderbird (v102) client is not working.

DAVx5 seems to access Baikal differently than Thunderbird.
Thunderbird can access Baikal, but only "one way"

Workaround:

After digging around in the database I figured out that the synctoken values might be not in sync with the calendar changes.
Purging the calendarchanges table of all entries and setting the synctoken in the calendars table to 1 for each calendar entry did solve this issue. Afterwards the calendar must be resubscribed in order to get the updated synctoken.

On the old table before the purge the sync token was at 500 (SELECT synctoken FROM calendarsWHERE id = 2) but the highest synctoken for this calendarchanges was 943 (SELECT synctoken FROM calendarchanges WHERE calendarid = 2 order by synctoken desc limit 1)

Steps to reproduce:
On a fresh Baikal version this seems reproduce the issue:

  1. Setup a new Baikal instance with one user and one calendar
  2. Manipulate the synctoken in the calendars table to a high starting value (e.g. 100)
  3. Then subscribe to the calendar in two different Thunderbird instances
  4. Then Manipulate the synctoken in the calendars table to a lower value (e.g. 50)
  5. Thunderbird will use the to high synctoken in the request
  6. Baikal will not yield any calendar update response

I do not know what exactly caused this issue I started noticing this only after the recent update of Baikal from 0.7.1 to 0.9.2

@twikedk
Copy link

twikedk commented Mar 22, 2023

Did you try just to Unsubscribe / Subscribe?
It seems, at least for now, to do the trick for me.
I'm running 0.9.2 too but on SQLite and issue was with TB 102.9.0.

Edit!
I can confirm, after doing the unsubscribe / subscribe on all my running TB, it works as intended now.

@doofmars
Copy link
Author

doofmars commented Mar 23, 2023

Yes I did. See my steps to reproduce.
I setup a fresh local baikal + portable thunderbird.
Loaded in my existing calendar data and connected the two.
Any unsubscribe and resubscribe the issue was still there with syncing any new created items from outside.

The only solution was to manually reset of the calendarchanges table and resetting the synctoken.
If I understand the database this data is not really required as the actual calendar data is stored in a different table.
Since this change everything works again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants