or commiting the transaction after every 10 contacts
Sounds more suitable to me, as this is the real problem (as far as I understand) but you are the one, who knows the code 😉
Well, problems solved!
Linux Mint 19 which I’m using distributes Radicale 1.1.6, when the current version is 3.0 !.. So I completely removed the packages and installed through python as instructed on the Radicale website.
For future reference:
I hope this will help other newbies!
Bottom line: the color is OK in DAVx5 and Etar. In Evolution and Simple Calendar it’s not (it may have been corrected in Simple Calendar Pro).
@LL Great!
Most other clients don’t have a resource detection like DAVx5 has. In these clients you must point them directly to the respective URLs that represent the calendar/addressbook.
I’m facing another problem. Let me recall the setup: Radicale server on a Linux laptop, DAVx5 on an Android 8.1 phone. I want to interconnect them in two possible ways: at home they are both connected to a Wifi router; when roaming the laptop connects to the phone used as access point (AP).
The difficulty is the subnets have different IPs in the two situations. At home both devices are 192.168.1.x ; in the phone AP the latop is 192.168.43.y . The Wifi router subnet number cannot be changed; for the phone AP subnet I don’t know (the phone is not rooted).
I thought “whatever, I’ll use named URLs”. I point DAVx5 to http://coulomb:5232/ (coulomb is the hostname of the laptop). In the Wifi router subnet it works. But when the laptop is connected to the phone AP it doesn’t. The phone DNS seems OK because if I run host coulomb 192.168.43.1
this gives the correct IP (obtained from 192.168.43.1#53). Here is the log of DAVx5 for the failed sync (I trimmed the collection which I believe to be irrelevant):
--- BEGIN DEBUG INFO ---
SYNCHRONIZATION INFO
Account: Account {name=-, type=bitfire.at.davdroid}
Authority: com.android.calendar
EXCEPTION
java.net.UnknownHostException: Unable to resolve host "coulomb": No address associated with hostname
at java.net.Inet6AddressImpl.lookupHostByName(Inet6AddressImpl.java:111)
at java.net.Inet6AddressImpl.lookupAllHostAddr(Inet6AddressImpl.java:90)
at java.net.InetAddress.getAllByName(InetAddress.java:787)
at okhttp3.Dns$Companion$DnsSystem.lookup(Dns.kt:1)
at okhttp3.internal.connection.ExchangeFinder.findHealthyConnection(ExchangeFinder.kt:67)
at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.kt:20)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:14)
at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.kt:213)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:14)
at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.kt:38)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:14)
at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.kt:35)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:14)
at okhttp3.logging.HttpLoggingInterceptor.intercept(HttpLoggingInterceptor.kt:52)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:14)
at okhttp3.brotli.BrotliInterceptor.intercept(BrotliInterceptor.kt:31)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:14)
at okhttp3.internal.connection.RealCall.getResponseWithInterceptorChain$okhttp(RealCall.kt:25)
at okhttp3.internal.connection.RealCall.execute(RealCall.kt:13)
at at.bitfire.dav4jvm.DavResource$propfind$2.invoke(DavResource.kt:19)
at at.bitfire.dav4jvm.DavResource$propfind$2.invoke(DavResource.kt:1)
at at.bitfire.dav4jvm.DavResource.followRedirects$build(DavResource.kt:1)
at at.bitfire.dav4jvm.DavResource.propfind(DavResource.kt:10)
at at.bitfire.davdroid.syncadapter.CalendarSyncManager$queryCapabilities$1.invoke(CalendarSyncManager.kt:3)
at at.bitfire.davdroid.syncadapter.CalendarSyncManager$queryCapabilities$1.invoke(CalendarSyncManager.kt:1)
at at.bitfire.davdroid.syncadapter.SyncManager.remoteExceptionContext(SyncManager.kt:1)
at at.bitfire.davdroid.syncadapter.SyncManager.remoteExceptionContext(SyncManager.kt:8)
at at.bitfire.davdroid.syncadapter.CalendarSyncManager.queryCapabilities(CalendarSyncManager.kt:1)
at at.bitfire.davdroid.syncadapter.SyncManager$performSync$1.invoke(SyncManager.kt:6)
at at.bitfire.davdroid.syncadapter.SyncManager$performSync$1.invoke(SyncManager.kt:1)
at at.bitfire.davdroid.syncadapter.SyncManager.unwrapExceptions(SyncManager.kt:1)
at at.bitfire.davdroid.syncadapter.SyncManager.performSync(SyncManager.kt:5)
at at.bitfire.davdroid.syncadapter.CalendarsSyncAdapterService$CalendarsSyncAdapter.sync(CalendarsSyncAdapterService.kt:14)
at at.bitfire.davdroid.syncadapter.SyncAdapterService$SyncAdapter.onPerformSync(SyncAdapterService.kt:13)
at android.content.AbstractThreadedSyncAdapter$SyncThread.run(AbstractThreadedSyncAdapter.java:321)
REMOTE RESOURCE
http://coulomb:5232/any/87e6ddbb-7bf0-1619-b12a-ce6b01e80315/
SOFTWARE INFORMATION
┌────────────────────────────────┬──────────────────────────┬────────────┬─────────────────────────────────────┬───────┐
│ Package │ Version │ Code │ Installer │ Notes │
├────────────────────────────────┼──────────────────────────┼────────────┼─────────────────────────────────────┼───────┤
│ at.bitfire.davdroid │ 3.3.4.1-ose │ 303040100 │ com.google.android.packageinstaller │ │
│ org.dmfs.tasks │ 1.2.4 │ 78500 │ com.google.android.packageinstaller │ │
│ com.android.providers.contacts │ 8.1.0 │ 27 │ — │ │
│ com.android.providers.calendar │ 8.1.0 │ 27 │ — │ │
│ com.android.contacts │ 1.7.10 │ 10710 │ — │ │
│ com.google.android.calendar │ 5.8.34-198051655-release │ 2015821617 │ — │ │
│ ws.xsoh.etar │ 1.0.23 │ 25 │ com.google.android.packageinstaller │ │
│ com.mobisystems.fileman │ 6.12.37871 │ 37871 │ com.android.vending │ │
└────────────────────────────────┴──────────────────────────┴────────────┴─────────────────────────────────────┴───────┘
SYSTEM INFORMATION
Android version: 8.1.0 (ECHO_FEELING_V01_20180821)
Device: ECHO FEELING (FEELING)
CONNECTVITY
☒ [ Transports: CELLULAR Capabilities: INTERNET NOT_RESTRICTED TRUSTED NOT_VPN VALIDATED FOREGROUND LinkUpBandwidth>=51200Kbps LinkDnBandwidth>=102400Kbps Specifier: <1>]
Data saver: disabled
CONFIGURATION
Power saving disabled: no
System-wide synchronization: automatically
Notifications:
- sync
- syncProblems: importance=3
- general: importance=3
- debug: importance=4
- syncIoErrors: importance=1
- syncWarnings: importance=2
Permissions:
- ACCESS_NETWORK_STATE: granted
- ACCESS_WIFI_STATE: granted
- INTERNET: granted
- READ_SYNC_SETTINGS: granted
- READ_SYNC_STATS: granted
- WRITE_SYNC_SETTINGS: granted
- REQUEST_IGNORE_BATTERY_OPTIMIZATIONS: granted
- READ_CONTACTS: granted
- WRITE_CONTACTS: granted
- READ_CALENDAR: granted
- WRITE_CALENDAR: granted
- ACCESS_COARSE_LOCATION: denied
- ACCESS_FINE_LOCATION: denied
- ACCESS_BACKGROUND_LOCATION: denied
- org.dmfs.permission.READ_TASKS: granted
- org.dmfs.permission.WRITE_TASKS: granted
- org.tasks.permission.READ_TASKS: denied
- org.tasks.permission.WRITE_TASKS: denied
ACCOUNTS
- Account: -
┌──────────────────────────────────┬────────────┬──────────────────────┬───────────────┐
│ Authority │ isSyncable │ getSyncAutomatically │ Sync interval │
├──────────────────────────────────┼────────────┼──────────────────────┼───────────────┤
│ at.bitfire.davdroid.addressbooks │ 1 │ false │ 240 min │
│ com.android.calendar │ 1 │ false │ 240 min │
│ com.android.contacts │ 0 │ false │ — │
│ org.dmfs.tasks │ 1 │ false │ 240 min │
└──────────────────────────────────┴────────────┴──────────────────────┴───────────────┘
WiFi only: false
Contact group method: CATEGORIES
Time range (past days): 90
Default alarm (min before): null
Manage calendar colors: true
Use event colors: false
* Address book: répertoire (- Gw)
┌────────────┬──────────────────────┬───────────────┐
│ isSyncable │ getSyncAutomatically │ Sync interval │
├────────────┼──────────────────────┼───────────────┤
│ 1 │ true │ 1440 min │
└────────────┴──────────────────────┴───────────────┘
URL: http://coulomb:5232/any/280916a1-8333-f36a-fac0-5e7d2eed2531/
Read-only: 0
DATABASE DUMP
android_metadata
┌────────┐
│ locale │
├────────┤
│ fr_FR │
└────────┘
service
┌────┬─────────────┬─────────┬──────────────────────────┐
│ id │ accountName │ type │ principal │
├────┼─────────────┼─────────┼──────────────────────────┤
│ 7 │ - │ carddav │ http://coulomb:5232/any/ │
│ 8 │ - │ caldav │ http://coulomb:5232/any/ │
└────┴─────────────┴─────────┴──────────────────────────┘
sqlite_sequence
┌────────────┬─────┐
│ name │ seq │
├────────────┼─────┤
│ service │ 8 │
│ homeset │ 8 │
│ collection │ 21 │
└────────────┴─────┘
homeset
┌────┬───────────┬──────────────────────────┬──────────┬─────────────┐
│ id │ serviceId │ url │ privBind │ displayName │
├────┼───────────┼──────────────────────────┼──────────┼─────────────┤
│ 7 │ 7 │ http://coulomb:5232/any/ │ 1 │ — │
│ 8 │ 8 │ http://coulomb:5232/any/ │ 1 │ — │
└────┴───────────┴──────────────────────────┴──────────┴─────────────┘
collection
<snip>
room_master_table
┌────┬──────────────────────────────────┐
│ id │ identity_hash │
├────┼──────────────────────────────────┤
│ 42 │ a7554d1ebc5ecfe0c7aefe271485d63c │
└────┴──────────────────────────────────┘
APP SETTINGS
1. SharedPreferencesProvider canWrite=true
┌───────────────────────────┬───────────────┐
│ Setting │ Value │
├───────────────────────────┼───────────────┤
│ distrust_system_certs │ false │
│ hint_BatteryOptimizations │ false │
│ log_to_file │ true │
│ override_proxy │ false │
│ override_proxy_host │ localhost │
│ override_proxy_port │ 8118 │
│ time_nextDonationPopup │ 1611923475688 │
└───────────────────────────┴───────────────┘
2. DefaultsProvider canWrite=false
┌───────────────────────┬───────────┐
│ Setting │ Value │
├───────────────────────┼───────────┤
│ distrust_system_certs │ false │
│ override_proxy │ false │
│ override_proxy_host │ localhost │
│ override_proxy_port │ 8118 │
└───────────────────────┴───────────┘
--- END DEBUG INFO ---
Thanks for any help!
@LL said in Local sync between phone and laptop:
The phone DNS seems OK because if I run
host coulomb 192.168.43.1
this gives the correct IP
Did you run the host command on the phone (where DAVx5 runs)?
DAVx5 uses okhttp, which uses the system DNS to resolve the host names. So nothing special…
@rfc2822 no I ran it on the laptop. Is it possible to run such commands on a non rooted phone? With adb maybe?
@LL adb shell, and nslookup/host should be there
adb shell → I have neither nslookup nor host…
But ping coulomb
answers “unknown host”, so it looks like the phone cannot use its own DNS ?
@LL Sounds reasonable, because DAVx5 uses the same DNS. So DAVx5 should work when ping works and in the other direction.
Maybe coulomb.domain?
I finally solved this last problem. I posted it on SE: https://android.stackexchange.com/questions/230983/the-phone-as-hotspot-doesnt-use-its-own-dns/231206#231206
It turns out this is expected behavior: the phone as a DNS client doesn’t use the DNS server it runs.
However I installed Virtual Hosts which allows to define custom hosts entries without rooting the phone. The app is really easy to switch on/off, so I’ll be able to use it only when I sync DAVx5 (which I do manually only) through the phone access point.
Happy syncing!