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

Ljava/lang/annotation/Inherited; annotation is not found in the test output #37

Open
bootstraponline opened this Issue Apr 5, 2019 · 2 comments

Comments

Projects
None yet
3 participants
@bootstraponline
Copy link

bootstraponline commented Apr 5, 2019

After updating Flank to use dex-test parser 2.1.0 @gtroshin reported this crash.

 val allTestMethods = DexParser.findTestMethods(testLocalApk)

Flank is calling findTestMethods which fails. I think this is a bug in dex-test-parser Here's the full stack trace:

RunTests
  Uploading x-google-debug.apk .
  Uploading x-google-debug-androidTest.apk .
Exception in thread "main" picocli.CommandLine$ExecutionException: Error while running command (ftl.cli.firebase.test.android.AndroidRunCommand@40e4ea87): java.lang.RuntimeException: What a Terrible Failure: Ljava/lang/annotation/Inherited; annotation is not found in the test output
	at picocli.CommandLine.execute(CommandLine.java:1168)
	at picocli.CommandLine.access$800(CommandLine.java:141)
	at picocli.CommandLine$RunLast.handle(CommandLine.java:1367)
	at picocli.CommandLine$RunLast.handle(CommandLine.java:1335)
	at picocli.CommandLine$AbstractParseResultHandler.handleParseResult(CommandLine.java:1243)
	at picocli.CommandLine.parseWithHandlers(CommandLine.java:1526)
	at picocli.CommandLine.run(CommandLine.java:1974)
	at picocli.CommandLine.run(CommandLine.java:1920)
	at ftl.Main$Companion.main(Main.kt:41)
	at ftl.Main.main(Main.kt)
Caused by: java.lang.RuntimeException: What a Terrible Failure: Ljava/lang/annotation/Inherited; annotation is not found in the test output
	at com.linkedin.dex.spec.DexFile$inheritedAnnotationTypeIdIndex$2.invoke(DexFile.kt:52)
	at com.linkedin.dex.spec.DexFile$inheritedAnnotationTypeIdIndex$2.invoke(DexFile.kt:11)
	at kotlin.SynchronizedLazyImpl.getValue(LazyJVM.kt:74)
	at com.linkedin.dex.spec.DexFile.getInheritedAnnotationTypeIdIndex(DexFile.kt)
	at com.linkedin.dex.parser.AnnotationUtilsKt.checkIfAnnotationIsInherited(AnnotationUtils.kt:88)
	at com.linkedin.dex.parser.AnnotationUtilsKt.getTestAnnotation(AnnotationUtils.kt:77)
	at com.linkedin.dex.parser.AnnotationUtilsKt.getClassAnnotationValues(AnnotationUtils.kt:46)
	at com.linkedin.dex.parser.TestMethodKt.createTestMethods(TestMethod.kt:42)
	at com.linkedin.dex.parser.JUnit4ExtensionsKt.findAllJUnit4Tests(JUnit4Extensions.kt:35)
	at com.linkedin.dex.parser.DexParser$Companion.findTestMethods(DexParser.kt:60)
	at ftl.args.AndroidArgs.getTestMethods(AndroidArgs.kt:116)
	at ftl.args.AndroidArgs.access$getTestMethods(AndroidArgs.kt:38)
	at ftl.args.AndroidArgs$testShardChunks$2.invoke(AndroidArgs.kt:90)
	at ftl.args.AndroidArgs$testShardChunks$2.invoke(AndroidArgs.kt:38)
	at kotlin.SynchronizedLazyImpl.getValue(LazyJVM.kt:74)
	at ftl.args.AndroidArgs.getTestShardChunks(AndroidArgs.kt)
	at ftl.run.AndroidTestRunner$runTests$2.invokeSuspend(AndroidTestRunner.kt:30)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:32)
	at kotlinx.coroutines.ResumeModeKt.resumeUninterceptedMode(ResumeMode.kt:45)
	at kotlinx.coroutines.internal.ScopeCoroutine.onCompletionInternal$kotlinx_coroutines_core(Scopes.kt:28)
	at kotlinx.coroutines.JobSupport.completeStateFinalization(JobSupport.kt:305)
	at kotlinx.coroutines.JobSupport.tryFinalizeFinishingState(JobSupport.kt:230)
	at kotlinx.coroutines.JobSupport.tryMakeCompleting(JobSupport.kt:799)
	at kotlinx.coroutines.JobSupport.makeCompletingOnce$kotlinx_coroutines_core(JobSupport.kt:742)
	at kotlinx.coroutines.AbstractCoroutine.resumeWith(AbstractCoroutine.kt:117)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:45)
	at kotlinx.coroutines.DispatchedTask.run(Dispatched.kt:233)
	at kotlinx.coroutines.EventLoopImplBase.processNextEvent(EventLoop.kt:116)
	at kotlinx.coroutines.BlockingCoroutine.joinBlocking(Builders.kt:76)
	at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking(Builders.kt:53)
	at kotlinx.coroutines.BuildersKt.runBlocking(Unknown Source)
	at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking$default(Builders.kt:35)
	at kotlinx.coroutines.BuildersKt.runBlocking$default(Unknown Source)
	at ftl.cli.firebase.test.android.AndroidRunCommand.run(AndroidRunCommand.kt:34)
	at picocli.CommandLine.execute(CommandLine.java:1160)
	... 9 more

TestArmada/flank#538

@jasmsu

This comment has been minimized.

Copy link

jasmsu commented Apr 8, 2019

Thanks for the report! We'll take a look and get back to you.

@kkoser

This comment has been minimized.

Copy link
Contributor

kkoser commented Apr 18, 2019

Thanks! I have an idea as to what is causing this, going to take a look next week. @gtroshin if you could provide a sample apk to repro with, that would be useful in verifying the fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.