bitfireAT / davx5-ose

DAVx⁵ is an open-source CalDAV/CardDAV suite and sync app for Android. You can also access your online files (WebDAV) with it.
https://www.davx5.com
GNU General Public License v3.0
1.3k stars 70 forks source link

Getting: EXCEPTION java.lang.NoClassDefFoundError: at.bitfire.vcard4android.property.CustomScribes #511

Closed wksantiago closed 5 months ago

wksantiago commented 5 months ago

Discussed in https://github.com/bitfireAT/davx5-ose/discussions/508

Originally posted by **wksantiago** December 24, 2023 Getting EXCEPTION java.lang.NoClassDefFoundError: at.bitfire.vcard4android.property.CustomScribes when syncing from Nextcloud to android and getting no contacts over This happened after the upgrade
Rorschach1010 commented 5 months ago

Same here, this update somehow broke contacts sync with nextcloud. Calendar sync is working fine. Downgrading fixes the issue.

maximushugus commented 5 months ago

Same here

kslcsdalsadg commented 5 months ago

+1 can't sync with NextCloud when a contact is updated at server side or can't add a new account

refugeindhamma commented 5 months ago

Same. I added a new contact and when syncing, it gave me this error. After I removed the new contact, the sync goes fine.

elea11 commented 5 months ago

+1 Also it only syncs a small part of my nextcloud contacts. Posted the exception below. If detailed logs are needed I can strip the personal info and add it. But had the feeling that this might suffice.

EXCEPTION

java.lang.NoSuchFieldError: No field emptyString of type Ljava/lang/String; in class Ljavax/xml/namespace/QName; or its superclasses (declaration of 'javax.xml.namespace.QName' appears in /apex/com.android.art/javalib/core-libart.jar)
    at ezvcard.io.scribe.VCardPropertyScribe.<init>(VCardPropertyScribe.java:3)
    at ezvcard.io.scribe.DateOrTimePropertyScribe.<init>(DateOrTimePropertyScribe.java:1)
    at at.bitfire.vcard4android.property.XAbDate$Scribe.<init>(XAbDate.kt:5)
    at at.bitfire.vcard4android.property.XAbDate$Scribe.<clinit>(XAbDate.kt:3)
    at at.bitfire.vcard4android.property.CustomScribes.<clinit>(CustomScribes.kt:13)
    at at.bitfire.vcard4android.Contact$Companion.fromReader(Contact.kt:37)
    at at.bitfire.davdroid.syncadapter.ContactsSyncManager.processCard(ContactsSyncManager.kt:26)
    at at.bitfire.davdroid.syncadapter.ContactsSyncManager.access$processCard(ContactsSyncManager.kt:1)
    at at.bitfire.davdroid.syncadapter.ContactsSyncManager$downloadRemote$1$1$1.invoke(ContactsSyncManager.kt:10)
    at at.bitfire.davdroid.syncadapter.ContactsSyncManager$downloadRemote$1$1$1.invoke(ContactsSyncManager.kt:1)
    at at.bitfire.davdroid.syncadapter.SyncManager.responseExceptionContext(SyncManager.kt:13)
    at at.bitfire.davdroid.syncadapter.ContactsSyncManager$downloadRemote$1.invoke$lambda$0(ContactsSyncManager.kt:22)
    at at.bitfire.davdroid.syncadapter.ContactsSyncManager$downloadRemote$1.$r8$lambda$aTmx16DT01n3ZmMyYWepKV6Txjc(ContactsSyncManager.kt:1)
    at at.bitfire.davdroid.syncadapter.ContactsSyncManager$downloadRemote$1$$ExternalSyntheticLambda0.onResponse(R8$$SyntheticClass:3)
    at at.bitfire.dav4jvm.Response$Companion.parse(Response.kt:305)
    at at.bitfire.dav4jvm.DavResource.processMultiStatus$parseMultiStatus(DavResource.kt:51)
    at at.bitfire.dav4jvm.DavResource.processMultiStatus(DavResource.kt:16)
    at at.bitfire.dav4jvm.DavResource.processMultiStatus(DavResource.kt:9)
    at at.bitfire.dav4jvm.DavAddressBook.multiget(DavAddressBook.kt:69)
    at at.bitfire.davdroid.syncadapter.ContactsSyncManager$downloadRemote$1.invoke(ContactsSyncManager.kt:10)
    at at.bitfire.davdroid.syncadapter.ContactsSyncManager$downloadRemote$1.invoke(ContactsSyncManager.kt:1)
    at at.bitfire.davdroid.syncadapter.SyncManager.remoteExceptionContext(SyncManager.kt:1)
    at at.bitfire.davdroid.syncadapter.SyncManager.remoteExceptionContext(SyncManager.kt:5)
    at at.bitfire.davdroid.syncadapter.ContactsSyncManager.downloadRemote(ContactsSyncManager.kt:46)
    at at.bitfire.davdroid.syncadapter.SyncManager$syncRemote$1$download$1.invokeSuspend(SyncManager.kt:14)
    at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:9)
    at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:111)
    at kotlinx.coroutines.EventLoopImplBase.processNextEvent(EventLoop.common.kt:143)
    at kotlinx.coroutines.BuildersKt.runBlocking(Unknown Source:105)
    at kotlinx.coroutines.BuildersKt.runBlocking$default(Unknown Source:3)
    at at.bitfire.davdroid.syncadapter.SyncManager.syncRemote(SyncManager.kt:39)
    at at.bitfire.davdroid.syncadapter.SyncManager$performSync$1.invoke(SyncManager.kt:26)
    at at.bitfire.davdroid.syncadapter.SyncManager$performSync$1.invoke(SyncManager.kt:1)
    at at.bitfire.davdroid.syncadapter.SyncManager.unwrapExceptions(SyncManager.kt:2)
    at at.bitfire.davdroid.syncadapter.SyncManager.performSync(SyncManager.kt:20)
    at at.bitfire.davdroid.syncadapter.ContactSyncer.sync(ContactSyncer.kt:221)
    at at.bitfire.davdroid.syncadapter.Syncer.onPerformSync(Syncer.kt:122)
    at at.bitfire.davdroid.syncadapter.SyncWorker$doWork$2$1$1.invoke(SyncWorker.kt:3)
    at at.bitfire.davdroid.syncadapter.SyncWorker$doWork$2$1$1.invoke(SyncWorker.kt:1)
    at kotlinx.coroutines.InterruptibleKt$runInterruptible$2.invokeSuspend(Interruptible.kt:59)
    at kotlinx.coroutines.InterruptibleKt$runInterruptible$2.invoke(Interruptible.kt:13)
    at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:5)
    at kotlinx.coroutines.BuildersKt.withContext(Unknown Source:41)
    at kotlinx.coroutines.InterruptibleKt.runInterruptible$default(Interruptible.kt:9)
    at at.bitfire.davdroid.syncadapter.SyncWorker$doWork$2.invokeSuspend(SyncWorker.kt:502)
    at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:9)
    at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:111)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644)
    at java.lang.Thread.run(Thread.java:1012)
ArnyminerZ commented 5 months ago

Procedure to test:

  1. Add an account to DAVx5
  2. Enable the synchronization of an addressbook
  3. Add a contact from the contacts app
  4. Run synchronization

Tested with:

Device API Level Error?
Xiaomi Mi A2 29 No
Emulator 31 No

I've not been able to reproduce on new devices, however, my tablet is throwing a similar error, but with ezvcard.io.scribe.ScribeIndex, I think it's the same issue.

Some debug information: debug-info.zip

I can also confirm that the error is not temporal. It happens all the time when trying to synchronize after having modified a contact.

More logs: logcat.txt

ArnyminerZ commented 5 months ago

Reinstalling the app fixes the issue for some reason, at least for me, though it's not ideal.

Edit: it did not fix it. Which fixed the issue is installing the master branch compiled directly.

MichaelZ4714 commented 5 months ago

For me the error is java.lang.NoSuchFieldError: No field emptyString of type Ljava/lang/String Details: davx5-debug.zip

ArnyminerZ commented 5 months ago

@MichaelZ4714 thanks for the logs. I can confirm the stacktrace of the error is the same for everybody. See the comment by @elea11 above

elea11 commented 5 months ago

Reinstalling the app fixes the issue for some reason, at least for me, though it's not ideal.

For me, it didn't, unfortunately. Even removed my nextcloud account completely and started from scratch.

ArnyminerZ commented 5 months ago

For me, it didn't, unfortunately. Even removed my nextcloud account completely and started from scratch.

Okay, that's good, at least we have some consistency.

ArnyminerZ commented 5 months ago

vcard4android was updated on a27a4fc7aef2927fc6e61a37996ac905e6c4bf95, which I believe was released on v4.3.11-alpha.2, but I will futher dig into it.

kslcsdalsadg commented 5 months ago

Reinstalling the app fixes the issue for some reason, at least for me, though it's not ideal.

Reinstalling the app doesn't solves the issue for me

kslcsdalsadg commented 5 months ago

Procedure to test:

  1. Add an account to DAVx5
  2. Enable the synchronization of an addressbook
  3. Add a contact from the contacts app
  4. Run synchronization

Tested with:

Device API Level Error? Xiaomi Mi A2 29 No Emulator 31 No I've not been able to reproduce on new devices, however, my tablet is throwing a similar error, but with ezvcard.io.scribe.ScribeIndex, I think it's the same issue.

Some debug information: debug-info.zip

I can also confirm that the error is not temporal. It happens all the time when trying to synchronize after having modified a contact.

More logs: logcat.txt

The issue is with NextCloud accounts. Steps to reproduce: 1) Install 4.3.12-oss 2) Add a Nextcloud account 3) Check the sync contacts checkbox 4) Start sync After a while the sync error is displayed at notifications list

image

ArnyminerZ commented 5 months ago

The only thing modified on vcard4android since the last update was something about timezones (changes). Shouldn't be related, but I will do some tests now to see if this has something to do.

Rorschach1010 commented 5 months ago

Maybe it's an issue on newer Android versions? I'm on A14 and getting exactly the same error like @robertoprubio with the emptystring.

ArnyminerZ commented 5 months ago

Maybe it's an issue on newer Android versions?

For me it's only happening on Android 10 on my tablet. My Pixel 6a running A14 works perfectly, so I think it's not related to the version of Android

ArnyminerZ commented 5 months ago

Okay, I have managed to reproduce the error. Looks like it's a problem with the compiled APK, there's no code issue. Maybe some corruption happened in the compilation process. I think the fix is simple, recompile and release this version again @rfc2822.

To reproduce (just for internal reference), I have taken the compiled AAB, extracted everything with bundletool:

bundletool build-apks --bundle=file.aab --output=release.apks

Then uninstalled the current version:

adb uninstall at.bitfire.davdroid

And installed the new one:

bundletool install-apks --apks=release.apks

After doing that, add the Nextcloud account, and synchronize, the exception occurs.

Update:

The same can be reproduced with the public APK. Steps:

  1. Install the OSE release from Github.
  2. Add a new account, and enable an addressbook.
  3. The error is thrown.

[!NOTE] The error is not thrown if the app is installed directly after compiling, instead of taking the built version, and the error shows that there's a class missing. That's why I think the APK is corrupt, or maybe proguard removed some files accidentally.

What still bothers me is that I'm not having this issue on my phone, only on my tablet, and they are running the same DAVx5 compilation.

rfc2822 commented 5 months ago

Happens for -ose and -gplay, reproducible on all our devices. So extremly urgent

Seems to work without minifyEnabled (ProGuard/R8)

danez commented 5 months ago

Happens here too with a mailbox.org account qith the version from gplay:

java.lang.NoClassDefFoundError: ezvcard.io.scribe.ScribeIndex
    at ezvcard.io.StreamWriter.<init>(StreamWriter.java:4)
    at ezvcard.io.text.VCardWriter.<init>(VCardWriter.java:1)
rfc2822 commented 5 months ago

@ All: Can you please verify that 4.3.12.1 is working again?

kslcsdalsadg commented 5 months ago

@ All: Can you please verify that 4.3.12.1 is working again?

Tried in a Redmi Note 9S (A12) and in a Pixel 7 Pro (A14, GrapheneOS) and working perfectly in both devices. Thanks!

elea11 commented 5 months ago

@ All: Can you please verify that 4.3.12.1 is working again?

Works here again now. A14 QPR Beta. Pixel 7.

rfc2822 commented 5 months ago

Now we will have to find out why the problems occur with AGP 8.2.0 but not with AGP 8.1.4 …

devvv4ever commented 5 months ago

Hotfix contained in 4.3.12.1 has been released in all stores now. It usually takes a while until the store owners approve it and until f-droid builds the hotfixed version.

MichaelZ4714 commented 5 months ago

@ All: Can you please verify that 4.3.12.1 is working again?

It works for me again with the hotfix on A14 crDroid 10 and A13 crDroid 9.11. Have many thanks! It was not that urgent for me personally because I used the quick fix go back to 4.3.11.

MarkyMarkDE commented 5 months ago

Same problem since today, have did all I can. Uninstall the beta, clean my Pixel7 and install the latest stable from Playstore and set up my account fresh. Nothing changed.

Pixel7 Android 14 latest Patch not rooted DAVX5 4.3.12-gplay

MarkyMarkDE commented 5 months ago

This version works for me too. https://github.com/bitfireAT/davx5-ose/releases/tag/v4.3.12.1-ose But as I installed this version I got a curious popup in advance with Google Playstore or something and this I have to accept ... Is this normal?

Thank you for the quick fix as on Christmas, the is not usual! Thank you really much and enjoy Christmas now. 😊

Rorschach1010 commented 5 months ago

Like everyone, I can confirm that the hotfix is working fine. Thanks for the quick fix @everyone involved.

wksantiago commented 5 months ago

Yes the update worked all OK thanks for the quick community support

bunk3m commented 5 months ago

Update works for me also. Thanks for the quick fix!

Gerdfs commented 5 months ago

As I was also affected by this issue I can confirm the update's working fine, until now, thank you for that ! As I installed originally from F-Froid store the apk install caused trouble, so I uninstalled the F-Droid version, then I could install the apk. Unfortunately my profile was also deleted, so I had to reconnect with my credentials, but no problem.

Edit: I'm using a Baikal Server.

olgabaranov commented 5 months ago

Fix did not work when syncing with posteo.de . Log below CalDavBug.txt Edit: the update date in Fdroid led me astray there. Works with the newest version

rfc2822 commented 5 months ago

Fix did not work when syncing with posteo.de . Log below

You're still using 4.3.12. The problem is fixed in 4.3.12.1

exstntlmsnthrp commented 5 months ago

I agree with many others here, the 4.3.12.1-ose version is fixed on A14 for both Nextcloud and mailbox.org. No more problems, cheers!

sogutwie commented 5 months ago

I just updated to 4.3.12.1-ose via F-Droid and it worked fine even with posteo.de. Thanks!