Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
wksantiago opened this issue Dec 24, 2023 Discussed in #508 · 36 comments
Assignees
Labels
bug Something isn't working urgent should be done soon

Comments

@wksantiago
Copy link

Discussed in #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
Copy link

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

@maximushugus
Copy link

Same here

@kslcsdalsadg
Copy link

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

@refugeindhamma
Copy link

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
Copy link

elea11 commented Dec 25, 2023

+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
Copy link
Member

ArnyminerZ commented Dec 25, 2023

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
Copy link
Member

ArnyminerZ commented Dec 25, 2023

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
Copy link

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

@ArnyminerZ
Copy link
Member

@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
Copy link

elea11 commented Dec 25, 2023

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
Copy link
Member

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
Copy link
Member

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

@kslcsdalsadg
Copy link

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
Copy link

kslcsdalsadg commented Dec 25, 2023

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
Copy link
Member

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
Copy link

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
Copy link
Member

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
Copy link
Member

ArnyminerZ commented Dec 25, 2023

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 rfc2822 self-assigned this Dec 25, 2023
@rfc2822 rfc2822 added bug Something isn't working urgent should be done soon labels Dec 25, 2023
@rfc2822
Copy link
Member

rfc2822 commented Dec 25, 2023

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

  • Reproducible when I manually generate a release APK of 4.3.12
  • Not reproducible when I manually generate a release APK of 4.3.11
  • Responsible commit seems to be 3eb8eba

Seems to work without minifyEnabled (ProGuard/R8)

@danez
Copy link

danez commented Dec 25, 2023

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
Copy link
Member

rfc2822 commented Dec 25, 2023

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

@rfc2822 rfc2822 reopened this Dec 25, 2023
@kslcsdalsadg
Copy link

@ 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
Copy link

elea11 commented Dec 25, 2023

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

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

@rfc2822
Copy link
Member

rfc2822 commented Dec 25, 2023

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

@devvv4ever
Copy link
Member

devvv4ever commented Dec 25, 2023

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
Copy link

@ 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
Copy link

MarkyMarkDE commented Dec 25, 2023

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
Copy link

MarkyMarkDE commented Dec 25, 2023

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
Copy link

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

@wksantiago
Copy link
Author

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

@bunk3m
Copy link

bunk3m commented Dec 26, 2023

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

@Gerdfs
Copy link

Gerdfs commented Dec 27, 2023

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
Copy link

olgabaranov commented Dec 27, 2023

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
Copy link
Member

rfc2822 commented Dec 27, 2023

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
Copy link

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
Copy link

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

rfc2822 pushed a commit that referenced this issue Jan 8, 2024
…eAT/davx5#512)

* Update to AGP 8.2.1
* Add keep rule for javax.xml.namespace.QName

See #511
Closes bitfireAT/davx5#499
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working urgent should be done soon
Projects
None yet
Development

No branches or pull requests