Thanks for your efforts, but this is a duplicate of #170.
CardDAV - Couldn't apply batch operation
soapernet last edited by rfc2822
I DAVx5 for serveral years and I have a new android device and I could’t sync anymore my contacts.
Error on DAVx5 when I try to sync the address book:
at.bitfire.vcard4android.ContactsStorageException: Couldn't apply batch operationdavx5-debug.zip
Error when I try to create a contact on android to CalDAV (empty address book):
android.database.sqlite.SQLiteException: near "adresses": syntax error (code 1 SQLITE_ERROR): , while compiling: SELECT * FROM settings WHERE account_name='Mon carnet d'adresses (email@example.com eg)' AND account_type='com.infomaniak.sync.address_book'
- Reset de device
- Use a fresh new address book
I haven’t any error with other device, so I don’t think the problem comes from the server, nor from the address book.
Mayby because the new storage access control on android 11 or on Realme devices.
DAVx5 version: 3.4, 3.4.01, 4.0b1
Android version: 11
Device: Realme GT 5G
All autorisations accorded
cardDAV server: infomaniak.com
@soapernet Are you using the cloned version of infomaniak?
It’s weird because
“AND account_type=‘com.infomaniak.sync.address_book’” would not be a value that the original DAVx5 would generate or use.
soapernet last edited by soapernet
You’r right, i also try with the app from infomaniak (ksync), (fork of davx5) and i’ve not noticed the difference of the error.
The correct error from DAVx5 when I try to create a contact on android was:
android.database.sqlite.SQLiteException: near "adresses": syntax error (code 1 SQLITE_ERROR): , while compiling: SELECT * FROM settings WHERE account_name='Mon carnet d'adresses (firstname.lastname@example.org eg)' AND account_type='at.bitfire.davdroid.address_book'
'in the account name. In theory, it should be possible, but the Android Contacts Provider sometimes doesn’t escape it properly.
Can you please try again with an account name without
soapernet last edited by
@rfc2822 Thank you for your message.
Yeah! it’s working!
It’s was simply the ’
I have again tried to reproduce the problem by creating accounts with
'and other quotation marks, but I couldn’t reproduce it. It seems that it occurs only in some very rare cases, and it’s an Android problem then.
So this can’t be fixed in DAVx⁵. We have thought about disallowing
'in account names, but because it works in the most cases and people might want to use
', we’ll let it as it is for now.