jnhyperion / HyperRobotFrameworkPlugin

Robot Framework plugin for PyCharm.
31 stars 5 forks source link

Plugin not working with IntelliJ IDEA 2024.1 (Community Edition) #71

Closed bootboot83 closed 5 months ago

bootboot83 commented 6 months ago

Hello,

I'm getting the below exception when the plugin is enabled since I upgraded my IDE to 2024.1. It's messing up the unit test feature as a side effect.

RunContextAction#presentation@ProjectViewPopup (com.intellij.execution.actions.RunContextAction), actionId=RunClass, text='Run context configuration'

com.intellij.diagnostic.PluginException: Class com.jetbrains.python.run.PythonRunConfiguration must not be requested from main classloader of PythonCore plugin. Matches content module (packagePrefix=com.jetbrains.python., moduleName=intellij.python.community.impl). [Plugin: com.github.jnhyperion.hyperrobotframeworkplugin] at com.intellij.ide.plugins.cl.PluginClassLoader.tryLoadingClass(PluginClassLoader.kt:203) at com.intellij.ide.plugins.cl.PluginClassLoader.loadClass(PluginClassLoader.kt:151) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:525) at java.base/java.lang.ClassLoader.defineClass2(Native Method) at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1108) at com.intellij.util.lang.UrlClassLoader.consumeClassData(UrlClassLoader.java:291) at com.intellij.util.lang.ZipResourceFile.findClass(ZipResourceFile.java:116) at com.intellij.util.lang.JarLoader.findClass(JarLoader.java:58) at com.intellij.util.lang.ClassPath.findClassInLoader(ClassPath.java:240) at com.intellij.util.lang.ClassPath.findClass(ClassPath.java:190) at com.intellij.ide.plugins.cl.PluginClassLoader.loadClassInsideSelf(PluginClassLoader.kt:326) at com.intellij.ide.plugins.cl.PluginClassLoader.tryLoadingClass(PluginClassLoader.kt:178) at com.intellij.ide.plugins.cl.PluginClassLoader.loadClass(PluginClassLoader.kt:151) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:525) at com.github.jnhyperion.hyperrobotframeworkplugin.ide.execution.RobotConfigurationFactory.createTemplateConfiguration(Unknown Source) at com.intellij.execution.configurations.ConfigurationFactory.createTemplateConfiguration(ConfigurationFactory.java:67) at com.intellij.execution.impl.RunManagerImpl.createTemplateSettings$intellij_platform_execution_impl(RunManagerImpl.kt:361) at com.intellij.execution.impl.RunManagerImpl.getConfigurationTemplate(RunManagerImpl.kt:353) at com.intellij.execution.impl.RunManagerImpl.createConfiguration(RunManagerImpl.kt:278) at com.intellij.execution.actions.RunConfigurationProducer.cloneTemplateConfigurationStatic(RunConfigurationProducer.java:252) at com.intellij.execution.actions.RunConfigurationProducer.cloneTemplateConfiguration(RunConfigurationProducer.java:243) at com.intellij.execution.actions.RunConfigurationProducer.createConfigurationFromContext(RunConfigurationProducer.java:95) at com.intellij.execution.actions.RunConfigurationProducer.findOrCreateConfigurationFromContext(RunConfigurationProducer.java:195) at com.intellij.execution.actions.PreferredProducerFind.doGetConfigurationsFromContext(PreferredProducerFind.java:118) at com.intellij.execution.actions.PreferredProducerFind.getConfigurationsFromContext(PreferredProducerFind.java:100) at com.intellij.execution.actions.ConfigurationContext.getConfigurationsFromContext(ConfigurationContext.java:415) at com.intellij.execution.actions.ConfigurationContext.findPreferredConfiguration(ConfigurationContext.java:299) at com.intellij.execution.actions.ConfigurationContext.findExisting(ConfigurationContext.java:293) at com.intellij.execution.actions.ConfigurationContext.lambda$getFromEvent$0(ConfigurationContext.java:75) at com.intellij.openapi.actionSystem.impl.ActionUpdater$UpdateSessionImpl$sharedData$1$1.invoke(ActionUpdater.kt:659) at com.intellij.openapi.application.rw.InternalReadAction.insideReadAction(InternalReadAction.kt:108) at com.intellij.openapi.application.rw.InternalReadAction.access$insideReadAction(InternalReadAction.kt:16) at com.intellij.openapi.application.rw.InternalReadAction$tryReadCancellable$2.invoke(InternalReadAction.kt:95) at com.intellij.openapi.application.rw.InternalReadAction$tryReadCancellable$2.invoke(InternalReadAction.kt:94) at com.intellij.openapi.application.rw.CancellableReadActionKt$cancellableReadActionInternal$1.invoke$lambda$1$lambda$0(cancellableReadAction.kt:38) at com.intellij.openapi.application.impl.RwLockHolder.tryRunReadAction(RwLockHolder.kt:310) at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:958) at com.intellij.openapi.application.rw.CancellableReadActionKt$cancellableReadActionInternal$1.invoke$lambda$1(cancellableReadAction.kt:36) at com.intellij.openapi.progress.util.ProgressIndicatorUtilService.runActionAndCancelBeforeWrite(ProgressIndicatorUtilService.java:66) at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runActionAndCancelBeforeWrite(ProgressIndicatorUtils.java:155) at com.intellij.openapi.application.rw.CancellableReadActionKt$cancellableReadActionInternal$1.invoke(cancellableReadAction.kt:34) at com.intellij.openapi.progress.CoroutinesKt.blockingContextInner(coroutines.kt:320) at com.intellij.openapi.progress.CoroutinesKt.blockingContext(coroutines.kt:309) at com.intellij.openapi.application.rw.CancellableReadActionKt.cancellableReadActionInternal(cancellableReadAction.kt:31) at com.intellij.openapi.application.rw.InternalReadAction.tryReadCancellable(InternalReadAction.kt:94) at com.intellij.openapi.application.rw.InternalReadAction.tryReadAction(InternalReadAction.kt:78) at com.intellij.openapi.application.rw.InternalReadAction.readLoop(InternalReadAction.kt:65) at com.intellij.openapi.application.rw.InternalReadAction.access$readLoop(InternalReadAction.kt:16) at com.intellij.openapi.application.rw.InternalReadAction$runReadAction$3.invokeSuspend(InternalReadAction.kt:36) at com.intellij.openapi.application.rw.InternalReadAction$runReadAction$3.invoke(InternalReadAction.kt) at com.intellij.openapi.application.rw.InternalReadAction$runReadAction$3.invoke(InternalReadAction.kt) at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:78) at kotlinx.coroutines.CoroutineScopeKt.coroutineScope(CoroutineScope.kt:264) at com.intellij.openapi.application.rw.InternalReadAction.runReadAction(InternalReadAction.kt:35) at com.intellij.openapi.application.rw.PlatformReadWriteActionSupport.executeReadAction(PlatformReadWriteActionSupport.kt:38) at com.intellij.openapi.application.ReadWriteActionSupport.executeReadAction$default(ReadWriteActionSupport.kt:15) at com.intellij.openapi.application.CoroutinesKt.constrainedReadActionUndispatched(coroutines.kt:82) at com.intellij.openapi.application.CoroutinesKt.readActionUndispatched(coroutines.kt:69) at com.intellij.openapi.actionSystem.impl.ActionUpdater$UpdateSessionImpl$sharedData$1.invokeSuspend(ActionUpdater.kt:862) at com.intellij.openapi.actionSystem.impl.ActionUpdater$UpdateSessionImpl$sharedData$1.invoke(ActionUpdater.kt) at com.intellij.openapi.actionSystem.impl.ActionUpdater$UpdateSessionImpl$sharedData$1.invoke(ActionUpdater.kt) at com.intellij.openapi.actionSystem.impl.ActionUpdater$getSessionDataDeferred$2$1$invokeSuspend$$inlined$useWithScope$1.invokeSuspend(trace.kt:149) at com.intellij.openapi.actionSystem.impl.ActionUpdater$getSessionDataDeferred$2$1$invokeSuspend$$inlined$useWithScope$1.invoke(trace.kt) at com.intellij.openapi.actionSystem.impl.ActionUpdater$getSessionDataDeferred$2$1$invokeSuspend$$inlined$useWithScope$1.invoke(trace.kt) at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:78) at kotlinx.coroutines.BuildersKt__Builders_commonKt.withContext(Builders.common.kt:167) at kotlinx.coroutines.BuildersKt.withContext(Unknown Source) at com.intellij.openapi.actionSystem.impl.ActionUpdater$getSessionDataDeferred$2$1.invokeSuspend(ActionUpdater.kt:862) at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:108) at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:115) at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:103) at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:584) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:793) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:697) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:684)

jnhyperion commented 6 months ago

I tried IntelliJ IDEA 2024.1 (Community Edition) in my local, no errors raised. Please try:

  1. update plugin to latest version
  2. delete existing run configuration and restart IDE
  3. if the errors are still there, please try to use pycharm instead, because this plugin is designed for pycharm originally.
bootboot83 commented 6 months ago

Hello, thanks for your reply. I updated the plugin to the latest version and deleted run configuration. I'm still facing the same issue, maybe it's a conflict with another plugin. I can't use pycharm as my project is mainly based on Java, only non-reg is written in Robot.

It's a shame because you plugin is well done and really useful :)

jnhyperion commented 6 months ago

try to create a new module for your test:

  1. in your java project tree structure view, right click the root node, new -> module -> select python image
  2. right click the created python module, new -> robot file
image

in my local, the test can run properly.