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

LocalCalendarTest sometimes fails with FileNotFoundException #985

Closed
rfc2822 opened this issue Aug 17, 2024 · 3 comments
Closed

LocalCalendarTest sometimes fails with FileNotFoundException #985

rfc2822 opened this issue Aug 17, 2024 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@rfc2822
Copy link
Member

rfc2822 commented Aug 17, 2024

Tests sometimes fail with:


Time: 20.003
> Task :app:virtualOseDebugAndroidTest
There was 1 failure:
1) at.bitfire.davdroid.resource.LocalCalendarTest
java.io.FileNotFoundException
	at at.bitfire.ical4android.AndroidCalendar$Companion.findByID(AndroidCalendar.kt:136)
	at at.bitfire.davdroid.InitCalendarProviderRule.initCalendarProvider(InitCalendarProviderRule.kt:75)
	at at.bitfire.davdroid.InitCalendarProviderRule.before(InitCalendarProviderRule.kt:66)
	at org.junit.rules.ExternalResource$1.evaluate(ExternalResource.java:50)
	at androidx.test.rule.GrantPermissionRule$RequestPermissionStatement.evaluate(GrantPermissionRule.java:150)
	at org.junit.rules.RunRules.evaluate(RunRules.java:20)
	at org.junit.rules.RunRules.evaluate(RunRules.java:20)
	at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
	at org.junit.runners.Suite.runChild(Suite.java:128)
	at org.junit.runners.Suite.runChild(Suite.java:27)
	at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
	at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
	at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
	at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
	at org.junit.runner.JUnitCore.run(JUnitCore.java:115)
	at androidx.test.internal.runner.TestExecutor.execute(TestExecutor.java:68)
	at androidx.test.internal.runner.TestExecutor.execute(TestExecutor.java:59)
	at androidx.test.runner.AndroidJUnitRunner.onStart(AndroidJUnitRunner.java:463)
	at android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:2402)

FAILURES!!!
Tests run: 133,  Failures: 1


Logcat of last crash: 
Process: at.bitfire.davdroid.test, PID: 2014
java.lang.NoClassDefFoundError: Failed resolution of: Lkotlin/jvm/functions/Function0;
	at java.lang.Class.newInstance(Native Method)
	at android.app.AppComponentFactory.instantiateService(AppComponentFactory.java:129)
	at android.app.ActivityThread.handleCreateService(ActivityThread.java:4626)
	at android.app.ActivityThread.-$$Nest$mhandleCreateService(Unknown Source:0)
	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2264)
	at android.os.Handler.dispatchMessage(Handler.java:106)
	at android.os.Looper.loopOnce(Looper.java:205)
	at android.os.Looper.loop(Looper.java:294)
	at android.app.ActivityThread.main(ActivityThread.java:8177)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:552)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:971)
Caused by: java.lang.ClassNotFoundException: Didn't find class "kotlin.jvm.functions.Function0" on path: DexPathList[[zip file "/data/app/~~JU8okUQBWELkBM--8lsCoA==/at.bitfire.davdroid.test-ANMhccf5FVg9E6TbNUQ7LQ==/base.apk"],nativeLibraryDirectories=[/data/app/~~JU8okUQBWELkBM--8lsCoA==/at.bitfire.davdroid.test-ANMhccf5FVg9E6TbNUQ7LQ==/lib/x86_64, /data/app/~~JU8okUQBWELkBM--8lsCoA==/at.bitfire.davdroid.test-ANMhccf5FVg9E6TbNUQ7LQ==/base.apk!/lib/x86_64, /system/lib64, /system_ext/lib64]]
	at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:259)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
	... 12 more

They usually work when trying again.

@rfc2822 rfc2822 added the bug Something isn't working label Aug 17, 2024
@sunkup
Copy link
Member

sunkup commented Sep 3, 2024

Might have to do with PR #957 . Don't know why really, but that's the last time we changed something in InitCalendarProviderRule and LocalCalendar.

Or maybe ical4android commit 86af14d. Probably not.

@sunkup sunkup linked a pull request Sep 4, 2024 that will close this issue
4 tasks
@rfc2822
Copy link
Member Author

rfc2822 commented Sep 6, 2024

It's really annoying, almost in every PR now…

@rfc2822
Copy link
Member Author

rfc2822 commented Sep 6, 2024

May be worked around by #1007 – re-open if the problem persists

@rfc2822 rfc2822 closed this as completed Sep 6, 2024
@github-project-automation github-project-automation bot moved this from Todo to Done in DAVx⁵ Releases Sep 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants