This issue is still ongoing, and it’s a real pain as I cannot use my calendar on the device. I am at the point where I will need to reinstall, which is just terrible to be honest, because it’s such a waste of time. I’ll try one more time and maybe you guys have an idea? cc. @devvv4ever @rfc2822
If DAVDroid and Firefox are both using the Android Sync Framework, and both are not syncing, then maybe the problem is with the sync framework. If I manually tell Firefox to run a sync, the logs will just show:
I FxAccounts: firefox :: FirefoxAccounts :: Requesting sync.
I FxAccounts: firefox :: FirefoxAccounts :: Sync options -- scheduling now: true
If I manually tell DAVDroid to sync, I get no log output. There is a toast saying “Synchronize now” for 5 seconds, but no progress indicator appears under the calendar/addressbook resources, as it would when an actual sync is running. This makes me think that maybe the same thing is happening, i.e. the sync is being scheduled, but then never executed.
I am not sure how the Android Sync Service works, or how to verify that it works. But I did stumble over this explanation of how Oreo changed wrt. background services, and since the problem started to appear after my upgrade to Oreo, I wonder if there is maybe a lead here? Could it be that DAVDroid is still using AlarmManager, rather than JobScheduler? A grep of the source code unfortunately revealed no matches for either.
I also found the following log entries during boot, which may well be related too:
11-30 10:44:29.552 4057 4057 W AlarmManagerEXT: Out of bounds, Allowed Values 1s ~ 3600s, Setting syncInterval : 300000
11-30 10:44:29.552 4057 4057 W AlarmManagerEXT: Out of bounds, Allowed Values 1s ~ 225s, Setting deltaFromTriggers : 10000
11-30 10:44:31.874 4057 4620 E Watchdog: !@Sync 0 [2018-11-30 10:44:31.874]
11-30 10:44:32.709 4057 4057 W ContextImpl: Calling a method in the system process without a qualified user: android.app.ContextImpl.startService:0 com.android.server.content.SyncManager$13.run:8 android.os.Handler.handleCallback:2 android.os.Handler.dispatchMessage:4 android.os.Looper.loop:139
At least the first two suggest that something is wrong with AlarmManager, which is somehow set to run every 300000s, which is almost 4 days. However, the last successful sync is now 6 days old.
So I am really at a loss, and would greatly appreciate any help or insights.