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

Glutter icon not working #116

Open
khongi opened this issue Dec 14, 2020 · 8 comments
Open

Glutter icon not working #116

khongi opened this issue Dec 14, 2020 · 8 comments
Labels

Comments

@khongi
Copy link

khongi commented Dec 14, 2020

When I try to run a single test with glutter icon of BehaviorSpec, Given
The run fails with the following log:

kotlin.jvm.KotlinReflectionNotSupportedError: Kotlin reflection implementation is not found at runtime. Make sure you have kotlin-reflect.jar in the classpath
	at kotlin.jvm.internal.ClassReference.error(ClassReference.kt:84)
	at kotlin.jvm.internal.ClassReference.getAnnotations(ClassReference.kt:27)
	at io.kotest.mpp.JvmReflection.annotations(reflection.kt:15)
	at io.kotest.core.spec.DescriptionKt.toDescription(description.kt:24)
	at io.kotest.engine.launcher.TestPathTestCaseFilter.<init>(TestPathTestCaseFilter.kt:22)
	at io.kotest.engine.launcher.ExecuteKt$execute$1.invokeSuspend(execute.kt:40)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
	at kotlin.coroutines.ContinuationKt.startCoroutine(Continuation.kt:115)
	at io.kotest.engine.launcher.ExecuteKt.future(execute.kt:89)
	at io.kotest.engine.launcher.ExecuteKt.execute(execute.kt:34)
	at io.kotest.engine.launcher.MainKt.main(main.kt:12)



Process finished with exit code 0

[kotlin.jvm.KotlinReflectionNotSupportedError: Kotlin reflection implementation is not found at runtime. Make sure you have kotlin-reflect.jar in the classpath]

However when I run the whole test class using the glutter icon, it works as excepted.
I encountered this while writing tests on:

Android Studio Arctic Fox | 2020.3.1 Canary 2
Build #AI-202.7319.50.2031.7006259, built on December 2, 2020
Runtime version: 11.0.8+0-b944-P17168821 amd64
VM: OpenJDK 64-Bit Server VM by N/A
Linux 5.4.80-2-manjaro
GC: G1 Young Generation, G1 Old Generation
Memory: 4096M
Cores: 8
Registry: external.system.auto.import.disabled=true
Non-Bundled Plugins: IdeaVIM, com.vermouthx.idea, idea.plugin.protoeditor, some.awesome, org.jetbrains.kotlin, zielu.gittoolbox, com.developerphil.adbidea, kotest-plugin-intellij, izhangzhihao.rainbow.brackets
Current Desktop: GNOME
  • Kotest Plugin version: 1.1.22-IC-2020.2
  • Kotlin Plugin: 1.4.21-release-Studio4.2-1
  • Kotest 4.3.2
  • Kotlin 1.4.20
@sksamuel
Copy link
Member

sksamuel commented Dec 14, 2020 via email

@khongi
Copy link
Author

khongi commented Dec 14, 2020

I added kotlin-reflect:1.4.20 and tried again, this time a different exception: (the test still passes if I run the whole test class)

~~~ Kotest Configuration ~~~
-> Parallelization factor: 1
-> Default test timeout: 600000ms
-> Default test order: Sequential
-> Default isolation mode: SingleInstance
-> Global soft assertations: False
-> Write spec failure file: False
-> Fail on ignored tests: False
-> Spec execution order: SpecExecutionOrder
-> Extensions
  - io.kotest.engine.extensions.SystemPropertyTagExtension
  - io.kotest.core.extensions.RuntimeTagExtension
  - io.kotest.engine.extensions.RuntimeTagExpressionExtension
  - io.kotest.engine.extensions.SpecifiedTagsTagExtension


io.kotest.engine.SpecInstantiationException: Could not create instance of class com.thiosin.novus.screens.home.HomePresenterTest
	at io.kotest.engine.InstantiateSpecKt.javaReflectNewInstance(instantiateSpec.kt:34)
	at io.kotest.engine.InstantiateSpecKt.createAndInitializeSpec(instantiateSpec.kt:21)
	at io.kotest.engine.spec.SpecExecutor.createInstance(SpecExecutor.kt:103)
	at io.kotest.engine.spec.SpecExecutor.execute(SpecExecutor.kt:43)
	at io.kotest.engine.KotestEngine$submitBatch$$inlined$forEach$lambda$1$1.invokeSuspend(KotestEngine.kt:139)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
	at kotlinx.coroutines.EventLoopImplBase.processNextEvent(EventLoop.common.kt:274)
	at kotlinx.coroutines.BlockingCoroutine.joinBlocking(Builders.kt:84)
	at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking(Builders.kt:59)
	at kotlinx.coroutines.BuildersKt.runBlocking(Unknown Source)
	at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking$default(Builders.kt:38)
	at kotlinx.coroutines.BuildersKt.runBlocking$default(Unknown Source)
	at io.kotest.engine.KotestEngine$submitBatch$$inlined$forEach$lambda$1.run(KotestEngine.kt:138)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.lang.reflect.InvocationTargetException
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
	at kotlin.reflect.jvm.internal.calls.CallerImpl$Constructor.call(CallerImpl.kt:41)
	at kotlin.reflect.jvm.internal.KCallableImpl.call(KCallableImpl.kt:108)
	at io.kotest.engine.InstantiateSpecKt.javaReflectNewInstance(instantiateSpec.kt:32)
	... 18 more
Caused by: java.lang.NoClassDefFoundError: io/mockk/proxy/MockKAgentFactory
	at io.mockk.impl.JvmMockKGateway.<init>(JvmMockKGateway.kt:184)
	at io.mockk.impl.JvmMockKGateway.<clinit>(JvmMockKGateway.kt:172)
	at com.thiosin.novus.screens.home.HomePresenterTest$1.invoke(HomePresenterTest.kt:91)
	at com.thiosin.novus.screens.home.HomePresenterTest$1.invoke(HomePresenterTest.kt)
	at io.kotest.core.spec.style.BehaviorSpec.<init>(behaviorSpec.kt:34)
	at com.thiosin.novus.screens.home.HomePresenterTest.<init>(HomePresenterTest.kt:17)
	... 25 more
Caused by: java.lang.ClassNotFoundException: io.mockk.proxy.MockKAgentFactory
	at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581)
	at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
	... 31 more
io.kotest.engine.SpecInstantiationException: Could not create instance of class com.thiosin.novus.screens.home.HomePresenterTest
	at io.kotest.engine.InstantiateSpecKt.javaReflectNewInstance(instantiateSpec.kt:34)
	at io.kotest.engine.InstantiateSpecKt.createAndInitializeSpec(instantiateSpec.kt:21)
	at io.kotest.engine.spec.SpecExecutor.createInstance(SpecExecutor.kt:103)
	at io.kotest.engine.spec.SpecExecutor.execute(SpecExecutor.kt:43)
	at io.kotest.engine.KotestEngine$submitBatch$$inlined$forEach$lambda$1$1.invokeSuspend(KotestEngine.kt:139)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
	at kotlinx.coroutines.EventLoopImplBase.processNextEvent(EventLoop.common.kt:274)
	at kotlinx.coroutines.BlockingCoroutine.joinBlocking(Builders.kt:84)
	at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking(Builders.kt:59)
	at kotlinx.coroutines.BuildersKt.runBlocking(Unknown Source)
	at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking$default(Builders.kt:38)
	at kotlinx.coroutines.BuildersKt.runBlocking$default(Unknown Source)
	at io.kotest.engine.KotestEngine$submitBatch$$inlined$forEach$lambda$1.run(KotestEngine.kt:138)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.lang.reflect.InvocationTargetException
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
	at kotlin.reflect.jvm.internal.calls.CallerImpl$Constructor.call(CallerImpl.kt:41)
	at kotlin.reflect.jvm.internal.KCallableImpl.call(KCallableImpl.kt:108)
	at io.kotest.engine.InstantiateSpecKt.javaReflectNewInstance(instantiateSpec.kt:32)
	... 18 more
Caused by: java.lang.NoClassDefFoundError: io/mockk/proxy/MockKAgentFactory
	at io.mockk.impl.JvmMockKGateway.<init>(JvmMockKGateway.kt:184)

	at io.mockk.impl.JvmMockKGateway.<clinit>(JvmMockKGateway.kt:172)
	at com.thiosin.novus.screens.home.HomePresenterTest$1.invoke(HomePresenterTest.kt:91)
	at com.thiosin.novus.screens.home.HomePresenterTest$1.invoke(HomePresenterTest.kt)
	at io.kotest.core.spec.style.BehaviorSpec.<init>(behaviorSpec.kt:34)
	at com.thiosin.novus.screens.home.HomePresenterTest.<init>(HomePresenterTest.kt:17)
	... 25 more
Caused by: java.lang.ClassNotFoundException: io.mockk.proxy.MockKAgentFactory
	at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581)
	at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
	... 31 more

io.kotest.engine.SpecInstantiationException: Could not create instance of class com.thiosin.novus.screens.home.HomePresenterTest
	at io.kotest.engine.InstantiateSpecKt.javaReflectNewInstance(instantiateSpec.kt:34)
	at io.kotest.engine.InstantiateSpecKt.createAndInitializeSpec(instantiateSpec.kt:21)
	at io.kotest.engine.spec.SpecExecutor.createInstance(SpecExecutor.kt:103)
	at io.kotest.engine.spec.SpecExecutor.execute(SpecExecutor.kt:43)
	at io.kotest.engine.KotestEngine$submitBatch$$inlined$forEach$lambda$1$1.invokeSuspend(KotestEngine.kt:139)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
	at kotlinx.coroutines.EventLoopImplBase.processNextEvent(EventLoop.common.kt:274)
	at kotlinx.coroutines.BlockingCoroutine.joinBlocking(Builders.kt:84)
	at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking(Builders.kt:59)
	at kotlinx.coroutines.BuildersKt.runBlocking(Unknown Source)
	at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking$default(Builders.kt:38)
	at kotlinx.coroutines.BuildersKt.runBlocking$default(Unknown Source)
	at io.kotest.engine.KotestEngine$submitBatch$$inlined$forEach$lambda$1.run(KotestEngine.kt:138)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.lang.reflect.InvocationTargetException
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
	at kotlin.reflect.jvm.internal.calls.CallerImpl$Constructor.call(CallerImpl.kt:41)
	at kotlin.reflect.jvm.internal.KCallableImpl.call(KCallableImpl.kt:108)
	at io.kotest.engine.InstantiateSpecKt.javaReflectNewInstance(instantiateSpec.kt:32)
	... 18 more
Caused by: java.lang.NoClassDefFoundError: io/mockk/proxy/MockKAgentFactory
	at io.mockk.impl.JvmMockKGateway.<init>(JvmMockKGateway.kt:184)
	at io.mockk.impl.JvmMockKGateway.<clinit>(JvmMockKGateway.kt:172)
	at com.thiosin.novus.screens.home.HomePresenterTest$1.invoke(HomePresenterTest.kt:91)
	at com.thiosin.novus.screens.home.HomePresenterTest$1.invoke(HomePresenterTest.kt)
	at io.kotest.core.spec.style.BehaviorSpec.<init>(behaviorSpec.kt:34)
	at com.thiosin.novus.screens.home.HomePresenterTest.<init>(HomePresenterTest.kt:17)
	... 25 more
Caused by: java.lang.ClassNotFoundException: io.mockk.proxy.MockKAgentFactory
	at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581)
	at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
	... 31 more


Process finished with exit code 255

Could not create instance of class com.thiosin.novus.screens.home.HomePresenterTest

image

@sksamuel
Copy link
Member

sksamuel commented Dec 14, 2020 via email

@khongi
Copy link
Author

khongi commented Dec 14, 2020

yes

@stale
Copy link

stale bot commented Feb 13, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix This will not be worked on label Feb 13, 2021
@stale stale bot closed this as completed Feb 20, 2021
@pawegio
Copy link

pawegio commented Apr 8, 2021

It still fails with java.lang.NoClassDefFoundError: io/mockk/proxy/MockKAgentFactory for:

kotest-runner-junit5-jvm: 4.4.3
kotest plugin: 1.1.30-IC-2020.3
mockK: 1.11.0
android studio: Arctic Fox 2020.3.1 Canary 11

@Kantis Kantis reopened this Feb 15, 2024
@stale stale bot removed the wontfix This will not be worked on label Feb 15, 2024
@Kantis Kantis added the pinned label Feb 15, 2024
@tudang88
Copy link

Hey everyone!
Is there any update for this issue?
I also face with this issue with kotest 5.5.
The test run well when launching whole test class, but fail when try to run a single test method.

@almozavr
Copy link

almozavr commented Nov 8, 2024

The issue still exists with 6.0.0.M1 runner

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants