gradle / plugin-portal-requests

Gradle Plugin Portal issues and requests.
https://plugins.gradle.org/
12 stars 8 forks source link

Publication fails and plugin cannot be published anymore #40

Open v1nc3n4 opened 4 years ago

v1nc3n4 commented 4 years ago

Hello,

Current Behavior

I tried to publish plugin org.siouan.frontend with version 2.1.0 few minutes ago. Publication fails with the Javadoc artifact, and a 403 error. Now I can't publish again the plugin because Gradle reports it already exists, although the version is not visible in the portal yet, and I cannot delete it.

Steps to Reproduce

Below you will find Gradle output for the two publication attempts:

D:\...\frontend-gradle-plugin>gradlew publishPlugins
Starting a Gradle Daemon, 2 incompatible and 2 stopped Daemons could not be reused, use --status for details

> Task :publishPlugins
Publishing plugin org.siouan.frontend version 2.1.0
Publishing artifact build/libs/frontend-gradle-plugin-2.1.0.jar
Publishing artifact build/libs/frontend-gradle-plugin-2.1.0-sources.jar
Publishing artifact build/libs/frontend-gradle-plugin-2.1.0-javadoc.jar

> Task :publishPlugins FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':publishPlugins'.
> java.io.IOException: Unexpected HTTP response while uploading D:\...\frontend-gradle-plugin\build\libs\frontend-gradle-plugin-2.1.0-javadoc.jar: 403 Forbidden

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 1m 7s
9 actionable tasks: 7 executed, 2 up-to-date

D:\...\frontend-gradle-plugin>gradlew publishPlugins

> Task :publishPlugins FAILED
Publishing plugin org.siouan.frontend version 2.1.0

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':publishPlugins'.
> Failed to post to server.
  Server responded with:
  Plugin: 'org.siouan.frontend', version: '2.1.0' exists already. It was created: 2020-04-27 06:31:45.18

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 2s
9 actionable tasks: 2 executed, 7 up-to-date

Your Environment

Gradle : 6.3 JDK : 11.0.6 64 bits O/S : Windows 10 Pro

My requests:

Thanks in advance for your help! BR, Vincent

v1nc3n4 commented 4 years ago

Hi,

Can someone provide a feedback about the 2 requests above? Some end-users now are asking to me why the release mentioned above is not visible on the portal, but still I don't have the answer and cannot force re-publishing artifacts. The state of the release on the portal seems corrupted due to the 403 failure during publication.

Sorry for the inconvenience, thanks again for your help! BR, Vincent

bristermitten commented 4 years ago

I am also having this issue

> Task :pdm-gradle:publishPlugins
Publishing plugin me.bristermitten.pdm version 0.0.6
Publishing artifact build/libs/pdm-gradle-0.0.6.jar

> Task :pdm-gradle:publishPlugins FAILED

Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.1.1/userguide/command_line_interface.html#sec:command_line_warnings
12 actionable tasks: 11 executed, 1 up-to-date

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':pdm-gradle:publishPlugins'.
> java.io.IOException: Unexpected HTTP response while uploading C:\Users\AlexL\IdeaProjects\pdm\pdm-gradle\build\libs\pdm-gradle-0.0.6.jar: 403 Forbidden

Gradle Version 6.1.1 Windows 10 1.8.0_252 (AdoptOpenJDK 25.252-b09)

I've tried with multiple different versions, inside and out of WSL. gradle.properties is definitely up to date, still no luck.

Really hoping that this will be fixed.

JLLeitschuh commented 4 years ago

What versions of the publishing plugin are you using?

bristermitten commented 4 years ago

I'm on 0.12.0 Interestingly enough, the problem seems to relate to upload speed in my testing - when on a slow connection (which my WiFi and Mobile Hotspot were) the 403 seems to happen. On a fast connection (tested on a VPS) it all works fine.

Could it be some sort of slow loris protection causing the issue?

v1nc3n4 commented 4 years ago

Hi @JLLeitschuh: when I created this issue, I was using release 0.11.0 of the publishing plugin. Currently, I'm using release 0.12.0.

JLLeitschuh commented 4 years ago

@big-guy could this be an issue with the new upload time limits we imposed to try to patch the security vulnerability?

@knightzmc @v1nc3n4 can you provide estimates of how long your upload task was running before it failed?

v1nc3n4 commented 4 years ago

Four months later, I would say it ran in seconds, but really I can't remember, and maybe it lasted 1 minute 😕. Not very helpful I guess...

bristermitten commented 4 years ago

My upload speed is pretty slow, and the jar is about 4.5MB, so probably at least 10 seconds, if not more.

JLLeitschuh commented 4 years ago

We have the timeout set to 30 seconds per artifact being uploaded, with a max time of 10 min to upload all of them. Looks like you were running into that. We're working on a fix to make the timeouts longer. Thanks!

JLLeitschuh commented 4 years ago

We've increased the timeout to 60 seconds x number of artifacts being uploaded. Hopefully this helps in the future.

v1nc3n4 commented 4 years ago

Thanks @JLLeitschuh, I understand it is important to prevent as much as possible such issue, that's great. But in case the issue occurs again, the main difficulty here is there's no option user-side to recover from such a situation. It won't be possible to upload the artifacts again, and the publication server state remains inconsistent. Finally, the version number becomes unusable and is lost for the user. There's nothing more to do for the user than incrementing the version number and attempting a new publication, which is very frustrating. Is there anything Gradle can do to allow recovering user-side after an artifact failed to be uploaded? (e.g. what happen if there's a network failure?) Thanks again for your help and work!

pun-ky commented 3 years ago

also spotted on my side:

> Task :release FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':gradle-aem-plugin:gradle-aem-plugin:publishPlugins'.
> java.io.IOException: Unexpected HTTP response while uploading /Users/krystian.panek/Projects/github-pun-ky/gradle-aem-plugin/build/libs/aem-plugin-15.1.21-javadoc.jar: 403 Forbidden

this issue is still pretty annoying. even with increased timeouts, it failed at my side 2 times. please consider fixing it in a more fault-tolerant way, maybe increase timeouts even more.

robstoll commented 3 years ago

I have a similar but different problem, my upload failed with a 503:

* What went wrong:
Execution failed for task ':tutteli-gradle-kotlin-module-info:publishPlugins'.
> Error communicating with server.
  URL https://plugins.gradle.org/api/v1/publish/versions/new/ch.tutteli.gradle.plugins.kotlin.module.info returned response code 503

and now I am no longer able to upload (and the version is not visible in the UI, so I cannot delete the version

ZheSun88 commented 3 years ago

we have had the same issue here, as the 1st try was failed with error 503

Execution failed for task ':publishPlugins'. java.lang.RuntimeException: Error communicating with server.
URL https://plugins.gradle.org/api/v1/publish/versions/new/com.vaadin returned response code 503

then we are not able to redo the release using the same version any more.

ISNing commented 7 months ago

Same issue here, and I got 503 even after I changed to another version:

> Error communicating with server.
  URL https://plugins.gradle.org/api/v1/publish/versions/new/io.github.isning.gradle.plugins.kn.krossCompile returned response code 503

And if I reuse the version tag, I'll get:

* What went wrong:
Execution failed for task ':publishPlugins'.
> Failed to post to server.
  Server responded with:
  Plugin: 'io.github.isning.gradle.plugins.kn.krossCompile', version: '0.1.1' exists already. It was created: 2024-01-30 12:08:21.306

At first, I hope to release version 0.1.1, and I changed it to 0.1.2 to avoid already exisits which might be caused by broken metadata on gradle plugin portal. What's more, the 0.1.1 and 0.1.2 are not visible on webpage and cannot be resloved by gradle