JetBrains / plugin-repository-rest-client

Apache License 2.0
21 stars 15 forks source link

plugin-repository-rest-client doesn't find plugin dependency anymore #42

Closed DaphneGripon closed 4 years ago

DaphneGripon commented 4 years ago

Hello,

I have an issue with an IntelliJ plugin i'm working on. I have added a dependency to the Kotlin plugin last month, and it worked fine, on my computer as well as on Jenkins.

from my build.gradle

intellij {
    version 'IC-2016.3' //see https://www.jetbrains.com/intellij-repository/releases
    pluginName PLUGIN_NAME
    updateSinceUntilBuild false

    plugins 'org.jetbrains.kotlin:1.2.10-release-IJ2016.3-1'
}

(I have not modified the build.gradle file since I added the dependency, it's been building fine until today)

I cleared gradle's cache (which had the kotlin plugin v 1.2.10-release-IJ2016.3-1 already downloaded) and now I get this error message at build > Cannot find plugin org.jetbrains.kotlin:1.2.10-release-IJ2016.3-1 at https://plugins.jetbrains.com

When i run the build with the --debug option, I get the following logs

18:16:10.387 [DEBUG] [plugin-repository-rest-client] ---> HTTP GET https://plugins.jetbrains.com/plugin/download?pluginId=org.jetbrains.kotlin&version=1.2.10-release-IJ2016.3-1

18:16:10.462 [DEBUG] [sun.net.www.protocol.http.HttpURLConnection] sun.net.www.MessageHeader@205110ea5 pairs: {GET /plugin/download?pluginId=org.jetbrains.kotlin&version=1.2.10-release-IJ2016.3-1 HTTP/1.1: null}{User-Agent: Java/1.8.0_31}{Host: plugins.jetbrains.com}{Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2}{Connection: keep-alive}

18:16:10.521 [DEBUG] [sun.net.www.protocol.http.HttpURLConnection] sun.net.www.MessageHeader@226aabe319 pairs: {null: HTTP/1.1 303 See Other}{Content-Length: 0}{Connection: keep-alive}{Date: Wed, 22 Jan 2020 17:16:11 GMT}{Server: nginx}{Location: /files/6954/41419/kotlin-plugin-1.2.10-release-IJ2016.3-1.zip?updateId=41419&pluginId=6954&family=INTELLIJ}{X-Content-Type-Options: nosniff}{X-XSS-Protection: 1; mode=block}{Cache-Control: no-cache, no-store, max-age=0, must-revalidate}{Pragma: no-cache}{Expires: 0}{Strict-Transport-Security: max-age=31536000 ; includeSubDomains}{X-Frame-Options: SAMEORIGIN}{Content-Security-Policy: default-src 'self'; script-src 'self' 'unsafe-eval' 'unsafe-inline' tagmanager.google.com www.googletagmanager.com www.google-analytics.com static.hotjar.com script.hotjar.com js-agent.newrelic.com bam.nr-data.net; font-src data: 'self' *.jetbrains.com themes.googleusercontent.com fonts.gstatic.com static.hotjar.com; img-src 'unsafe-inline' data: *; style-src 'unsafe-inline' 'self' *.jetbrains.com cloud.typography.com tagmanager.google.com fonts.googleapis.com; frame-src 'self' www.googletagmanager.com vars.hotjar.com hub.jetbrains.com; connect-src 'self' localhost:* http://localhost:* *.jetbrains.com www.google-analytics.com *.hotjar.com wss://*.hotjar.com app-lon02.marketo.com bam.nr-data.net hub.jetbrains.com;}{Content-Language: en}{X-Cache: Miss from cloudfront}{Via: 1.1 8f44726c3c0f1ab8a2cbe3e61a762e66.cloudfront.net (CloudFront)}{X-Amz-Cf-Pop: CDG3-C1}{X-Amz-Cf-Id: f-YRyCLzm6d61Qb_qpw8cIdgLCbC3wnnmYY193zKFZG5qBMmWGE7eA==}

18:16:10.522 [DEBUG] [plugin-repository-rest-client] <--- HTTP 303 https://plugins.jetbrains.com/plugin/download?pluginId=org.jetbrains.kotlin&version=1.2.10-release-IJ2016.3-1 (134ms)

18:16:10.534 [DEBUG] [org.jetbrains.kotlin.gradle.plugin.RunOnceAfterEvaluated] [TaskProvider.configure] RunOnceAfterEvaluated - onEvaluated executed=false evaluated=false configured=true

18:16:10.522 [ERROR] [plugin-repository-rest-client] Cannot find org.jetbrains.kotlin:1.2.10-release-IJ2016.3-1

[ERROR] [plugin-repository-rest-client] Cannot find org.jetbrains.kotlin:1.2.10-release-IJ2016.3-1

It is GETting https://plugins.jetbrains.com/plugin/download?pluginId=org.jetbrains.kotlin&version=1.2.10-release-IJ2016.3-1 but the request returns a 303 status code. The version exists, I have checked on https://plugins.jetbrains.com/plugin/6954-kotlin/versions and can download the file if I try the previously mentioned URL in a browser.

Is this due to the HTTP response status code not being 2XX? How can I make it work again ? Please.

Daphne

DaphneGripon commented 4 years ago

Sorry, forgot to specify this :

IntelliJ IDEA 2019.3.2 (Community Edition) Build #IC-193.6015.39, built on January 21, 2020 Runtime version: 11.0.5+10-b520.30 x86_64 VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o Mac OS X 10.11.1 GC: ParNew, ConcurrentMarkSweep Memory: 990M Cores: 4 Registry: ide.intellij.laf.enable.animation=true, ide.balloon.shadow.size=0 Non-Bundled Plugins: com.mallowigi.idea, some.awesome

I have the same issue on another computer (same project), running IntelliJ IDEA 2019.2.3 (Community Edition)

AlexanderPrendota commented 4 years ago

Hello, could you please provide the version of the library?

DaphneGripon commented 4 years ago

Hello, could you please provide the version of the library?

Hello Alexander, how do I find this information ? I assumed it was bundled with IntelliJ IDEA, since my plugin doesn't have a dependency on plugin-repository-rest-client and the library is used automatically when running ./gradlew buildPlugin to fetch my dependencies.

DaphneGripon commented 4 years ago

Ok nevermind, I found who depends on it : The intelliJ plugin https://github.com/JetBrains/gradle-intellij-plugin. However, we want to be compatible since IC-2016.3 of IntelliJ, so the IntelliJ plugin is v0.2.17. Which means the version of plugin-repository-rest-client used is 0.3.21.

What I don't understand is that it was working fine until sometime last week. We have not made any version changes to the IntelliJ or Kotlin plugin. The only explanation I can think of is the return status code (which probably changed last week) is not considered a success ..?

AlexanderPrendota commented 4 years ago

Thanks! Will have a look, thanks for report =)

DaphneGripon commented 4 years ago

Thank you ! :)

chrkv88 commented 4 years ago

Hi! Yes, redirect has changed on plugins.jetbrains.com last week, but newer versions of plugin-repository-rest-client will handle it. Have I got it right that you have some issues with plugin version newer than 0.2.17?

DaphneGripon commented 4 years ago

Hi, thank you for the response! Yeah, currently we're at 0.2.17 but I am trying to see with the team if we can bump the version because it's getting a bit old. Thank you.

AlexanderPrendota commented 4 years ago

@DaphneGripon Hi! Should we close the issue?

DaphneGripon commented 4 years ago

@DaphneGripon Hi! Should we close the issue?

If you're saying this is handled in later versions, then yes, absolutely. Sorry for the delayed response.

AlexanderPrendota commented 4 years ago

Thanks =)