Sync failed: NoSuchElementException
Occasionally, DAVDroid produces error notifications reporting a failed synchronisation attempt, throwing a “NoSuchElementException”. The stacktrace indicates a problem with the okhttp3 library which is apparently unable to find a “healthy connection”.
Forcing a synchronisation manually afterwards causes no trouble.
I cannot provide steps to reproduce this error, as I couldn’t find how to trigger it on purpose. Nonetheless, here is the debug log: https://paste.gnugen.ch/raw/xZiP
Yes, this is a bug in a lib we use “okhttp”. It is already fixed in their master version and we will incorporate it within our next release.
Seems to happen only when the DNS doesn’t return results. Did you try another connection type (mobile/WiFi)?
More details: https://github.com/square/okhttp/issues/3308
Seems to happen only when the DNS doesn’t return results.
Did you try another connection type (mobile/WiFi)?
I indeed notice DNS lookup failures due to network connectivity issues from time to time. Retrying some seconds later on the same network or a different one indifferently solves the temporary issue.
I will wait for the fix handling such case in the library to be integrated into the application and report if the problem persists after upgrading.
Should be fixed with DAVdroid 1.5.2
The same kind of error showed up again with the latest version (1.5.2).
Here is the debug log: https://paste.gnugen.ch/raw/nvKB
Already open again in okhttp: https://github.com/square/okhttp/issues/3308