PluginRepositoryException while running verifier jar: 400 Bad Request
takanuva15 opened this issue · 3 comments
Describe the bug
Getting a PluginRepositoryException with error 400 while the action is trying to run the verifier jar
To Reproduce
Steps to reproduce the behavior:
- Use v1.0.7 in a github action. The ides I'm testing are:
ideaIC:2021.2
ideaIC:LATEST-EAP-SNAPSHOT
pycharmPC:2021.2
pycharmPC:LATEST-EAP-SNAPSHOT
Expected behavior
No error
Screenshots
Using Java from JAVA_HOME: /opt/java/openjdk
2021-08-10T01:42:22 [main] ERROR LanguageUtils - Failed attempt #1 of 5 to invoke 'All versions of plugin '/github/workspace/*.zip' compatible with IC-212.4746.92'. Wait for 30000 millis to reattempt
org.jetbrains.intellij.pluginRepository.PluginRepositoryException: <!doctype html><html lang="en"><head><title>HTTP Status 400 – Bad Request</title><style type="text/css">body {font-family:Tahoma,Arial,sans-serif;} h1, h2, h3, b {color:white;background-color:#525D76;} h1 {font-size:22px;} h2 {font-size:16px;} h3 {font-size:14px;} p {font-size:12px;} a {color:black;} .line {height:1px;background-color:#525D76;border:none;}</style></head><body><h1>HTTP Status 400 – Bad Request</h1></body></html>
Request failed. Status code 400.
at org.jetbrains.intellij.pluginRepository.internal.utils.RequestHelperKt.executeAndParseBody(RequestHelper.kt:30)
at org.jetbrains.intellij.pluginRepository.internal.instances.PluginManagerInstance.getPluginByXmlId(PluginManagerInstance.kt:32)
at org.jetbrains.intellij.pluginRepository.PluginManager$DefaultImpls.getPluginByXmlId$default(PluginRepository.kt:18)
at com.jetbrains.pluginverifier.repository.repositories.marketplace.MarketplaceRepository.getAllVersionsOfPlugin(MarketplaceRepository.kt:57)
at com.jetbrains.pluginverifier.options.PluginsParsing$addAllCompatibleVersionsOfPlugin$compatibleVersions$1.invoke(PluginsParsing.kt:166)
at com.jetbrains.pluginverifier.options.PluginsParsing$addAllCompatibleVersionsOfPlugin$compatibleVersions$1.invoke(PluginsParsing.kt:26)
at com.jetbrains.pluginverifier.misc.RetryUtilKt.retry(RetryUtil.kt:23)
at com.jetbrains.pluginverifier.misc.RetryUtilKt.retry$default(RetryUtil.kt:17)
at com.jetbrains.pluginverifier.options.PluginsParsing.addAllCompatibleVersionsOfPlugin(PluginsParsing.kt:165)
at com.jetbrains.pluginverifier.options.PluginsParsing.addPluginBySpec(PluginsParsing.kt:138)
at com.jetbrains.pluginverifier.tasks.checkPlugin.CheckPluginParamsBuilder.build(CheckPluginParamsBuilder.kt:54)
at com.jetbrains.pluginverifier.tasks.checkPlugin.CheckPluginParamsBuilder.build(CheckPluginParamsBuilder.kt:23)
at com.jetbrains.pluginverifier.PluginVerifierMain.main(PluginVerifierMain.kt:125)
2021-08-10T01:42:52 [main] ERROR LanguageUtils - Failed attempt #2 of 5 to invoke 'All versions of plugin '/github/workspace/*.zip' compatible with IC-212.4746.92'. Wait for 30000 millis to reattempt
Additional context
Build info: https://github.com/Nordgedanken/intellij-autohotkey/pull/59/checks?check_run_id=3286505927
Hi @takanuva15 - Thank you for opening this issue! Looking at your execution, can you confirm that your plugin is published to the /github/workspace/
directory? The reason I ask is because I see the below error (line 51 in your linked execution):
ls: /github/workspace/*.zip: No such file or directory
This is coming from line 411 of entrypoint.sh
of this GitHub action, specifically calling ls -lash $PLUGIN_LOCATION
which, the variable is PLUGIN_LOCATION="$GITHUB_WORKSPACE/$INPUT_PLUGIN_LOCATION"
; GITHUB_WORKSPACE
comes from GitHub, and INPUT_PLUGIN_LOCATION
is what you provide to the plugin-location
configuration setting in your build_plugin.yml
file (in your case, you provide *.zip
).
This line in your execution is making me think that the plugin file does not exist where the action expects it, and thus you are receiving this error (confusing, as it might be). I ran the action for one of my plugins, and did not receive this error, however my plugin-location
is set to build/distributions/*.zip
.
Please confirm if this location is the desired one, and if so, the plugin exists there.
Thank you!
Chris
It turns out the build was adding the plugin zip to the root directory, and then when we ran the checkout action for the ide-versions.txt
file, the zip was getting deleted. I swapped those two steps around and it's working now.
Thanks for the debugging help!
Our build is split in 2 steps
- we run tests and gradle build in the 1st step and upload the artifact
- we download the artifact to root dir and run the verifier in the 2nd step.
This helps us easily differentiate whether the build is failing due to a core problem with plugin code or just a compatibility issue with an IDE binary.
Awesome, glad you were able to figure out the problem!