CalDAV sync doesn't honor WLAN restriction

  • @devvv4ever Yes, of course, device was last rebooted 57 hours ago. As a side note: My local network’s DHCP server only supports IPv4. If I’m at home in my WLAN the sync works as expected. But when out of home, with only mobile network available or connected to different WLANs, no sync should be done, because I have restricted DAVx5 to WLAN access only and my home SSID in addition.

  • developer

    The WiFi check is only ignored when do you manual syncs, i.e. the “manual” flag is set. Some versions of some calendar apps are known to set the “manual” flag even if there’s no manual sync. Maybe that’s the reason?

    You can see it in the verbose DAVx5 logs. Please provide the whole logs of a failed synchronization, not only the debug info.

  • I’m using Simple Calendar ( V. 6.9.3.
    I have now:

    • switched off WLAN on my phone
    • rebooted phone
    • switched on verbose log in DAVx5
    • opened Simple Calendar
      In the moment when opening Simple Calendar the notification “Network or I/O Error - Unable to resolve host…” appears.
    • sent verbose log

    Verbose log is available at:

  • developer

    Thanks! As you can see here:

    2020-05-20 22:02:20 229 [syncadapter.SyncAdapterService] sync of Account {name=olaf_kalender,} has been initiated
    PARAMETER #0 = ignore_settings, force, expedited, ignore_backoff

    the sync was triggered with “force”, “expedited” and “ignore_settings” flags. This means that the sync was initiated manually and should thus ignore settings like WiFi restrictions.

    Possibly there’s an option for that in your calendar app. Otherwise, please contact the calendar app about this.

  • developer

    Looks like these flags are set here in refreshCalDAVCalendars. So, the calendar app forces DAVx5 to do an immediate sync, which fails when the network is not available.

    In my opinion, such a refresh should not set the manual flag (expedited should be OK).

  • OK, thank you very much. I found no setting in Simple Calendar to disable this behaviour. Iwill try to verify this with Etar and open a bug report on Simple Calendar.

  • developer


    Could you verify the solution?

  • Yes, the problem doesn’t exist with Etar.
    I’m not a developer, but I’m curious: I found similiar code in Etar’s source too. But it seems Etar does a manual sync only on explicit menu action “Aktualisieren”, but not on the scheduled syncs configured in DAVx5.

  • developer

    Nice. When you report this to Simple Calendar, please provide a link here for reference, too.

  • Issue opened on, referencing this thread.

Similar topics