JetBrains / intellij-ui-test-robot

The library allows you to write and execute UI tests among IntelliJ IDEA. You can test your Plugin.

Home Page:https://jetbrains-platform.slack.com/archives/C026SVA9MMM

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Module system errors with IntelliJ IDEA 2022.2

njbartlett opened this issue · comments

Using remote-robot version 0.11.15 with IntelliJ IDEA 2022.2 is failing with many errors from the Java module system on the IDE side. Note that IDEA 2022.2 now uses Java 17 as its internal JVM.

Full log including stack trace is attached. This includes the following error:

Unable to make field private java.awt.Color javax.swing.text.JTextComponent.selectedTextColor accessible: module java.desktop does not "opens javax.swing.text" to unnamed module @f8f1074

I attempted to fix this by adding an --add-opens argument to the launcher as follows:

    ideProcess = IdeLauncher.INSTANCE.launchIde(
        ideaPath,
        systemProperties,
        List.of("--add-opens=java.desktop/javax.swing.text=ALL-UNNAMED"),
        List.of(findRobotPluginPath(), pluginUnderTestPath),
        sandboxPath);
  }

However this did not have any effect.

Hello, I've just found that we defined to old version of robot-server-plugin as a default version. I'll fix it. As a workaround could you please set robot-server-plugin version manually ideDownloader.downloadRobotPlugin(tmpDir, "0.11.15") in findRobotPluginPath()

Thanks for your reply. Actually in our project we don't use the provided IdeDownloader, since we have to download both IDEA and the plugin from an Artifactory server within our network (no external network access from Jenkins build nodes for security reasons).

Therefore we are already using the correct version of robot-server-plugin.

Are you sure it is not too old? The exception was thrown from XpathDataModelCreator.fillElement(XpathDataModelCreator.kt:90) and now it should be fixed with this commit

You were right, I apologize. I had an older version of the plugin cached by the build system (rookie mistake...). Thank you!

Ok, good! Anyway, I'd like to keep this issue open until fix the default robot-server-plugin version in launcher