-
Notifications
You must be signed in to change notification settings - Fork 33
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
[needs testing latest version] Issues with idle time and lost synchronization #498
Comments
Is this still an issue with the latest version? I don't see anything suggesting a need for restart in the logs. |
I can confirm that at least clicking "Synchronize" in the calendar tab (at the top left) does not seem to have an effect. |
No synchro problem since updating last versions Thunderbird 102.5.0 64bits and addon 102.0.0 |
Just checked, still an issue for me, unfortunately :/ |
Still have sync problems. It's been a few months since some of my Google Calendars don't synchronize correctly. I cannot trust Thunderbird calendar anymore :/ Especially, events created by other people in shared google calendars don't appear in TB without the application restart. My own private calendars and my own events in shared calendars seem to synchronize. But I'm not sure if it's always the case. I'm on Windows 11, TB 102.5.0, Google provider 102.0.3 |
Can you try re-subscribing to the calendar? If that doesn't work, I will need a few more logs, e.g. these steps logged
|
Hello @kewisch , Will a Macos Thunderbird client even be helpful? I don't have the resources to try this on Windows or some variety *nix. I also don't know much about git / github. Should I merge 529 into 498 and if so, what is an education references on how to do that. fwiw, n00mad |
I cannot reproduce the problem this way. After re-subscribing (or restarting TB) synchronization mostly works (as far as I can see). But after some time (hours, days?) calendars stop synchronizing from Google to TB. Probably it's important to say that I subscribe to 16 google calendars (some are my private, some are shared, and some are public). It's difficult for me to reproduce the issue, as it seems to happen after a few days. The first thing that seems to break is when an event is deleted on Google's side (then it still exists in TB). But after some time the synchronization stops entirely, or almost entirely. When I click "synchronize", in the status bar I see synchronization messages, but in reality, the calendars are not synced from Google to TB. The other way (from TB to Google) sync is still OK. There are no messages in the developer console, so I cannot tell you more. Is there an option to enable better logging or something that can help us diagnose the issue? I had to stop using TB as my primary calendar because it's completely unreliable now :( UPDATE: I see two strange things in the logs, but they seem to be NOT correlated to sync problems (they happen just after re-subscribing, when the sync still works correctly, I think):
|
@kewisch, any updates on the issue? Can I help you somehow? |
Hello,
For the moment, I have another problem.
Could you please explain me how to delete the rigth column (Général
vCard) on my CardBook ?
…________________________________________________________
Michel Schatz
MosAiles
51 rue de la gare
57330 Zoufftgen
Tél : 00 33 (0)6 61 202 203
***@***.***
visitez notre sitehttps://www.mosailes.com
visitez notre sitehttps://shop.mosailes.com
Je pense environnement: ai-je vraiment besoin d’imprimer ce message ?
Save the Planet: Do I really need to print this email ?
Le 02/01/2023 à 14:42, jachoo a écrit :
Can you try re-subscribing to the calendar? If that doesn't work,
I will need a few more logs, e.g. these steps logged
1. re-subscribe the calendar and make sure it is synchronized (I
don't need the full logs here, just maybe the sync token)
2. create event in google calendar
3. click synchronize
@kewisch <https://github.com/kewisch>, any updates on the issue? Can I
help you somehow?
—
Reply to this email directly, view it on GitHub
<#498 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AGITWWKNMSVVP3Z4XTL3Y6DWQLLOBANCNFSM6AAAAAAQTVJURA>.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Same problem here: hours/days after restarting TB or disabling-enabling the add-on sync stops. |
This also happens to me on current stable release (both Windows and Linux). Are the debug steps from #498 (comment) still up-to-date? I'll try to collect them when it happens again. |
I've trying to understand the issue and I found a tiny modification of the add-on that -so far- has fixed the issue for me. Details in #497 (reply in thread) just in case somebody here wants to help testing it. |
I've managed to workaround the bug without rebuilding or reinstalling. Just run in the console (Tools -> Developer Tools -> Debug Addons -> Provide for Google Calendar -> Console) following line:
After executing this line, one must restart Thunderbird. From now, the calendar sync should work correctly. |
The side effect is the same, because that way |
This doesn't sound like a good idea. It might have severe performance implications. |
I don't agree. According to documentation (quoted below), idle time is a time when there is no keyboard/mouse activity. So if I'm using actively the computer, this command doesn't change anything in TB. But correctly workarounds the issue.
|
You'll be able to get more logs by setting calendar.debug.log and calendar.debug.log.verbose in the advanced config editor in Thunderbird. This will also let you see if you get the message The logic is simply there to reduce API calls and avoid hitting the API limit. Setting idleTime to 0 has no other negative effects. I'm curious if the idle time is a red herring though. In theory if you are using Thunderbird you should notice no difference. It should only start skipping syncs if you haven't used Thunderbird for 5 minutes. As soon as you hit sync, it should be up to date again. |
It happened again today. A colleague sent added me to an event. I clicked "Synchronize" in TB, but the event was not there (it was normally present in online GCal webpage). There's nothing interesting in the log. Not even When I restarted TB, the event appeared in the startup log:
|
The implementation is (or was) buggy. More info here: #497 (comment) |
After updating to 115.0.1 (and dropping the fix described in #497 (comment): i.e. removing this branch), the issue is back. Some time after I stopped using the computer, these are the last logged messages:
After that, clicks on 'Calendars > Synchronize' are silently ignored and events are not synchronized. |
There's a couple things I noticed that might be worthwhile. First off:
Anyways, that aside, I don't have enough context to understand what the correct fix would be, but there seems to be a suggested workaround of pasting the following into the terminal: await messenger.storage.local.set({"settings.idleTime": 0}) I just wanted to point out that this is unnecessarily complicated. Instead, go to Settings, search for "config editor" and you should see the following: This is the same thing as No console or restart of thunderbird required. In any case I hope that someone (maybe @kewisch or @nneul?) can look into providing a patch soon. This issue seems like it'd be straightforward enough given that the discussion around it suggests that it is only one branch condition causing the problem, but maybe I'm completely mistaken on that front. |
@kewisch finally I managed to add the breakpoint you suggested, but all I can see is |
The issue is already diagnosed in the following threads: #497 (comment) and #497 (comment) Probably there's no need to investigate this problem further. You can try to fix this if you have enough knowledge. I don't :( |
Disabling idle time is not a fix, and I'm not yet seeing how the listener isn't triggered in that flow. I'm open to hearing ideas on how to do a proper fix. In the meanwhile, we'll need to do some more debugging. I'm super busy at work at the moment, but hope to get back to this in November. The interesting piece from that first comment link is that if the listener is never called, then it won't actually replayChangesOn again. So indeed somewhere, there is a listener that isn't being called at the right time. @carlosabalde you might want to add some debug print statements with cal.LOG() and log when replayChangesOn is called, and maybe a wrapper around the listener to see when the listener is called. This might help narrow down where the missing listener call is. |
@carlosabalde wondering if you could take a look? The listener not being called is very promising, if we find out why and make sure it is called, we can finally fix this issue. |
I attempted it a few months ago, but I wasn't successful. Maybe it's not that challenging, but my total lack of JavaScript skills is hindering me here :/ |
Jachoo added this comment: The issue is already diagnosed in the following threads: #497 (comment) and #497 (comment)" |
I need to find the root cause of the issue, not simply disable a feature that happens to work around the issue. There is apparently a listener call that doesn't complete, which I thought was impossible, since I catch most of the calls and take action one way or another. If anyone else experiencing this could add a few log calls as noted in the prior comment I'd appreciate. |
TB 115.8.1 on Linux, provider 115.0.2, I now see this error right after starting TB:
The line mentioned in the stack trace is this one:
|
I believe that I have found the underlying cause of this issue, but I don't know the best way to fix it. The root cause is that the current calendar code does not like the listener The conflict is with the thunderbird codebase calCachedCalendar.synchronize. The calendar code assigns However, if the Honestly the core thunderbird code looks fragile and might be the better place to fix this, but as a proof of concept I added an extra delay in the (also willing to put together a pull request if someone can suggest a proper way to defer the result) diff --git a/src/legacy/modules/gdataCalendar.jsm b/src/legacy/modules/gdataCalendar.jsm
index b986f77..0224722 100644
--- a/src/legacy/modules/gdataCalendar.jsm
+++ b/src/legacy/modules/gdataCalendar.jsm
@@ -765,8 +765,14 @@ class calGoogleCalendar extends cal.provider.BaseClass {
if (maxIdleTime != 0 && idleTime > maxIdleTime) {
cal.LOG("[calGoogleCalendar] Skipping refresh since user is idle");
- aListener.onResult({ status: Cr.NS_OK }, null);
- return Promise.resolve();
+ var { setTimeout } = ChromeUtils.import("resource://gre/modules/Timer.jsm");
+ return new Promise(resolve => {
+ cal.LOG("[calGoogleCalendar] Sleeping for 1s");
+ setTimeout(resolve, 1000);
+ }
+ ).then((val) => {
+ aListener.onResult({ status: Cr.NS_OK }, null);
+ });
} |
If it is really that type of “zalgo” issue, then it should be sufficient to just move the call into a continuation of aListener.onResult({ status: Cr.NS_OK }, null);
return Promise.resolve(); becomes // Do not call onResult() until nextTick()!
return Promise.resolve().then(() => {
aListener.onResult({ status: Cr.NS_OK }, null);
}); As you said, the Mozilla code should itself be doing this for you so that it doesn’t matter if your own code runs synchronously or not. |
Let's give this a try. Version 115.3.0 is pending review on addons.thunderbird.net with @benjunmun 's fix. I'm going to leave this open for comments for a bit. You'll have to make sure you restart Thunderbird, not just update the add-on. Hoping very much this was it! |
I'm going to assume it works now, thank you again! |
@kewisch there appears to still be an issue reported on https://addons.thunderbird.net/en-US/thunderbird/addon/provider-for-google-calendar/reviews/. Do reviewers know about this repo, or do you check the reviews? I still cannot dismiss some events to which I have been invited and accepted or "maybe"ed the invitation. I can dismiss all events that I create. |
I'm not sure this issue is fixed; I'm still seeing calendar events in Thunderbird that were deleted from my Google Calendar over a year ago, even after manually asking Thunderbird to sync. |
On my end, I can confirm that the issue this report is about has been fixed for me — to reiterate, this issue was about the following:
This issue fixed the problem for me, i.e. restarting Thunderbird is not needed anymore to make it sync again. @stevepiercy and @NickNackGus , I think you are describing different issues which relate to sync problems which were not even fixed by a Thunderbird restart, i.e. these would warrant a new issue to my understanding. |
I'd agree the issues noted are separate issues. I don't regularly look at the reviews, but I do get email for new reviews so if something comes up many times and I have an idea what the issue might be I take a closer look. |
Hi @kewisch , thanks for all your great work! I was also affected from the synchronization issue, updated the provider to 115.3.0, and since then after starting Thunderbird and some days have passed, Thunderbird enters a non-responding state (my workstation is up 24/7). Thunderbird was working fine before, updating gdata-provider was the only thing I changed, that's why I'm assuming it to be correlated. |
Hello,
To synchronize my agenda with google agenda I need to reboot Thunderbird 102.1.2 (64 bits) under windows
Is it normal?
LOG ERRORS
The text was updated successfully, but these errors were encountered: