jenkinsci / jenkinsci/plugin-installation-manager-tool

Error "Downloaded file is not a valid ZIP" is not clear

Open
#254 0 comments 5 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
463
Forks
228
Avg merge
31m
Merged PRs (30d)
15

Description

If a plugin cannot be found a more useful error message should be given than "Downloaded file is not a valid ZIP". For example
some plugins have inconsistent names and may or may not end with -plugin. The [install-plugins.sh](https://github.com/jenkinsci/docker/blob/master/install-plugins.sh#L53) used to try both. I was getting this error message but it was not clear and I had to dig into why the execution was failing.

**Example**
> java -jar jenkins-plugin-manager-2.5.0.jar --jenkins-version 2.235.5 --plugins shelve-project:3.0
> War not found, installing all plugins: C:\ProgramData\Jenkins\jenkins.war
> Downloaded file is not a valid ZIP
> Unable to resolve dependencies for shelve-project
> Downloaded file is not a valid ZIP
> Unable to download shelve-project

**Correcting the issue by fixing the plugin identifier**
> java -jar jenkins-plugin-manager-2.5.0.jar --jenkins-version 2.235.5 --plugins shelve-project-plugin:3.0
> War not found, installing all plugins: C:\ProgramData\Jenkins\jenkins.war
> Done

Contributor guide

Open the contributing guide

Research direction

Reproduce the reported command with shelve-project:3.0 and compare it with shelve-project-plugin:3.0, observing the current ZIP and dependency errors. Trace the plugin identifier resolution and download path; done means an invalid or unresolved plugin identifier produces a useful error that points to the naming problem.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.